MXS-1248: Further modifications for CTE
- Fields in CTEs are marked as being used in subselects. - In qc_mysqlembedded all selects must be walked if CTE is present. - In qc_sqlite unions need special handling.
This commit is contained in:
@ -1081,7 +1081,7 @@ static void update_field_infos_from_with(QC_SQLITE_INFO* info,
|
||||
|
||||
if (pCte->pSelect)
|
||||
{
|
||||
update_field_infos_from_select(info, pCte->pSelect, QC_USED_IN_SELECT, NULL);
|
||||
update_field_infos_from_select(info, pCte->pSelect, QC_USED_IN_SUBSELECT, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1487,6 +1487,11 @@ static void update_field_infos_from_select(QC_SQLITE_INFO* info,
|
||||
{
|
||||
update_field_infos_from_with(info, pSelect->pWith);
|
||||
}
|
||||
|
||||
if ((pSelect->op == TK_UNION) && pSelect->pPrior)
|
||||
{
|
||||
update_field_infos_from_select(info, pSelect->pPrior, usage, pExclude);
|
||||
}
|
||||
}
|
||||
|
||||
static void update_database_names(QC_SQLITE_INFO* info, const char* zDatabase)
|
||||
|
Reference in New Issue
Block a user