mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Disable the query flattener optimization for SELECT statements that are on
the RHS of vector IN operators. This is a hack that fixes the bug described in ticket [da7841375186386c]. A better solution that does not disable the query flattener is needed, but this will server for the time being. FossilOrigin-Name: 005d5b870625d175fdf3c0e87d974006c569d9e1
This commit is contained in:
@ -446,6 +446,7 @@ static int codeEqualityTerm(
|
||||
}else{
|
||||
Select *pSelect = pX->x.pSelect;
|
||||
sqlite3 *db = pParse->db;
|
||||
u16 savedDbOptFlags = db->dbOptFlags;
|
||||
ExprList *pOrigRhs = pSelect->pEList;
|
||||
ExprList *pOrigLhs = pX->pLeft->x.pList;
|
||||
ExprList *pRhs = 0; /* New Select.pEList for RHS */
|
||||
@ -489,7 +490,9 @@ static int codeEqualityTerm(
|
||||
testcase( aiMap==0 );
|
||||
}
|
||||
pSelect->pEList = pRhs;
|
||||
db->dbOptFlags |= SQLITE_QueryFlattener;
|
||||
eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap);
|
||||
db->dbOptFlags = savedDbOptFlags;
|
||||
testcase( aiMap!=0 && aiMap[0]!=0 );
|
||||
pSelect->pEList = pOrigRhs;
|
||||
pLeft->x.pList = pOrigLhs;
|
||||
|
Reference in New Issue
Block a user