Compute the correct column name even if the column identifier is the
very last token in the SQL statement. This fixes a problem introduced by check-in [0fdf97efe5df745510c6b] and reported by the community during beta-testing. FossilOrigin-Name: 36b89d728ff13d395fe0e1db8e7c01263f73dccb278b3ece27f6ef78e909b492
This commit is contained in:
+5
-2
@@ -31,8 +31,11 @@
|
||||
//
|
||||
%syntax_error {
|
||||
UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
|
||||
assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */
|
||||
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
|
||||
if( TOKEN.z[0] ){
|
||||
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
|
||||
}else{
|
||||
sqlite3ErrorMsg(pParse, "incomplete input");
|
||||
}
|
||||
}
|
||||
%stack_overflow {
|
||||
sqlite3ErrorMsg(pParse, "parser stack overflow");
|
||||
|
||||
Reference in New Issue
Block a user