From: drh Date: Tue, 11 Nov 2008 00:30:11 +0000 (+0000) Subject: Fix the CLI so that it does not terminate input when an Oracle or MS-SQL X-Git-Tag: version-3.6.10~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c717b382b80b9aeb8529f72fb0da5429054ea9f3;p=thirdparty%2Fsqlite.git Fix the CLI so that it does not terminate input when an Oracle or MS-SQL command terminator mark is seen in the middle of a string literal. Ticket #3490. (CVS 5878) FossilOrigin-Name: 68662e3b487b80b2c94cd2376060388bd8df0e4e --- diff --git a/manifest b/manifest index beb1130dcc..6c920c7bac 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index bc8a5afab8..a265a5db7c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7b9c9b35fffb233e76148182426199d51243fba7 \ No newline at end of file +68662e3b487b80b2c94cd2376060388bd8df0e4e \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index ea7b0a8aff..b56e0c68a8 100644 --- a/src/shell.c +++ b/src/shell.c @@ -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 #include @@ -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;