SQLite

Check-in [91733bc485]
Login

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

Overview
Comment:In sqlite3Stat4ProbeSetValue() change a local variable name iVar to iBindVar to avoid confusion with iVal, and fix a place where the name was actually confused.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sqlite_stat4
Files: files | file ages | folders
SHA1: 91733bc4856034c10bc2ba0acdae1970b05d62b9
User & Date: drh 2013-08-16 17:18:02.373
References
2013-08-16
17:46
Add a test for the problem fixed by [91733bc485]. (check-in: 5c59110481 user: dan tags: sqlite_stat4)
Context
2013-08-16
17:46
Add a test for the problem fixed by [91733bc485]. (check-in: 5c59110481 user: dan tags: sqlite_stat4)
17:18
In sqlite3Stat4ProbeSetValue() change a local variable name iVar to iBindVar to avoid confusion with iVal, and fix a place where the name was actually confused. (check-in: 91733bc485 user: drh tags: sqlite_stat4)
14:51
Merge the fork that resulted from a check-in race. (check-in: b7fe4f362b user: drh tags: sqlite_stat4)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbemem.c.
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
      sqlite3VdbeMemSetNull((Mem*)pVal);
      *pbOk = 1;
    }
  }else if( pExpr->op==TK_VARIABLE
        || (pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE)
  ){
    Vdbe *v;
    int iVar = pExpr->iColumn;
    sqlite3VdbeSetVarmask(pParse->pVdbe, iVar);
    if( (v = pParse->pReprepare) ){
      pVal = valueNew(pParse->db, &alloc);
      if( pVal ){
        rc = sqlite3VdbeMemCopy((Mem*)pVal, &v->aVar[iVal-1]);
        if( rc==SQLITE_OK ){
          sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
        }
        pVal->db = pParse->db;
        *pbOk = 1;
        sqlite3VdbeMemStoreType((Mem*)pVal);
      }







|
|
|


|







1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
      sqlite3VdbeMemSetNull((Mem*)pVal);
      *pbOk = 1;
    }
  }else if( pExpr->op==TK_VARIABLE
        || (pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE)
  ){
    Vdbe *v;
    int iBindVar = pExpr->iColumn;
    sqlite3VdbeSetVarmask(pParse->pVdbe, iBindVar);
    if( (v = pParse->pReprepare)!=0 ){
      pVal = valueNew(pParse->db, &alloc);
      if( pVal ){
        rc = sqlite3VdbeMemCopy((Mem*)pVal, &v->aVar[iBindVar-1]);
        if( rc==SQLITE_OK ){
          sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
        }
        pVal->db = pParse->db;
        *pbOk = 1;
        sqlite3VdbeMemStoreType((Mem*)pVal);
      }