Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch threadtest4 Excluding Merge-Ins
This is equivalent to a diff from fc157dd7 to 6bef7ede
2014-12-12
| ||
00:52 | Remove the KeyInfo cache (for now - perhaps we will add it back in later - or maybe not since it provides negligible benefit but adds a lot of complexity and thread-safety risk). Add a mutex to ATTACH to deal with a data race. (check-in: 03c443ea user: drh tags: trunk) | |
00:40 | Make sure the Btree mutex is held when setting the locking mode and the secure delete flag when attaching a shared-cache database. (Closed-Leaf check-in: 6bef7ede user: drh tags: threadtest4) | |
00:26 | Merge the cell overflow page number cache thread race fix from trunk. (check-in: cefad47e user: drh tags: threadtest4) | |
2014-12-11
| ||
16:38 | Fix a race condition to do with very large index keys in shared-cache mode. (check-in: fc157dd7 user: dan tags: trunk) | |
15:27 | Fix a typo in the documentation for sqlite3_threadsafe(). (check-in: 258e747b user: drh tags: trunk) | |
Changes to src/attach.c.
︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | + + | if( !aNew->pSchema ){ rc = SQLITE_NOMEM; }else if( aNew->pSchema->file_format && aNew->pSchema->enc!=ENC(db) ){ zErrDyn = sqlite3MPrintf(db, "attached databases must use the same text encoding as main database"); rc = SQLITE_ERROR; } sqlite3BtreeEnter(aNew->pBt); pPager = sqlite3BtreePager(aNew->pBt); sqlite3PagerLockingMode(pPager, db->dfltLockMode); sqlite3BtreeSecureDelete(aNew->pBt, sqlite3BtreeSecureDelete(db->aDb[0].pBt,-1) ); #ifndef SQLITE_OMIT_PAGER_PRAGMAS sqlite3BtreeSetPagerFlags(aNew->pBt, 3 | (db->flags & PAGER_FLAGS_MASK)); #endif sqlite3BtreeLeave(aNew->pBt); } aNew->safety_level = 3; aNew->zName = sqlite3DbStrDup(db, zName); if( rc==SQLITE_OK && aNew->zName==0 ){ rc = SQLITE_NOMEM; } |
︙ |
Changes to src/build.c.
︙ | |||
431 432 433 434 435 436 437 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - | /* ** Reclaim the memory used by an index */ static void freeIndex(sqlite3 *db, Index *p){ #ifndef SQLITE_OMIT_ANALYZE sqlite3DeleteIndexSamples(db, p); #endif |
︙ | |||
4186 4187 4188 4189 4190 4191 4192 | 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - + | ** So there might be multiple references to the returned pointer. The ** caller should not try to modify the KeyInfo object. ** ** The caller should invoke sqlite3KeyInfoUnref() on the returned object ** when it has finished using it. */ KeyInfo *sqlite3KeyInfoOfIndex(Parse *pParse, Index *pIdx){ |
︙ |
Changes to src/main.c.
︙ | |||
1028 1029 1030 1031 1032 1033 1034 | 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 | - - - - - - - - - - | /* Free any outstanding Savepoint structures. */ sqlite3CloseSavepoints(db); /* Close all database connections */ for(j=0; j<db->nDb; j++){ struct Db *pDb = &db->aDb[j]; if( pDb->pBt ){ |
︙ | |||
2165 2166 2167 2168 2169 2170 2171 | 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 | - - - - - - - - - - - - - - - - - - - - - - - - - - | ** argument. For now, this simply calls the internal sqlite3ErrStr() ** function. */ const char *sqlite3_errstr(int rc){ return sqlite3ErrStr(rc); } |
︙ | |||
2234 2235 2236 2237 2238 2239 2240 | 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 | - | if( pColl && pColl->xCmp ){ if( db->nVdbeActive ){ sqlite3ErrorWithMsg(db, SQLITE_BUSY, "unable to delete/modify collation sequence due to active statements"); return SQLITE_BUSY; } sqlite3ExpirePreparedStatements(db); |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
1780 1781 1782 1783 1784 1785 1786 | 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 | - | Table *pTable; /* The SQL table being indexed */ char *zColAff; /* String defining the affinity of each column */ Index *pNext; /* The next index associated with the same table */ Schema *pSchema; /* Schema containing this index */ u8 *aSortOrder; /* for each column: True==DESC, False==ASC */ char **azColl; /* Array of collation sequence names for index */ Expr *pPartIdxWhere; /* WHERE clause for partial indices */ |
︙ |
Changes to src/where.c.
︙ | |||
3937 3938 3939 3940 3941 3942 3943 | 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 | - | if( p->wsFlags & (WHERE_VIRTUALTABLE|WHERE_AUTO_INDEX) ){ if( (p->wsFlags & WHERE_VIRTUALTABLE)!=0 && p->u.vtab.needFree ){ sqlite3_free(p->u.vtab.idxStr); p->u.vtab.needFree = 0; p->u.vtab.idxStr = 0; }else if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 && p->u.btree.pIndex!=0 ){ sqlite3DbFree(db, p->u.btree.pIndex->zColAff); |
︙ |
Added test/threadtest4.c.