mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Do not ignore alias "a" in a query of the form "SELECT ... FROM (...) AS a" Fix for #3935. Also expand upon (6751) to fix some similar obscure memory leaks. (CVS 6831)
FossilOrigin-Name: 42f9d1e56483a59353bff57d75f09ed67e1d9c3c
This commit is contained in:
11
src/build.c
11
src/build.c
@@ -22,7 +22,7 @@
|
||||
** COMMIT
|
||||
** ROLLBACK
|
||||
**
|
||||
** $Id: build.c,v 1.554 2009/06/25 11:50:21 drh Exp $
|
||||
** $Id: build.c,v 1.555 2009/07/01 14:56:40 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -3221,8 +3221,13 @@ SrcList *sqlite3SrcListAppendFromTerm(
|
||||
pItem->zAlias = sqlite3NameFromToken(db, pAlias);
|
||||
}
|
||||
pItem->pSelect = pSubquery;
|
||||
pItem->pOn = pOn;
|
||||
pItem->pUsing = pUsing;
|
||||
if( p->nSrc>1 ){
|
||||
pItem->pOn = pOn;
|
||||
pItem->pUsing = pUsing;
|
||||
}else{
|
||||
sqlite3ExprDelete(db, pOn);
|
||||
sqlite3IdListDelete(db, pUsing);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user