aboutsummaryrefslogtreecommitdiff
path: root/src/complete.c
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2014-12-20 21:14:14 +0000
committermistachkin <mistachkin@noemail.net>2014-12-20 21:14:14 +0000
commitcd54bab6fe5946c641979abfe7e16c42cf9436f1 (patch)
tree2cfe345bd90dd357fa3bbd49cea81c2d5d6636df /src/complete.c
parent59871fe748429e26822293826b27017a7dae2ff7 (diff)
downloadsqlite-cd54bab6fe5946c641979abfe7e16c42cf9436f1.tar.gz
sqlite-cd54bab6fe5946c641979abfe7e16c42cf9436f1.zip
Minor fixes and enhancements to the SQLITE_ENABLE_API_ARMOR functionality.
FossilOrigin-Name: cb3e4219ac9560d2773b85453aafda54b7c9346f
Diffstat (limited to 'src/complete.c')
-rw-r--r--src/complete.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/complete.c b/src/complete.c
index c439cfe18..f7a35cc6f 100644
--- a/src/complete.c
+++ b/src/complete.c
@@ -105,13 +105,6 @@ int sqlite3_complete(const char *zSql){
u8 state = 0; /* Current state, using numbers defined in header comment */
u8 token; /* Value of the next token */
-#ifdef SQLITE_ENABLE_API_ARMOR
- if( zSql==0 ){
- (void)SQLITE_MISUSE_BKPT;
- return 0;
- }
-#endif
-
#ifndef SQLITE_OMIT_TRIGGER
/* A complex statement machine used to detect the end of a CREATE TRIGGER
** statement. This is the normal case.
@@ -141,6 +134,13 @@ int sqlite3_complete(const char *zSql){
};
#endif /* SQLITE_OMIT_TRIGGER */
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( zSql==0 ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+
while( *zSql ){
switch( *zSql ){
case ';': { /* A semicolon */