diff options
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/analyze.c')
-rw-r--r-- | ext/pdo_sqlite/sqlite/src/analyze.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ext/pdo_sqlite/sqlite/src/analyze.c b/ext/pdo_sqlite/sqlite/src/analyze.c index 7f0f00a349..a6c92e9f6f 100644 --- a/ext/pdo_sqlite/sqlite/src/analyze.c +++ b/ext/pdo_sqlite/sqlite/src/analyze.c @@ -88,8 +88,8 @@ static void analyzeOneTable( int addr; /* The address of an instruction */ v = sqlite3GetVdbe(pParse); - if( pTab==0 || pTab->pIndex==0 || pTab->pIndex->pNext==0 ){ - /* Do no analysis for tables with fewer than 2 indices */ + if( pTab==0 || pTab->pIndex==0 ){ + /* Do no analysis for tables that have no indices */ return; } @@ -127,13 +127,11 @@ static void analyzeOneTable( ** Cells iMem through iMem+nCol are initialized to 0. The others ** are initialized to NULL. */ - sqlite3VdbeAddOp(v, OP_Integer, 0, 0); for(i=0; i<=nCol; i++){ - sqlite3VdbeAddOp(v, OP_MemStore, iMem+i, i==nCol); + sqlite3VdbeAddOp(v, OP_MemInt, 0, iMem+i); } - sqlite3VdbeAddOp(v, OP_Null, 0, 0); for(i=0; i<nCol; i++){ - sqlite3VdbeAddOp(v, OP_MemStore, iMem+nCol+i+1, i==nCol-1); + sqlite3VdbeAddOp(v, OP_MemNull, iMem+nCol+i+1, 0); } /* Do the analysis. @@ -198,7 +196,7 @@ static void analyzeOneTable( } sqlite3VdbeOp3(v, OP_MakeRecord, 3, 0, "ttt", 0); sqlite3VdbeAddOp(v, OP_Insert, iStatCur, 0); - sqlite3VdbeChangeP2(v, addr, sqlite3VdbeCurrentAddr(v)); + sqlite3VdbeJumpHere(v, addr); } } @@ -333,7 +331,7 @@ static int analysisLoader(void *pData, int argc, char **argv, char **azNotUsed){ const char *z; assert( argc==2 ); - if( argv[0]==0 || argv[1]==0 ){ + if( argv==0 || argv[0]==0 || argv[1]==0 ){ return 0; } pIndex = sqlite3FindIndex(pInfo->db, argv[0], pInfo->zDatabase); |