MFH: upgraded bundled libsqlite3 to version 3.2.7

This commit is contained in:
Ilia Alshanetsky 2005-09-26 19:33:26 +00:00
parent 15c9f414a6
commit 846b0826ab
42 changed files with 4885 additions and 4209 deletions

View file

@ -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);