]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Simplifications to the sqlite3ResetInternalSchema() logic to eliminate
authordrh <drh@noemail.net>
Tue, 5 Apr 2011 19:26:30 +0000 (19:26 +0000)
committerdrh <drh@noemail.net>
Tue, 5 Apr 2011 19:26:30 +0000 (19:26 +0000)
unreachable branches.

FossilOrigin-Name: a4c3ac989d4e93f0279172901b9ece822d137700

manifest
manifest.uuid
src/build.c

index 50fd159d4ce97a1fdcb1a734402f715205109e11..e1a02097f3823adc51c2b82d1e44050ec948798b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sdead\scode\sfrom\sthe\sOP_JournalMode\sopcode\sin\sthe\sVDBE.\nThis\scode\sseems\sto\shave\sbeen\suseless\ssince\s[f88c6367d2]\son\s[20010-08-07].
-D 2011-04-05T18:34:10.447
+C Simplifications\sto\sthe\ssqlite3ResetInternalSchema()\slogic\sto\seliminate\nunreachable\sbranches.
+D 2011-04-05T19:26:30.895
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -124,7 +124,7 @@ F src/btmutex.c 1f951523accdfa1d204b06150e016b5b69529b8a
 F src/btree.c 107723ed4f9bdb55213ba6164c30c49af75f4bf9
 F src/btree.h 221e186cd64127088890a878aaab154344380fe8
 F src/btreeInt.h b5e339df994d12bcd9067d04f9125c8792de51ac
-F src/build.c d809f57250b10e83586bc23921de02055890b239
+F src/build.c 8fc7133b6c1e757ac40c4c0d9bae106a9aac55ee
 F src/callback.c 0425c6320730e6d3981acfb9202c1bed9016ad1a
 F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
 F src/ctime.c 52ff72f966cee3087e0138a3ec69371c22be3c01
@@ -926,7 +926,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 242ce7cff416a87d57d4eb624cb79fa4e2215559
-R 4126212ea9377af4a6c83d929ba0db43
+P a89f24e2c9591d09cbe329895ceec87885059184
+R 4633b95d671699f85d5e19626e085a29
 U drh
-Z 5632e38bce7132d08196aa617cc89aa5
+Z a7a8333914941d20132af834f7ba9e5c
index 828e0e81f9b2aaf56276cd63898f018060b889e2..eaf1aefc85d6ea13df9b8e3331d9dffc1966d6cb 100644 (file)
@@ -1 +1 @@
-a89f24e2c9591d09cbe329895ceec87885059184
\ No newline at end of file
+a4c3ac989d4e93f0279172901b9ece822d137700
\ No newline at end of file
index 7e73b6a8ebb36d2b8a06641364d46c277fe6eccd..e45697b9f085b33d01fd7996d1ca6b532d8f0868 100644 (file)
@@ -414,14 +414,16 @@ void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
     /* Case 1:  Reset the single schema identified by iDb */
     Db *pDb = &db->aDb[iDb];
     assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
-    if( ALWAYS(pDb->pSchema) ){
-      sqlite3SchemaClear(pDb->pSchema);
-    }
+    assert( pDb->pSchema!=0 );
+    sqlite3SchemaClear(pDb->pSchema);
+
     /* If any database other than TEMP is reset, then also reset TEMP
     ** since TEMP might be holding triggers that reference tables in the
     ** other database.
     */
-    if( iDb!=1 && (pDb = &db->aDb[1])!=0 && ALWAYS(pDb->pSchema) ){
+    if( iDb!=1 ){
+      pDb = &db->aDb[1];
+      assert( pDb->pSchema!=0 );
       sqlite3SchemaClear(pDb->pSchema);
     }
     return;