Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove the last traces of shared cache mode. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
27e09941740d1024730f6d141ea9a881 |
User & Date: | drh 2012-04-21 12:49:40.132 |
Context
2012-04-21
| ||
13:00 | All filenames are now URI capable. There is no provision for disabling URI filenames. check-in: 735870610b user: drh tags: trunk | |
12:49 | Remove the last traces of shared cache mode. check-in: 27e0994174 user: drh tags: trunk | |
00:40 | Remove cruft: (1) The sqlite4_prepare_v2() function becomes sqlite4_prepare and all other prepare functions are removed. (2) sqlite4_extended_result_codes() is removed. Extended result codes are now always enabled. (3) The sqlite4_busy_handler() and sqlite4_busy_timeout() functions are removed. check-in: e454574981 user: drh tags: trunk | |
Changes
Changes to main.mk.
︙ | ︙ | |||
191 192 193 194 195 196 197 | # TESTSRC = \ $(TOP)/ext/fts3/fts3_term.c \ $(TOP)/ext/fts3/fts3_test.c \ $(TOP)/src/test1.c \ $(TOP)/src/test4.c \ $(TOP)/src/test5.c \ | < | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | # TESTSRC = \ $(TOP)/ext/fts3/fts3_term.c \ $(TOP)/ext/fts3/fts3_test.c \ $(TOP)/src/test1.c \ $(TOP)/src/test4.c \ $(TOP)/src/test5.c \ $(TOP)/src/test8.c \ $(TOP)/src/test9.c \ $(TOP)/src/test_config.c \ $(TOP)/src/test_demovfs.c \ $(TOP)/src/test_devsym.c \ $(TOP)/src/test_fuzzer.c \ $(TOP)/src/test_hexio.c \ |
︙ | ︙ |
Changes to src/analyze.c.
︙ | ︙ | |||
177 178 179 180 181 182 183 | aRoot[i] = pParse->regRoot; aCreateTbl[i] = 1; }else{ /* The table already exists. If zWhere is not NULL, delete all entries ** associated with the table zWhere. If zWhere is NULL, delete the ** entire contents of the table. */ aRoot[i] = pStat->tnum; | < | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | aRoot[i] = pParse->regRoot; aCreateTbl[i] = 1; }else{ /* The table already exists. If zWhere is not NULL, delete all entries ** associated with the table zWhere. If zWhere is NULL, delete the ** entire contents of the table. */ aRoot[i] = pStat->tnum; if( zWhere ){ sqlite4NestedParse(pParse, "DELETE FROM %Q.%s WHERE %s=%Q", pDb->zName, zTab, zWhereType, zWhere ); }else{ /* The sqlite_stat[12] table already exists. Delete all rows. */ sqlite4VdbeAddOp2(v, OP_Clear, aRoot[i], iDb); |
︙ | ︙ | |||
482 483 484 485 486 487 488 | #ifndef SQLITE_OMIT_AUTHORIZATION if( sqlite4AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0, db->aDb[iDb].zName ) ){ return; } #endif | < < < | 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | #ifndef SQLITE_OMIT_AUTHORIZATION if( sqlite4AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0, db->aDb[iDb].zName ) ){ return; } #endif iIdxCur = pParse->nTab++; sqlite4VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0); for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ int nCol; KeyInfo *pKey; int addrIfNot = 0; /* address of OP_IfNot */ int *aChngAddr; /* Array of jump instruction addresses */ |
︙ | ︙ |
Changes to src/build.c.
︙ | ︙ | |||
29 30 31 32 33 34 35 | ** be parsed. Initialize the pParse structure as needed. */ void sqlite4BeginParse(Parse *pParse, int explainFlag){ pParse->explain = (u8)explainFlag; pParse->nVar = 0; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ** be parsed. Initialize the pParse structure as needed. */ void sqlite4BeginParse(Parse *pParse, int explainFlag){ pParse->explain = (u8)explainFlag; pParse->nVar = 0; } /* ** This routine is called after a single SQL statement has been ** parsed and a VDBE program to execute that statement has been ** prepared. This routine puts the finishing touches on the ** VDBE program and resets the pParse structure for the next ** parse. |
︙ | ︙ | |||
167 168 169 170 171 172 173 | char *vtab = (char *)sqlite4GetVTable(db, pParse->apVtabLock[i]); sqlite4VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB); } pParse->nVtabLock = 0; } #endif | < < < < < < | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | char *vtab = (char *)sqlite4GetVTable(db, pParse->apVtabLock[i]); sqlite4VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB); } pParse->nVtabLock = 0; } #endif /* Initialize any AUTOINCREMENT data structures required. */ sqlite4AutoincrementBegin(pParse); /* Finally, jump back to the beginning of the executable code. */ sqlite4VdbeAddOp2(v, OP_Goto, 0, pParse->cookieGoto); } |
︙ | ︙ | |||
605 606 607 608 609 610 611 | /* ** Open the sqlite_master table stored in database number iDb for ** writing. The table is opened using cursor 0. */ void sqlite4OpenMasterTable(Parse *p, int iDb){ Vdbe *v = sqlite4GetVdbe(p); | < | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | /* ** Open the sqlite_master table stored in database number iDb for ** writing. The table is opened using cursor 0. */ void sqlite4OpenMasterTable(Parse *p, int iDb){ Vdbe *v = sqlite4GetVdbe(p); sqlite4VdbeAddOp3(v, OP_OpenWrite, 0, MASTER_ROOT, iDb); sqlite4VdbeChangeP4(v, -1, (char *)5, P4_INT32); /* 5 column table */ if( p->nTab==0 ){ p->nTab = 1; } } |
︙ | ︙ | |||
1648 1649 1650 1651 1652 1653 1654 | /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT ** statement to populate the new table. The root-page number for the ** new table is in register pParse->regRoot. ** ** Once the SELECT has been coded by sqlite4Select(), it is in a ** suitable state to query for the column names and types to be used ** by the new table. | < < < < < | 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 | /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT ** statement to populate the new table. The root-page number for the ** new table is in register pParse->regRoot. ** ** Once the SELECT has been coded by sqlite4Select(), it is in a ** suitable state to query for the column names and types to be used ** by the new table. */ if( pSelect ){ SelectDest dest; Table *pSelTab; assert(pParse->nTab==1); sqlite4VdbeAddOp3(v, OP_OpenWrite, 1, iPkRoot, iDb); |
︙ | ︙ |
Changes to src/ctime.c.
︙ | ︙ | |||
280 281 282 283 284 285 286 | #endif #ifdef SQLITE_OMIT_SCHEMA_PRAGMAS "OMIT_SCHEMA_PRAGMAS", #endif #ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS "OMIT_SCHEMA_VERSION_PRAGMAS", #endif | < < < | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | #endif #ifdef SQLITE_OMIT_SCHEMA_PRAGMAS "OMIT_SCHEMA_PRAGMAS", #endif #ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS "OMIT_SCHEMA_VERSION_PRAGMAS", #endif #ifdef SQLITE_OMIT_SUBQUERY "OMIT_SUBQUERY", #endif #ifdef SQLITE_OMIT_TCL_VARIABLE "OMIT_TCL_VARIABLE", #endif #ifdef SQLITE_OMIT_TEMPDB |
︙ | ︙ |
Changes to src/expr.c.
︙ | ︙ | |||
1468 1469 1470 1471 1472 1473 1474 | assert( p->pEList!=0 ); /* Because of isCandidateForInOpt(p) */ assert( p->pEList->a[0].pExpr!=0 ); /* Because of isCandidateForInOpt(p) */ assert( p->pSrc!=0 ); /* Because of isCandidateForInOpt(p) */ pTab = p->pSrc->a[0].pTab; pExpr = p->pEList->a[0].pExpr; iCol = pExpr->iColumn; | | < | 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 | assert( p->pEList!=0 ); /* Because of isCandidateForInOpt(p) */ assert( p->pEList->a[0].pExpr!=0 ); /* Because of isCandidateForInOpt(p) */ assert( p->pSrc!=0 ); /* Because of isCandidateForInOpt(p) */ pTab = p->pSrc->a[0].pTab; pExpr = p->pEList->a[0].pExpr; iCol = pExpr->iColumn; /* Code an OP_VerifyCookie for <table> */ iDb = sqlite4SchemaToIndex(db, pTab->pSchema); sqlite4CodeVerifySchema(pParse, iDb); /* This function is only called from two places. In both cases the vdbe ** has already been allocated. So assume sqlite4GetVdbe() is always ** successful here. */ assert(v); |
︙ | ︙ |
Changes to src/fkey.c.
︙ | ︙ | |||
722 723 724 725 726 727 728 | char *zCol = pTo->aCol[pIdx->aiColumn[i]].zName; rcauth = sqlite4AuthReadCol(pParse, pTo->zName, zCol, iDb); isIgnore = (rcauth==SQLITE_IGNORE); } } #endif | < < < < < | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | char *zCol = pTo->aCol[pIdx->aiColumn[i]].zName; rcauth = sqlite4AuthReadCol(pParse, pTo->zName, zCol, iDb); isIgnore = (rcauth==SQLITE_IGNORE); } } #endif pParse->nTab++; if( regOld!=0 ){ /* A row is being removed from the child table. Search for the parent. ** If the parent does not exist, removing the child row resolves an ** outstanding foreign key constraint violation. */ fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1,isIgnore); } if( regNew!=0 ){ |
︙ | ︙ |
Changes to src/global.c.
︙ | ︙ | |||
154 155 156 157 158 159 160 | (void*)0, /* pScratch */ 0, /* szScratch */ 0, /* nScratch */ (void*)0, /* pPage */ 0, /* szPage */ 0, /* nPage */ 0, /* mxParserStack */ | < | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | (void*)0, /* pScratch */ 0, /* szScratch */ 0, /* nScratch */ (void*)0, /* pPage */ 0, /* szPage */ 0, /* nPage */ 0, /* mxParserStack */ /* All the rest should always be initialized to zero */ 0, /* isInit */ 0, /* inProgress */ 0, /* isMutexInit */ 0, /* isMallocInit */ 0, /* isPCacheInit */ 0, /* pInitMutex */ |
︙ | ︙ |
Changes to src/insert.c.
︙ | ︙ | |||
65 66 67 68 69 70 71 | int opcode /* OP_OpenRead or OP_OpenWrite */ ){ assert( opcode==OP_OpenWrite || opcode==OP_OpenRead ); if( IsVirtual(pTab)==0 ){ Index *pIdx; /* PRIMARY KEY index for table pTab */ pIdx = sqlite4FindPrimaryKey(pTab, 0); | < | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | int opcode /* OP_OpenRead or OP_OpenWrite */ ){ assert( opcode==OP_OpenWrite || opcode==OP_OpenRead ); if( IsVirtual(pTab)==0 ){ Index *pIdx; /* PRIMARY KEY index for table pTab */ pIdx = sqlite4FindPrimaryKey(pTab, 0); sqlite4OpenIndex(p, iCur, iDb, pIdx, opcode); assert( pIdx->eIndexType==SQLITE_INDEX_PRIMARYKEY ); } } /* ** Return a pointer to the column affinity string associated with index |
︙ | ︙ |
Changes to src/main.c.
︙ | ︙ | |||
1770 1771 1772 1773 1774 1775 1776 | const char *z; int mode; } *aMode = 0; char *zModeType = 0; int mask = 0; int limit = 0; | < < < < < < < < < < < < | 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 | const char *z; int mode; } *aMode = 0; char *zModeType = 0; int mask = 0; int limit = 0; if( nOpt==4 && memcmp("mode", zOpt, 4)==0 ){ static struct OpenMode aOpenMode[] = { { "ro", SQLITE_OPEN_READONLY }, { "rw", SQLITE_OPEN_READWRITE }, { "rwc", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE }, { 0, 0 } }; |
︙ | ︙ | |||
1898 1899 1900 1901 1902 1903 1904 | }else if( flags & SQLITE_OPEN_NOMUTEX ){ isThreadsafe = 0; }else if( flags & SQLITE_OPEN_FULLMUTEX ){ isThreadsafe = 1; }else{ isThreadsafe = sqlite4GlobalConfig.bFullMutex; } | < < < < < | < | | 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 | }else if( flags & SQLITE_OPEN_NOMUTEX ){ isThreadsafe = 0; }else if( flags & SQLITE_OPEN_FULLMUTEX ){ isThreadsafe = 1; }else{ isThreadsafe = sqlite4GlobalConfig.bFullMutex; } /* Remove harmful bits from the flags parameter ** ** The SQLITE_OPEN_NOMUTEX and SQLITE_OPEN_FULLMUTEX flags were ** dealt with in the previous code block. Besides these, the only ** valid input flags for sqlite4_open_v2() are SQLITE_OPEN_READONLY, ** SQLITE_OPEN_READWRITE, SQLITE_OPEN_CREATE and some ** reserved bits. Silently mask off all other flags. */ flags &= ~( SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_TRANSIENT_DB | SQLITE_OPEN_MAIN_JOURNAL | |
︙ | ︙ |
Changes to src/select.c.
︙ | ︙ | |||
4358 4359 4360 4361 4362 4363 4364 | const int iCsr = pParse->nTab++; /* Cursor to scan b-tree */ Index *pIdx; /* Iterator variable */ KeyInfo *pKeyInfo = 0; /* Keyinfo for scanned index */ Index *pBest = 0; /* Best index found so far */ int iRoot = pTab->tnum; /* Root page of scanned b-tree */ sqlite4CodeVerifySchema(pParse, iDb); | < | 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 | const int iCsr = pParse->nTab++; /* Cursor to scan b-tree */ Index *pIdx; /* Iterator variable */ KeyInfo *pKeyInfo = 0; /* Keyinfo for scanned index */ Index *pBest = 0; /* Best index found so far */ int iRoot = pTab->tnum; /* Root page of scanned b-tree */ sqlite4CodeVerifySchema(pParse, iDb); /* Search for the index that has the least amount of columns. If ** there is such an index, and it has less columns than the table ** does, then we can assume that it consumes less space on disk and ** will therefore be cheaper to scan to determine the query result. ** In this case set iRoot to the root page number of the index b-tree ** and pKeyInfo to the KeyInfo structure required to navigate the |
︙ | ︙ |
Changes to src/sqlite.h.in.
︙ | ︙ | |||
473 474 475 476 477 478 479 | #define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ #define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ #define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ #define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ #define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ #define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite4_open_v2() */ #define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite4_open_v2() */ | < < | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | #define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ #define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ #define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ #define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ #define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ #define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite4_open_v2() */ #define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite4_open_v2() */ #define SQLITE_OPEN_WAL 0x00080000 /* VFS only */ /* Reserved: 0x00F00000 */ /* ** CAPI3REF: Device Characteristics ** |
︙ | ︙ | |||
2328 2329 2330 2331 2332 2333 2334 | ** passing it to [sqlite4_close()] when it is no longer required. ** ** The sqlite4_open_v2() interface works like sqlite4_open() ** except that it accepts two additional parameters for additional control ** over the new database connection. ^(The flags parameter to ** sqlite4_open_v2() can take one of ** the following three values, optionally combined with the | | | | 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 | ** passing it to [sqlite4_close()] when it is no longer required. ** ** The sqlite4_open_v2() interface works like sqlite4_open() ** except that it accepts two additional parameters for additional control ** over the new database connection. ^(The flags parameter to ** sqlite4_open_v2() can take one of ** the following three values, optionally combined with the ** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], ** and/or [SQLITE_OPEN_URI] flags:)^ ** ** <dl> ** ^(<dt>[SQLITE_OPEN_READONLY]</dt> ** <dd>The database is opened in read-only mode. If the database does not ** already exist, an error is returned.</dd>)^ ** ** ^(<dt>[SQLITE_OPEN_READWRITE]</dt> |
︙ | ︙ | |||
2358 2359 2360 2361 2362 2363 2364 | ** ** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection ** opens in the multi-thread [threading mode] as long as the single-thread ** mode has not been set at compile-time or start-time. ^If the ** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens ** in the serialized [threading mode] unless single-thread was ** previously selected at compile-time or start-time. | < < < < < | 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 | ** ** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection ** opens in the multi-thread [threading mode] as long as the single-thread ** mode has not been set at compile-time or start-time. ^If the ** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens ** in the serialized [threading mode] unless single-thread was ** previously selected at compile-time or start-time. ** ** ^The fourth parameter to sqlite4_open_v2() is the name of the ** [sqlite4_vfs] object that defines the operating system interface that ** the new database connection should use. ^If the fourth parameter is ** a NULL pointer then the default [sqlite4_vfs] object is used. ** ** ^If the filename is ":memory:", then a private, temporary in-memory database |
︙ | ︙ | |||
2434 2435 2436 2437 2438 2439 2440 | ** "rw", then the database is opened for read-write (but not create) ** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had ** been set. ^Value "rwc" is equivalent to setting both ** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If sqlite4_open_v2() is ** used, it is an error to specify a value for the mode parameter that is ** less restrictive than that specified by the flags passed as the third ** parameter. | < < < < < < < < < | 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 | ** "rw", then the database is opened for read-write (but not create) ** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had ** been set. ^Value "rwc" is equivalent to setting both ** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If sqlite4_open_v2() is ** used, it is an error to specify a value for the mode parameter that is ** less restrictive than that specified by the flags passed as the third ** parameter. ** </ul> ** ** ^Specifying an unknown parameter in the query component of a URI is not an ** error. Future versions of SQLite might understand additional query ** parameters. See "[query parameters with special meaning to SQLite]" for ** additional information. ** |
︙ | ︙ |
Changes to src/sqliteInt.h.
︙ | ︙ | |||
15 16 17 18 19 20 21 | #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ /*#define SQLITE_OMIT_BTREECOUNT 1*/ #define SQLITE_OMIT_WAL 1 #define SQLITE_OMIT_VACUUM 1 #define SQLITE_OMIT_AUTOVACUUM 1 | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ /*#define SQLITE_OMIT_BTREECOUNT 1*/ #define SQLITE_OMIT_WAL 1 #define SQLITE_OMIT_VACUUM 1 #define SQLITE_OMIT_AUTOVACUUM 1 /*#define SQLITE_OMIT_PAGER_PRAGMAS 1*/ #define SQLITE_OMIT_PROGRESS_CALLBACK 1 #define SQLITE_OMIT_MERGE_SORT 1 /* ** These #defines should enable >2GB file support on POSIX if the |
︙ | ︙ | |||
647 648 649 650 651 652 653 | typedef struct Parse Parse; typedef struct RowSet RowSet; typedef struct Savepoint Savepoint; typedef struct Select Select; typedef struct SrcList SrcList; typedef struct StrAccum StrAccum; typedef struct Table Table; | < | 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | typedef struct Parse Parse; typedef struct RowSet RowSet; typedef struct Savepoint Savepoint; typedef struct Select Select; typedef struct SrcList SrcList; typedef struct StrAccum StrAccum; typedef struct Table Table; typedef struct Token Token; typedef struct Trigger Trigger; typedef struct TriggerPrg TriggerPrg; typedef struct TriggerStep TriggerStep; typedef struct UnpackedRecord UnpackedRecord; typedef struct VTable VTable; typedef struct VtabCtx VtabCtx; |
︙ | ︙ | |||
2184 2185 2186 2187 2188 2189 2190 | ** the parser and down into all the parser action routine in order to ** carry around information that is global to the entire parse. ** ** The structure is divided into two parts. When the parser and code ** generate call themselves recursively, the first part of the structure ** is constant but the second part is reset at the beginning and end of ** each recursion. | < < < < < < | 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 | ** the parser and down into all the parser action routine in order to ** carry around information that is global to the entire parse. ** ** The structure is divided into two parts. When the parser and code ** generate call themselves recursively, the first part of the structure ** is constant but the second part is reset at the beginning and end of ** each recursion. */ struct Parse { sqlite4 *db; /* The main database structure */ int rc; /* Return code from execution */ char *zErrMsg; /* An error message */ Vdbe *pVdbe; /* An engine for executing database bytecode */ u8 colNamesSet; /* TRUE after OP_ColumnName has been issued to pVdbe */ |
︙ | ︙ | |||
2228 2229 2230 2231 2232 2233 2234 | } aColCache[SQLITE_N_COLCACHE]; /* One for each column cache entry */ yDbMask writeMask; /* Start a write transaction on these databases */ yDbMask cookieMask; /* Bitmask of schema verified databases */ u8 isMultiWrite; /* True if statement may affect/insert multiple rows */ u8 mayAbort; /* True if statement may throw an ABORT exception */ int cookieGoto; /* Address of OP_Goto to cookie verifier subroutine */ int cookieValue[SQLITE_MAX_ATTACHED+2]; /* Values of cookies to verify */ | < < < < < < < | 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 | } aColCache[SQLITE_N_COLCACHE]; /* One for each column cache entry */ yDbMask writeMask; /* Start a write transaction on these databases */ yDbMask cookieMask; /* Bitmask of schema verified databases */ u8 isMultiWrite; /* True if statement may affect/insert multiple rows */ u8 mayAbort; /* True if statement may throw an ABORT exception */ int cookieGoto; /* Address of OP_Goto to cookie verifier subroutine */ int cookieValue[SQLITE_MAX_ATTACHED+2]; /* Values of cookies to verify */ int regRowid; /* Register holding rowid of CREATE TABLE entry */ AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */ int nMaxArg; /* Max args passed to user function by sub-program */ /* Information used while coding trigger programs. */ Parse *pToplevel; /* Parse structure for main program (or NULL) */ Table *pTriggerTab; /* Table triggers are being coded for */ u32 oldmask; /* Mask of old.* columns referenced */ |
︙ | ︙ | |||
2463 2464 2465 2466 2467 2468 2469 | void *pScratch; /* Scratch memory */ int szScratch; /* Size of each scratch buffer */ int nScratch; /* Number of scratch buffers */ void *pPage; /* Page cache memory */ int szPage; /* Size of each page in pPage[] */ int nPage; /* Number of pages in pPage[] */ int mxParserStack; /* maximum depth of the parser stack */ | < | 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 | void *pScratch; /* Scratch memory */ int szScratch; /* Size of each scratch buffer */ int nScratch; /* Number of scratch buffers */ void *pPage; /* Page cache memory */ int szPage; /* Size of each page in pPage[] */ int nPage; /* Number of pages in pPage[] */ int mxParserStack; /* maximum depth of the parser stack */ /* The above might be initialized to non-zero. The following need to always ** initially be zero, however. */ int isInit; /* True after initialization has finished */ int inProgress; /* True while initialization in progress */ int isMutexInit; /* True after mutexes are initialized */ int isMallocInit; /* True after malloc is initialized */ int isPCacheInit; /* True after malloc is initialized */ |
︙ | ︙ | |||
3104 3105 3106 3107 3108 3109 3110 | void sqlite4AutoLoadExtensions(sqlite4*); #ifndef SQLITE_OMIT_LOAD_EXTENSION void sqlite4CloseExtensions(sqlite4*); #else # define sqlite4CloseExtensions(X) #endif | < < < < < < | 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 | void sqlite4AutoLoadExtensions(sqlite4*); #ifndef SQLITE_OMIT_LOAD_EXTENSION void sqlite4CloseExtensions(sqlite4*); #else # define sqlite4CloseExtensions(X) #endif #ifdef SQLITE_TEST int sqlite4Utf8To8(unsigned char*); #endif #ifdef SQLITE_OMIT_VIRTUALTABLE # define sqlite4VtabClear(Y) # define sqlite4VtabSync(X,Y) SQLITE_OK |
︙ | ︙ |
Changes to src/tclsqlite.c.
︙ | ︙ | |||
3114 3115 3116 3117 3118 3119 3120 | #ifdef SQLITE_TEST { extern int Sqliteconfig_Init(Tcl_Interp*); extern int Sqlitetest1_Init(Tcl_Interp*); extern int Sqlitetest3_Init(Tcl_Interp*); extern int Sqlitetest4_Init(Tcl_Interp*); extern int Sqlitetest5_Init(Tcl_Interp*); | < | 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 | #ifdef SQLITE_TEST { extern int Sqliteconfig_Init(Tcl_Interp*); extern int Sqlitetest1_Init(Tcl_Interp*); extern int Sqlitetest3_Init(Tcl_Interp*); extern int Sqlitetest4_Init(Tcl_Interp*); extern int Sqlitetest5_Init(Tcl_Interp*); extern int Sqlitetest8_Init(Tcl_Interp*); extern int Sqlitetest9_Init(Tcl_Interp*); extern int Sqlitetest_demovfs_Init(Tcl_Interp *); extern int Sqlitetest_func_Init(Tcl_Interp*); extern int Sqlitetest_hexio_Init(Tcl_Interp*); extern int Sqlitetest_init_Init(Tcl_Interp*); extern int Sqlitetest_malloc_Init(Tcl_Interp*); |
︙ | ︙ | |||
3153 3154 3155 3156 3157 3158 3159 | Zipvfs_Init(interp); #endif Sqliteconfig_Init(interp); Sqlitetest1_Init(interp); Sqlitetest4_Init(interp); Sqlitetest5_Init(interp); | < | 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 | Zipvfs_Init(interp); #endif Sqliteconfig_Init(interp); Sqlitetest1_Init(interp); Sqlitetest4_Init(interp); Sqlitetest5_Init(interp); Sqlitetest8_Init(interp); Sqlitetest9_Init(interp); Sqlitetest_demovfs_Init(interp); Sqlitetest_hexio_Init(interp); Sqlitetest_init_Init(interp); Sqlitetest_malloc_Init(interp); Sqlitetest_mutex_Init(interp); |
︙ | ︙ |
Changes to src/test1.c.
︙ | ︙ | |||
3341 3342 3343 3344 3345 3346 3347 | { "SQLITE_OPEN_TRANSIENT_DB", SQLITE_OPEN_TRANSIENT_DB }, { "SQLITE_OPEN_MAIN_JOURNAL", SQLITE_OPEN_MAIN_JOURNAL }, { "SQLITE_OPEN_TEMP_JOURNAL", SQLITE_OPEN_TEMP_JOURNAL }, { "SQLITE_OPEN_SUBJOURNAL", SQLITE_OPEN_SUBJOURNAL }, { "SQLITE_OPEN_MASTER_JOURNAL", SQLITE_OPEN_MASTER_JOURNAL }, { "SQLITE_OPEN_NOMUTEX", SQLITE_OPEN_NOMUTEX }, { "SQLITE_OPEN_FULLMUTEX", SQLITE_OPEN_FULLMUTEX }, | < < | 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 | { "SQLITE_OPEN_TRANSIENT_DB", SQLITE_OPEN_TRANSIENT_DB }, { "SQLITE_OPEN_MAIN_JOURNAL", SQLITE_OPEN_MAIN_JOURNAL }, { "SQLITE_OPEN_TEMP_JOURNAL", SQLITE_OPEN_TEMP_JOURNAL }, { "SQLITE_OPEN_SUBJOURNAL", SQLITE_OPEN_SUBJOURNAL }, { "SQLITE_OPEN_MASTER_JOURNAL", SQLITE_OPEN_MASTER_JOURNAL }, { "SQLITE_OPEN_NOMUTEX", SQLITE_OPEN_NOMUTEX }, { "SQLITE_OPEN_FULLMUTEX", SQLITE_OPEN_FULLMUTEX }, { "SQLITE_OPEN_WAL", SQLITE_OPEN_WAL }, { "SQLITE_OPEN_URI", SQLITE_OPEN_URI }, { 0, 0 } }; rc = Tcl_GetIndexFromObjStruct(interp, apFlag[i], aFlag, sizeof(aFlag[0]), "flag", 0, &iFlag ); |
︙ | ︙ |
Deleted src/test7.c.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to src/test_config.c.
︙ | ︙ | |||
447 448 449 450 451 452 453 | #if defined(SQLITE_PREFER_PROXY_LOCKING) && defined(__APPLE__) Tcl_SetVar2(interp,"sqlite_options","prefer_proxy_locking","1",TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp,"sqlite_options","prefer_proxy_locking","0",TCL_GLOBAL_ONLY); #endif | < < < < < < | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | #if defined(SQLITE_PREFER_PROXY_LOCKING) && defined(__APPLE__) Tcl_SetVar2(interp,"sqlite_options","prefer_proxy_locking","1",TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp,"sqlite_options","prefer_proxy_locking","0",TCL_GLOBAL_ONLY); #endif #ifdef SQLITE_OMIT_SUBQUERY Tcl_SetVar2(interp, "sqlite_options", "subquery", "0", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "subquery", "1", TCL_GLOBAL_ONLY); #endif #ifdef SQLITE_OMIT_TCL_VARIABLE |
︙ | ︙ |
Deleted src/test_quota.c.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted src/test_quota.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to src/test_thread.c.
︙ | ︙ | |||
478 479 480 481 482 483 484 | pthread_mutex_destroy(&un.mutex); return rc; } /* ** This function is a wrapper around the SQLite function sqlite4_step(). | < < < < < < < < | 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | pthread_mutex_destroy(&un.mutex); return rc; } /* ** This function is a wrapper around the SQLite function sqlite4_step(). */ int sqlite4_blocking_step(sqlite4_stmt *pStmt){ int rc; while( SQLITE_LOCKED==(rc = sqlite4_step(pStmt)) ){ rc = wait_for_unlock_notify(sqlite4_db_handle(pStmt)); if( rc!=SQLITE_OK ) break; sqlite4_reset(pStmt); |
︙ | ︙ |
Changes to src/tokenize.c.
︙ | ︙ | |||
482 483 484 485 486 487 488 | pParse->zErrMsg = 0; nErr++; } if( pParse->pVdbe && pParse->nErr>0 && pParse->nested==0 ){ sqlite4VdbeDelete(pParse->pVdbe); pParse->pVdbe = 0; } | < < < < < < < | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | pParse->zErrMsg = 0; nErr++; } if( pParse->pVdbe && pParse->nErr>0 && pParse->nested==0 ){ sqlite4VdbeDelete(pParse->pVdbe); pParse->pVdbe = 0; } #ifndef SQLITE_OMIT_VIRTUALTABLE sqlite4_free(pParse->apVtabLock); #endif if( !IN_DECLARE_VTAB ){ /* If the pParse->declareVtab flag is set, do not delete any table ** structure built up in pParse->pNewTable. The calling code (see vtab.c) |
︙ | ︙ |
Changes to src/vdbe.c.
︙ | ︙ | |||
2360 2361 2362 2363 2364 2365 2366 | break; } /* Opcode: AutoCommit P1 P2 * * * ** ** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll ** back any currently active btree transactions. If there are any active | | < | 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 | break; } /* Opcode: AutoCommit P1 P2 * * * ** ** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll ** back any currently active btree transactions. If there are any active ** VMs (apart from this one), then a ROLLBACK fails. ** ** This instruction causes the VM to halt. */ case OP_AutoCommit: { int bAutoCommit; /* New value for auto-commit flag */ int bRollback; /* True to do transaction rollback */ |
︙ | ︙ | |||
4510 4511 4512 4513 4514 4515 4516 | sqlite4ExpirePreparedStatements(db); }else{ p->expired = 1; } break; } | < < < < < < < < < < < < < < < < < < < | 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 | sqlite4ExpirePreparedStatements(db); }else{ p->expired = 1; } break; } #ifndef SQLITE_OMIT_VIRTUALTABLE /* Opcode: VBegin * * * P4 * ** ** P4 may be a pointer to an sqlite4_vtab structure. If so, call the ** xBegin method for that table. ** |
︙ | ︙ |
Changes to src/where.c.
︙ | ︙ | |||
4936 4937 4938 4939 4940 4941 4942 | #endif if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0 && (wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0 ){ int op = pWInfo->okOnePass ? OP_OpenWrite : OP_OpenRead; sqlite4OpenPrimaryKey(pParse, pTabItem->iCursor, iDb, pTab, op); testcase( pTab->nCol==BMS-1 ); testcase( pTab->nCol==BMS ); | < < < < < < < < < < < < | 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 | #endif if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0 && (wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0 ){ int op = pWInfo->okOnePass ? OP_OpenWrite : OP_OpenRead; sqlite4OpenPrimaryKey(pParse, pTabItem->iCursor, iDb, pTab, op); testcase( pTab->nCol==BMS-1 ); testcase( pTab->nCol==BMS ); } #ifndef SQLITE_OMIT_AUTOMATIC_INDEX if( (pLevel->plan.wsFlags & WHERE_TEMP_INDEX)!=0 ){ constructAutomaticIndex(pParse, pWC, pTabItem, notReady, pLevel); }else #endif if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){ |
︙ | ︙ |
Changes to test/attachmalloc.test.
︙ | ︙ | |||
56 57 58 59 60 61 62 | CREATE INDEX i1 ON t1(a, b); } db2 close } -sqlbody { CREATE TABLE t1(d, e, f); ATTACH 'test2.db' AS db1; } | < < < < < < < < < < < < < | 56 57 58 59 60 61 62 63 64 | CREATE INDEX i1 ON t1(a, b); } db2 close } -sqlbody { CREATE TABLE t1(d, e, f); ATTACH 'test2.db' AS db1; } finish_test |
Changes to test/enc3.test.
︙ | ︙ | |||
73 74 75 76 77 78 79 | do_test enc3-2.4 { execsql { SELECT rowid FROM t2 WHERE a LIKE x'610062002500'; } } {1} } | < < < < < < < < < < < < < < < < < < < < < < < < < < < | 73 74 75 76 77 78 79 80 | do_test enc3-2.4 { execsql { SELECT rowid FROM t2 WHERE a LIKE x'610062002500'; } } {1} } finish_test |
Changes to test/tester.tcl.
︙ | ︙ | |||
1481 1482 1483 1484 1485 1486 1487 | unset ::G(start:permutation) } if {[info exists ::G(start:file)]} { if {$tail != $::G(start:file) && $tail!="$::G(start:file).test"} return unset ::G(start:file) } | < < < < < < < < < < < < < | 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 | unset ::G(start:permutation) } if {[info exists ::G(start:file)]} { if {$tail != $::G(start:file) && $tail!="$::G(start:file).test"} return unset ::G(start:file) } # Run the test script in a slave interpreter. # unset -nocomplain ::run_thread_tests_called reset_prng_state set ::sqlite_open_file_count 0 set time [time { slave_test_script [list source $zFile] }] set ms [expr [lindex $time 0] / 1000] # Test that all files opened by the test script were closed. Omit this # if the test script has "thread" in its name. The open file counter # is not thread-safe. # if {[info exists ::run_thread_tests_called]==0} { do_test ${tail}-closeallfiles { expr {$::sqlite_open_file_count>0} } {0} } set ::sqlite_open_file_count 0 # Add some info to the output. # puts "Time: $tail $ms ms" show_memstats } # Open a new connection on database test.db and execute the SQL script |
︙ | ︙ |