/ Check-in [81834c30]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Refactor internal function name sqlite3VdbeGetValue() to sqlite3VdbeGetBoundValue().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | partial-indices
Files: files | file ages | folders
SHA1: 81834c3023876487a1188390aae850cf71683701
User & Date: drh 2013-08-01 12:21:58
Context
2013-08-01
13:04
Fill out an initial implementation of the sqlite3ExprImpliesExpr() function. check-in: 8e07aa2a user: drh tags: partial-indices
12:21
Refactor internal function name sqlite3VdbeGetValue() to sqlite3VdbeGetBoundValue(). check-in: 81834c30 user: drh tags: partial-indices
04:39
Fix the ANALYZE command to work with partial indices. check-in: 60353124 user: drh tags: partial-indices
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.h.

   200    200   void sqlite3VdbeSetNumCols(Vdbe*,int);
   201    201   int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));
   202    202   void sqlite3VdbeCountChanges(Vdbe*);
   203    203   sqlite3 *sqlite3VdbeDb(Vdbe*);
   204    204   void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int);
   205    205   void sqlite3VdbeSwap(Vdbe*,Vdbe*);
   206    206   VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*);
   207         -sqlite3_value *sqlite3VdbeGetValue(Vdbe*, int, u8);
          207  +sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe*, int, u8);
   208    208   void sqlite3VdbeSetVarmask(Vdbe*, int);
   209    209   #ifndef SQLITE_OMIT_TRACE
   210    210     char *sqlite3VdbeExpandSql(Vdbe*, const char*);
   211    211   #endif
   212    212   
   213    213   void sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,UnpackedRecord*);
   214    214   int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);

Changes to src/vdbeaux.c.

  3249   3249   ** Return a pointer to an sqlite3_value structure containing the value bound
  3250   3250   ** parameter iVar of VM v. Except, if the value is an SQL NULL, return 
  3251   3251   ** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
  3252   3252   ** constants) to the value before returning it.
  3253   3253   **
  3254   3254   ** The returned value must be freed by the caller using sqlite3ValueFree().
  3255   3255   */
  3256         -sqlite3_value *sqlite3VdbeGetValue(Vdbe *v, int iVar, u8 aff){
         3256  +sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff){
  3257   3257     assert( iVar>0 );
  3258   3258     if( v ){
  3259   3259       Mem *pMem = &v->aVar[iVar-1];
  3260   3260       if( 0==(pMem->flags & MEM_Null) ){
  3261   3261         sqlite3_value *pRet = sqlite3ValueNew(v->db);
  3262   3262         if( pRet ){
  3263   3263           sqlite3VdbeMemCopy((Mem *)pRet, pMem);

Changes to src/where.c.

  1124   1124     op = pRight->op;
  1125   1125     if( op==TK_REGISTER ){
  1126   1126       op = pRight->op2;
  1127   1127     }
  1128   1128     if( op==TK_VARIABLE ){
  1129   1129       Vdbe *pReprepare = pParse->pReprepare;
  1130   1130       int iCol = pRight->iColumn;
  1131         -    pVal = sqlite3VdbeGetValue(pReprepare, iCol, SQLITE_AFF_NONE);
         1131  +    pVal = sqlite3VdbeGetBoundValue(pReprepare, iCol, SQLITE_AFF_NONE);
  1132   1132       if( pVal && sqlite3_value_type(pVal)==SQLITE_TEXT ){
  1133   1133         z = (char *)sqlite3_value_text(pVal);
  1134   1134       }
  1135   1135       sqlite3VdbeSetVarmask(pParse->pVdbe, iCol);
  1136   1136       assert( pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER );
  1137   1137     }else if( op==TK_STRING ){
  1138   1138       z = pRight->u.zToken;
................................................................................
  2588   2588     sqlite3_value **pp
  2589   2589   ){
  2590   2590     if( pExpr->op==TK_VARIABLE
  2591   2591      || (pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE)
  2592   2592     ){
  2593   2593       int iVar = pExpr->iColumn;
  2594   2594       sqlite3VdbeSetVarmask(pParse->pVdbe, iVar);
  2595         -    *pp = sqlite3VdbeGetValue(pParse->pReprepare, iVar, aff);
         2595  +    *pp = sqlite3VdbeGetBoundValue(pParse->pReprepare, iVar, aff);
  2596   2596       return SQLITE_OK;
  2597   2597     }
  2598   2598     return sqlite3ValueFromExpr(pParse->db, pExpr, SQLITE_UTF8, aff, pp);
  2599   2599   }
  2600   2600   #endif
  2601   2601   
  2602   2602   /*