Fix bug in anonymous subquery in a join. Parser requires a semicolon or
end-of-input before executing. (CVS 429) FossilOrigin-Name: c0e3f1c592f583a0659901743a368aff1927f1cb
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@
|
||||
** This file contains routines used for analyzing expressions and
|
||||
** for generating VDBE code that evaluates expressions in SQLite.
|
||||
**
|
||||
** $Id: expr.c,v 1.55 2002/03/06 03:08:26 drh Exp $
|
||||
** $Id: expr.c,v 1.56 2002/03/13 18:54:07 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -466,7 +466,7 @@ int sqliteExprResolveIds(
|
||||
}else{
|
||||
zTab = pTab->zName;
|
||||
}
|
||||
if( sqliteStrICmp(zTab, zLeft)!=0 ) continue;
|
||||
if( zTab==0 || sqliteStrICmp(zTab, zLeft)!=0 ) continue;
|
||||
if( 0==(cntTab++) ) pExpr->iTable = i + base;
|
||||
for(j=0; j<pTab->nCol; j++){
|
||||
if( sqliteStrICmp(pTab->aCol[j].zName, zRight)==0 ){
|
||||
|
||||
+5
-5
@@ -14,7 +14,7 @@
|
||||
** the parser. Lemon will also generate a header file containing
|
||||
** numeric codes for all of the tokens.
|
||||
**
|
||||
** @(#) $Id: parse.y,v 1.56 2002/03/05 01:11:14 drh Exp $
|
||||
** @(#) $Id: parse.y,v 1.57 2002/03/13 18:54:08 drh Exp $
|
||||
*/
|
||||
%token_prefix TK_
|
||||
%token_type {Token}
|
||||
@@ -48,10 +48,10 @@ input ::= cmdlist.
|
||||
// A list of commands is zero or more commands
|
||||
//
|
||||
cmdlist ::= ecmd.
|
||||
cmdlist ::= cmdlist SEMI ecmd.
|
||||
ecmd ::= explain cmd. {sqliteExec(pParse);}
|
||||
ecmd ::= cmd. {sqliteExec(pParse);}
|
||||
ecmd ::= .
|
||||
cmdlist ::= cmdlist ecmd.
|
||||
ecmd ::= explain cmd SEMI. {sqliteExec(pParse);}
|
||||
ecmd ::= cmd SEMI. {sqliteExec(pParse);}
|
||||
ecmd ::= SEMI.
|
||||
explain ::= EXPLAIN. {pParse->explain = 1;}
|
||||
|
||||
///////////////////// Begin and end transactions. ////////////////////////////
|
||||
|
||||
+2
-1
@@ -15,7 +15,7 @@
|
||||
** individual tokens and sends those tokens one-by-one over to the
|
||||
** parser for analysis.
|
||||
**
|
||||
** $Id: tokenize.c,v 1.38 2002/02/23 02:32:10 drh Exp $
|
||||
** $Id: tokenize.c,v 1.39 2002/03/13 18:54:08 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -421,6 +421,7 @@ int sqliteRunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
|
||||
}
|
||||
}
|
||||
if( zSql[i]==0 ){
|
||||
sqliteParser(pEngine, TK_SEMI, pParse->sLastToken, pParse);
|
||||
sqliteParser(pEngine, 0, pParse->sLastToken, pParse);
|
||||
if( pParse->zErrMsg && pParse->sErrToken.z ){
|
||||
sqliteSetNString(pzErrMsg, "near \"", -1,
|
||||
|
||||
Reference in New Issue
Block a user