4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing:
7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give.
11 *************************************************************************
12 ** An tokenizer for SQL
14 ** This file contains C code that splits an SQL input string up into
15 ** individual tokens and sends those tokens one-by-one over to the
16 ** parser for analysis.
18 #include "sqliteInt.h"
21 /* Character classes for tokenizing
23 ** In the sqlite3GetToken() function, a switch() on aiClass[c] is implemented
24 ** using a lookup table, whereas a switch() directly on c uses a binary search.
25 ** The lookup table is much faster. To maximize speed, and to ensure that
26 ** a lookup table is used, all of the classes need to be small integers and
27 ** all of them need to be used within the switch.
29 #define CC_X 0 /* The letter 'x', or start of BLOB literal */
30 #define CC_KYWD 1 /* Alphabetics or '_'. Usable in a keyword */
31 #define CC_ID 2 /* unicode characters usable in IDs */
32 #define CC_DIGIT 3 /* Digits */
33 #define CC_DOLLAR 4 /* '$' */
34 #define CC_VARALPHA 5 /* '@', '#', ':'. Alphabetic SQL variables */
35 #define CC_VARNUM 6 /* '?'. Numeric SQL variables */
36 #define CC_SPACE 7 /* Space characters */
37 #define CC_QUOTE 8 /* '"', '\'', or '`'. String literals, quoted ids */
38 #define CC_QUOTE2 9 /* '['. [...] style quoted ids */
39 #define CC_PIPE 10 /* '|'. Bitwise OR or concatenate */
40 #define CC_MINUS 11 /* '-'. Minus or SQL-style comment */
41 #define CC_LT 12 /* '<'. Part of < or <= or <> */
42 #define CC_GT 13 /* '>'. Part of > or >= */
43 #define CC_EQ 14 /* '='. Part of = or == */
44 #define CC_BANG 15 /* '!'. Part of != */
45 #define CC_SLASH 16 /* '/'. / or c-style comment */
46 #define CC_LP 17 /* '(' */
47 #define CC_RP 18 /* ')' */
48 #define CC_SEMI 19 /* ';' */
49 #define CC_PLUS 20 /* '+' */
50 #define CC_STAR 21 /* '*' */
51 #define CC_PERCENT 22 /* '%' */
52 #define CC_COMMA 23 /* ',' */
53 #define CC_AND 24 /* '&' */
54 #define CC_TILDA 25 /* '~' */
55 #define CC_DOT 26 /* '.' */
56 #define CC_ILLEGAL 27 /* Illegal character */
58 static const unsigned char aiClass
[] = {
60 /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */
61 /* 0x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 7, 7, 27, 7, 7, 27, 27,
62 /* 1x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
63 /* 2x */ 7, 15, 8, 5, 4, 22, 24, 8, 17, 18, 21, 20, 23, 11, 26, 16,
64 /* 3x */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 19, 12, 14, 13, 6,
65 /* 4x */ 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
66 /* 5x */ 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 9, 27, 27, 27, 1,
67 /* 6x */ 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
68 /* 7x */ 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 27, 10, 27, 25, 27,
69 /* 8x */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
70 /* 9x */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
71 /* Ax */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
72 /* Bx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
73 /* Cx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
74 /* Dx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
75 /* Ex */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
76 /* Fx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
79 /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */
80 /* 0x */ 27, 27, 27, 27, 27, 7, 27, 27, 27, 27, 27, 27, 7, 7, 27, 27,
81 /* 1x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
82 /* 2x */ 27, 27, 27, 27, 27, 7, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
83 /* 3x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
84 /* 4x */ 7, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26, 12, 17, 20, 10,
85 /* 5x */ 24, 27, 27, 27, 27, 27, 27, 27, 27, 27, 15, 4, 21, 18, 19, 27,
86 /* 6x */ 11, 16, 27, 27, 27, 27, 27, 27, 27, 27, 27, 23, 22, 1, 13, 6,
87 /* 7x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 8, 5, 5, 5, 8, 14, 8,
88 /* 8x */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27,
89 /* 9x */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27,
90 /* Ax */ 27, 25, 1, 1, 1, 1, 1, 0, 1, 1, 27, 27, 27, 27, 27, 27,
91 /* Bx */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 9, 27, 27, 27, 27, 27,
92 /* Cx */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27,
93 /* Dx */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27,
94 /* Ex */ 27, 27, 1, 1, 1, 1, 1, 0, 1, 1, 27, 27, 27, 27, 27, 27,
95 /* Fx */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 27, 27, 27, 27, 27,
100 ** The charMap() macro maps alphabetic characters (only) into their
101 ** lower-case ASCII equivalent. On ASCII machines, this is just
102 ** an upper-to-lower case map. On EBCDIC machines we also need
103 ** to adjust the encoding. The mapping is only valid for alphabetics
104 ** which are the only characters for which this feature is used.
106 ** Used by keywordhash.h
109 # define charMap(X) sqlite3UpperToLower[(unsigned char)X]
112 # define charMap(X) ebcdicToAscii[(unsigned char)X]
113 const unsigned char ebcdicToAscii
[] = {
114 /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
115 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x */
116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 1x */
117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2x */
118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3x */
119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4x */
120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5x */
121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, /* 6x */
122 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 7x */
123 0, 97, 98, 99,100,101,102,103,104,105, 0, 0, 0, 0, 0, 0, /* 8x */
124 0,106,107,108,109,110,111,112,113,114, 0, 0, 0, 0, 0, 0, /* 9x */
125 0, 0,115,116,117,118,119,120,121,122, 0, 0, 0, 0, 0, 0, /* Ax */
126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* Bx */
127 0, 97, 98, 99,100,101,102,103,104,105, 0, 0, 0, 0, 0, 0, /* Cx */
128 0,106,107,108,109,110,111,112,113,114, 0, 0, 0, 0, 0, 0, /* Dx */
129 0, 0,115,116,117,118,119,120,121,122, 0, 0, 0, 0, 0, 0, /* Ex */
130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* Fx */
135 ** The sqlite3KeywordCode function looks up an identifier to determine if
136 ** it is a keyword. If it is a keyword, the token code of that keyword is
137 ** returned. If the input is not a keyword, TK_ID is returned.
139 ** The implementation of this routine was generated by a program,
140 ** mkkeywordhash.c, located in the tool subdirectory of the distribution.
141 ** The output of the mkkeywordhash.c program is written into a file
142 ** named keywordhash.h and then included into this source file by
143 ** the #include below.
145 #include "keywordhash.h"
149 ** If X is a character that can be used in an identifier then
150 ** IdChar(X) will be true. Otherwise it is false.
152 ** For ASCII, any character with the high-order bit set is
153 ** allowed in an identifier. For 7-bit characters,
154 ** sqlite3IsIdChar[X] must be 1.
156 ** For EBCDIC, the rules are more complex but have the same
159 ** Ticket #1066. the SQL standard does not allow '$' in the
160 ** middle of identifiers. But many SQL implementations do.
161 ** SQLite will allow '$' in identifiers for compatibility.
162 ** But the feature is undocumented.
165 #define IdChar(C) ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)
168 const char sqlite3IsEbcdicIdChar
[] = {
169 /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
170 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 4x */
171 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, /* 5x */
172 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, /* 6x */
173 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, /* 7x */
174 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, /* 8x */
175 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, /* 9x */
176 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, /* Ax */
177 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* Bx */
178 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, /* Cx */
179 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, /* Dx */
180 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, /* Ex */
181 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* Fx */
183 #define IdChar(C) (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
186 /* Make the IdChar function accessible from ctime.c */
187 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
188 int sqlite3IsIdChar(u8 c
){ return IdChar(c
); }
193 ** Return the length (in bytes) of the token that begins at z[0].
194 ** Store the token type in *tokenType before returning.
196 int sqlite3GetToken(const unsigned char *z
, int *tokenType
){
198 switch( aiClass
[*z
] ){ /* Switch on the character-class of the first byte
199 ** of the token. See the comment on the CC_ defines
202 testcase( z
[0]==' ' );
203 testcase( z
[0]=='\t' );
204 testcase( z
[0]=='\n' );
205 testcase( z
[0]=='\f' );
206 testcase( z
[0]=='\r' );
207 for(i
=1; sqlite3Isspace(z
[i
]); i
++){}
208 *tokenType
= TK_SPACE
;
213 for(i
=2; (c
=z
[i
])!=0 && c
!='\n'; i
++){}
214 *tokenType
= TK_SPACE
; /* IMP: R-22934-25134 */
217 *tokenType
= TK_MINUS
;
229 *tokenType
= TK_SEMI
;
233 *tokenType
= TK_PLUS
;
237 *tokenType
= TK_STAR
;
241 if( z
[1]!='*' || z
[2]==0 ){
242 *tokenType
= TK_SLASH
;
245 for(i
=3, c
=z
[2]; (c
!='*' || z
[i
]!='/') && (c
=z
[i
])!=0; i
++){}
247 *tokenType
= TK_SPACE
; /* IMP: R-22934-25134 */
256 return 1 + (z
[1]=='=');
266 *tokenType
= TK_LSHIFT
;
278 *tokenType
= TK_RSHIFT
;
287 *tokenType
= TK_ILLEGAL
;
296 *tokenType
= TK_BITOR
;
299 *tokenType
= TK_CONCAT
;
304 *tokenType
= TK_COMMA
;
308 *tokenType
= TK_BITAND
;
312 *tokenType
= TK_BITNOT
;
317 testcase( delim
=='`' );
318 testcase( delim
=='\'' );
319 testcase( delim
=='"' );
320 for(i
=1; (c
=z
[i
])!=0; i
++){
330 *tokenType
= TK_STRING
;
336 *tokenType
= TK_ILLEGAL
;
341 #ifndef SQLITE_OMIT_FLOATING_POINT
342 if( !sqlite3Isdigit(z
[1]) )
348 /* If the next character is a digit, this is a floating point
349 ** number that begins with ".". Fall thru into the next case */
352 testcase( z
[0]=='0' ); testcase( z
[0]=='1' ); testcase( z
[0]=='2' );
353 testcase( z
[0]=='3' ); testcase( z
[0]=='4' ); testcase( z
[0]=='5' );
354 testcase( z
[0]=='6' ); testcase( z
[0]=='7' ); testcase( z
[0]=='8' );
355 testcase( z
[0]=='9' );
356 *tokenType
= TK_INTEGER
;
357 #ifndef SQLITE_OMIT_HEX_INTEGER
358 if( z
[0]=='0' && (z
[1]=='x' || z
[1]=='X') && sqlite3Isxdigit(z
[2]) ){
359 for(i
=3; sqlite3Isxdigit(z
[i
]); i
++){}
363 for(i
=0; sqlite3Isdigit(z
[i
]); i
++){}
364 #ifndef SQLITE_OMIT_FLOATING_POINT
367 while( sqlite3Isdigit(z
[i
]) ){ i
++; }
368 *tokenType
= TK_FLOAT
;
370 if( (z
[i
]=='e' || z
[i
]=='E') &&
371 ( sqlite3Isdigit(z
[i
+1])
372 || ((z
[i
+1]=='+' || z
[i
+1]=='-') && sqlite3Isdigit(z
[i
+2]))
376 while( sqlite3Isdigit(z
[i
]) ){ i
++; }
377 *tokenType
= TK_FLOAT
;
380 while( IdChar(z
[i
]) ){
381 *tokenType
= TK_ILLEGAL
;
387 for(i
=1, c
=z
[0]; c
!=']' && (c
=z
[i
])!=0; i
++){}
388 *tokenType
= c
==']' ? TK_ID
: TK_ILLEGAL
;
392 *tokenType
= TK_VARIABLE
;
393 for(i
=1; sqlite3Isdigit(z
[i
]); i
++){}
399 testcase( z
[0]=='$' ); testcase( z
[0]=='@' );
400 testcase( z
[0]==':' ); testcase( z
[0]=='#' );
401 *tokenType
= TK_VARIABLE
;
402 for(i
=1; (c
=z
[i
])!=0; i
++){
405 #ifndef SQLITE_OMIT_TCL_VARIABLE
406 }else if( c
=='(' && n
>0 ){
409 }while( (c
=z
[i
])!=0 && !sqlite3Isspace(c
) && c
!=')' );
413 *tokenType
= TK_ILLEGAL
;
416 }else if( c
==':' && z
[i
+1]==':' ){
423 if( n
==0 ) *tokenType
= TK_ILLEGAL
;
427 for(i
=1; aiClass
[z
[i
]]<=CC_KYWD
; i
++){}
429 /* This token started out using characters that can appear in keywords,
430 ** but z[i] is a character not allowed within keywords, so this must
431 ** be an identifier instead */
436 return keywordCode((char*)z
, i
, tokenType
);
439 #ifndef SQLITE_OMIT_BLOB_LITERAL
440 testcase( z
[0]=='x' ); testcase( z
[0]=='X' );
442 *tokenType
= TK_BLOB
;
443 for(i
=2; sqlite3Isxdigit(z
[i
]); i
++){}
444 if( z
[i
]!='\'' || i
%2 ){
445 *tokenType
= TK_ILLEGAL
;
446 while( z
[i
] && z
[i
]!='\'' ){ i
++; }
452 /* If it is not a BLOB literal, then it must be an ID, since no
453 ** SQL keywords start with the letter 'x'. Fall through */
460 *tokenType
= TK_ILLEGAL
;
464 while( IdChar(z
[i
]) ){ i
++; }
470 ** Run the parser on the given SQL string. The parser structure is
471 ** passed in. An SQLITE_ status code is returned. If an error occurs
472 ** then an and attempt is made to write an error message into
473 ** memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that
476 int sqlite3RunParser(Parse
*pParse
, const char *zSql
, char **pzErrMsg
){
477 int nErr
= 0; /* Number of errors encountered */
478 void *pEngine
; /* The LEMON-generated LALR(1) parser */
479 int n
= 0; /* Length of the next token token */
480 int tokenType
; /* type of the next token */
481 int lastTokenParsed
= -1; /* type of the previous token */
482 sqlite3
*db
= pParse
->db
; /* The database connection */
483 int mxSqlLen
; /* Max length of an SQL string */
484 #ifdef sqlite3Parser_ENGINEALWAYSONSTACK
485 yyParser sEngine
; /* Space to hold the Lemon-generated Parser object */
489 mxSqlLen
= db
->aLimit
[SQLITE_LIMIT_SQL_LENGTH
];
490 if( db
->nVdbeActive
==0 ){
491 db
->u1
.isInterrupted
= 0;
493 pParse
->rc
= SQLITE_OK
;
494 pParse
->zTail
= zSql
;
495 assert( pzErrMsg
!=0 );
496 /* sqlite3ParserTrace(stdout, "parser: "); */
497 #ifdef sqlite3Parser_ENGINEALWAYSONSTACK
499 sqlite3ParserInit(pEngine
);
501 pEngine
= sqlite3ParserAlloc(sqlite3Malloc
);
504 return SQLITE_NOMEM_BKPT
;
507 assert( pParse
->pNewTable
==0 );
508 assert( pParse
->pNewTrigger
==0 );
509 assert( pParse
->nVar
==0 );
510 assert( pParse
->pVList
==0 );
513 n
= sqlite3GetToken((u8
*)zSql
, &tokenType
);
516 pParse
->rc
= SQLITE_TOOBIG
;
520 /* Upon reaching the end of input, call the parser two more times
521 ** with tokens TK_SEMI and 0, in that order. */
522 if( lastTokenParsed
==TK_SEMI
){
524 }else if( lastTokenParsed
==0 ){
531 if( tokenType
>=TK_SPACE
){
532 assert( tokenType
==TK_SPACE
|| tokenType
==TK_ILLEGAL
);
533 if( db
->u1
.isInterrupted
){
534 pParse
->rc
= SQLITE_INTERRUPT
;
537 if( tokenType
==TK_ILLEGAL
){
538 sqlite3ErrorMsg(pParse
, "unrecognized token: \"%.*s\"", n
, zSql
);
543 pParse
->sLastToken
.z
= zSql
;
544 pParse
->sLastToken
.n
= n
;
545 sqlite3Parser(pEngine
, tokenType
, pParse
->sLastToken
, pParse
);
546 lastTokenParsed
= tokenType
;
548 if( pParse
->rc
!=SQLITE_OK
|| db
->mallocFailed
) break;
552 pParse
->zTail
= zSql
;
553 #ifdef YYTRACKMAXSTACKDEPTH
554 sqlite3_mutex_enter(sqlite3MallocMutex());
555 sqlite3StatusHighwater(SQLITE_STATUS_PARSER_STACK
,
556 sqlite3ParserStackPeak(pEngine
)
558 sqlite3_mutex_leave(sqlite3MallocMutex());
560 #ifdef sqlite3Parser_ENGINEALWAYSONSTACK
561 sqlite3ParserFinalize(pEngine
);
563 sqlite3ParserFree(pEngine
, sqlite3_free
);
565 if( db
->mallocFailed
){
566 pParse
->rc
= SQLITE_NOMEM_BKPT
;
568 if( pParse
->rc
!=SQLITE_OK
&& pParse
->rc
!=SQLITE_DONE
&& pParse
->zErrMsg
==0 ){
569 pParse
->zErrMsg
= sqlite3MPrintf(db
, "%s", sqlite3ErrStr(pParse
->rc
));
571 assert( pzErrMsg
!=0 );
572 if( pParse
->zErrMsg
){
573 *pzErrMsg
= pParse
->zErrMsg
;
574 sqlite3_log(pParse
->rc
, "%s", *pzErrMsg
);
578 if( pParse
->pVdbe
&& pParse
->nErr
>0 && pParse
->nested
==0 ){
579 sqlite3VdbeDelete(pParse
->pVdbe
);
582 #ifndef SQLITE_OMIT_SHARED_CACHE
583 if( pParse
->nested
==0 ){
584 sqlite3DbFree(db
, pParse
->aTableLock
);
585 pParse
->aTableLock
= 0;
586 pParse
->nTableLock
= 0;
589 #ifndef SQLITE_OMIT_VIRTUALTABLE
590 sqlite3_free(pParse
->apVtabLock
);
593 if( !IN_DECLARE_VTAB
){
594 /* If the pParse->declareVtab flag is set, do not delete any table
595 ** structure built up in pParse->pNewTable. The calling code (see vtab.c)
596 ** will take responsibility for freeing the Table structure.
598 sqlite3DeleteTable(db
, pParse
->pNewTable
);
601 if( pParse
->pWithToFree
) sqlite3WithDelete(db
, pParse
->pWithToFree
);
602 sqlite3DeleteTrigger(db
, pParse
->pNewTrigger
);
603 sqlite3DbFree(db
, pParse
->pVList
);
604 while( pParse
->pAinc
){
605 AutoincInfo
*p
= pParse
->pAinc
;
606 pParse
->pAinc
= p
->pNext
;
607 sqlite3DbFreeNN(db
, p
);
609 while( pParse
->pZombieTab
){
610 Table
*p
= pParse
->pZombieTab
;
611 pParse
->pZombieTab
= p
->pNextZombie
;
612 sqlite3DeleteTable(db
, p
);
614 assert( nErr
==0 || pParse
->rc
!=SQLITE_OK
);