aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-11-11 00:30:11 +0000
committerdrh <drh@noemail.net>2008-11-11 00:30:11 +0000
commitc717b382b80b9aeb8529f72fb0da5429054ea9f3 (patch)
treed52d7556b9415a78ec6e73869d344a98d15f3fda /src
parent753cc1077bd7cdc9334068c5aca200cc524126cb (diff)
downloadsqlite-c717b382b80b9aeb8529f72fb0da5429054ea9f3.tar.gz
sqlite-c717b382b80b9aeb8529f72fb0da5429054ea9f3.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell.c b/src/shell.c
index ea7b0a8af..b56e0c68a 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 <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;