]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the CLI so that it does not terminate input when an Oracle or MS-SQL
authordrh <drh@noemail.net>
Tue, 11 Nov 2008 00:30:11 +0000 (00:30 +0000)
committerdrh <drh@noemail.net>
Tue, 11 Nov 2008 00:30:11 +0000 (00:30 +0000)
command terminator mark is seen in the middle of a string literal.
Ticket #3490. (CVS 5878)

FossilOrigin-Name: 68662e3b487b80b2c94cd2376060388bd8df0e4e

manifest
manifest.uuid
src/shell.c

index beb1130dcc84f8baab76ecb7f4fa7ff14aa6cbb5..6c920c7bacccc3e25daad8fe8348b7e3ab864b2c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C When\san\sOOM\serror\soccurs\swhile\sresizing\san\ssqlite_value\sobject,\smake\ssure\nthe\svalue\sof\sthe\sobject\sis\sset\sto\sNULL.\s\sTicket\s#3488.\s(CVS\s5877)
-D 2008-11-11T00:21:30
+C Fix\sthe\sCLI\sso\sthat\sit\sdoes\snot\sterminate\sinput\swhen\san\sOracle\sor\sMS-SQL\ncommand\sterminator\smark\sis\sseen\sin\sthe\smiddle\sof\sa\sstring\sliteral.\nTicket\s#3490.\s(CVS\s5878)
+D 2008-11-11T00:30:12
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 48172b58e444a9725ec482e0c022a564749acab4
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -149,7 +149,7 @@ F src/printf.c 785f87120589c1db672e37c6eb1087c456e6f84d
 F src/random.c a87afbd598aa877e23ac676ee92fd8ee5c786a51
 F src/resolve.c 266bb03d2b456fe68f5df2dd5687e7e88ff8088d
 F src/select.c 0d79c6c0b48b9d67a443853fd6add8c2967ba870
-F src/shell.c d83b578a8ccdd3e0e7fef4388a0887ce9f810967
+F src/shell.c 33ae5c8ce9e8b1d02e0cd510b3b9de18e3c414ba
 F src/sqlite.h.in b73e17f40b0dcfc4b17f5ef18ba90bca8d1e8bc5
 F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
 F src/sqliteInt.h 1e112bd969e0b318c8ee13d7104d4ae0a30da822
@@ -654,7 +654,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 806b6ed202292e386ac3e51cebcfb67f3870cd2f
-R d1d72399c4198836cc46e37f71d2e131
+P 7b9c9b35fffb233e76148182426199d51243fba7
+R c81008349e7f2ff2bbba5c47baedbce9
 U drh
-Z ffa9723504b4d99f03db9e73564e4aa9
+Z ed387cb6e57045ecd55977a2a2952399
index bc8a5afab87079893839f6213b69e64429ddcd21..a265a5db7cab967249927fb9e4f9798225c63177 100644 (file)
@@ -1 +1 @@
-7b9c9b35fffb233e76148182426199d51243fba7
\ No newline at end of file
+68662e3b487b80b2c94cd2376060388bd8df0e4e
\ No newline at end of file
index ea7b0a8aff84dfe5030fd5798cac87fca85f005f..b56e0c68a84155dfc1a524e5f9b56c15da4f2f13 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains code to implement the "sqlite" command line
 ** utility for accessing SQLite databases.
 **
-** $Id: shell.c,v 1.185 2008/08/11 19:12:35 drh Exp $
+** $Id: shell.c,v 1.186 2008/11/11 00:30:12 drh Exp $
 */
 #include <stdlib.h>
 #include <string.h>
@@ -1699,7 +1699,7 @@ static int process_input(struct callback_data *p, FILE *in){
       }
       continue;
     }
-    if( _is_command_terminator(zLine) ){
+    if( _is_command_terminator(zLine) && sqlite3_complete(zSql) ){
       memcpy(zLine,";",2);
     }
     nSqlPrior = nSql;