]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
In the sqldiff program, make sure the first argument to the db_prepare()
authordrh <drh@noemail.net>
Fri, 8 Jul 2016 02:14:24 +0000 (02:14 +0000)
committerdrh <drh@noemail.net>
Fri, 8 Jul 2016 02:14:24 +0000 (02:14 +0000)
utility function is always a valid format string.

FossilOrigin-Name: 8bb8d886ffa948cd7bc66c8c62da76bce233be2e

manifest
manifest.uuid
tool/sqldiff.c

index eae430df419d751ac01553c65d1c3370dfc54ada..9d64eac70043ba0ba99b5c25d8f7b2c18dbd4977 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sthe\sSQLITE_DBSTATUS_CACHE_USED_SHARED\ssqlite3_db_status()\sparameter.\sThis\soption\sis\ssimilar\sto\sDBSTATUS_CACHE_USED,\sexcept\sthat\sit\sdivides\smemory\sused\sby\sshared\scaches\sevenly\sbetween\sall\sconnections.
-D 2016-07-06T18:42:34.265
+C In\sthe\ssqldiff\sprogram,\smake\ssure\sthe\sfirst\sargument\sto\sthe\sdb_prepare()\nutility\sfunction\sis\salways\sa\svalid\sformat\sstring.
+D 2016-07-08T02:14:24.531
 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
@@ -1471,7 +1471,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
 F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
-F tool/sqldiff.c 131e9c6e09d3d78e3c4ae8b5fd23451521723aac
+F tool/sqldiff.c af5d80cdc88a91a0f3cccfaa316b5a27b213568a
 F tool/srcck1.c 4c39bdfa9a92edd20233ee720df84dbeb2417602
 F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
 F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
@@ -1504,8 +1504,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 0c228f5d3db1be598ebf5d9170428c19d18e01ad d58401ab26c7c5417eb7d540f47d11c4e49edcb2
-R b82357a7b430039c936434bd64729f72
-T +closed d58401ab26c7c5417eb7d540f47d11c4e49edcb2
-U dan
-Z cd4dfb8a318d1cd48c9fef00f9959964
+P 06cf2680588c8dc4f0cbde275a09cfdcb5943268
+R 0ae6fb283ae848ac01b5c1982f5ece36
+U drh
+Z fc8cced580b536f398169074b70b6b16
index 445104cad7f05914a12940e4b7d0371612c0b14a..cad934d3a4ba3edf43c0a7b8b948a5bd0d428321 100644 (file)
@@ -1 +1 @@
-06cf2680588c8dc4f0cbde275a09cfdcb5943268
\ No newline at end of file
+8bb8d886ffa948cd7bc66c8c62da76bce233be2e
\ No newline at end of file
index 4a5389c6032b8ba992e0afbecf7b3b6fa96b2d14..dbdf726df091a6c5d31bc47f97ff493e15c704a8 100644 (file)
@@ -684,7 +684,7 @@ static void diff_one_table(const char *zTab, FILE *out){
 
   /* Run the query and output differences */
   if( !g.bSchemaOnly ){
-    pStmt = db_prepare(sql.z);
+    pStmt = db_prepare("%s", sql.z);
     while( SQLITE_ROW==sqlite3_step(pStmt) ){
       int iType = sqlite3_column_int(pStmt, nPk);
       if( iType==1 || iType==2 ){
@@ -1461,7 +1461,7 @@ static void summarize_one_table(const char *zTab, FILE *out){
   }
 
   /* Run the query and output difference summary */
-  pStmt = db_prepare(sql.z);
+  pStmt = db_prepare("%s", sql.z);
   nUpdate = 0;
   nInsert = 0;
   nDelete = 0;
@@ -2018,7 +2018,7 @@ int main(int argc, char **argv){
     xDiff(zTab, out);
   }else{
     /* Handle tables one by one */
-    pStmt = db_prepare( all_tables_sql() );
+    pStmt = db_prepare("%s", all_tables_sql() );
     while( SQLITE_ROW==sqlite3_step(pStmt) ){
       xDiff((const char*)sqlite3_column_text(pStmt,0), out);
     }