1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

MCOL-23 working_tpch1_compareLogOnly/onClauseJoins/bug4031.sql: A better solution

This commit is contained in:
David Hall
2016-05-23 18:41:00 -05:00
parent 71ecd3212b
commit 4ba6ce790e

View File

@@ -1604,16 +1604,18 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp)
// @bug5634, @bug5635. mark used derived col on derived table. // @bug5634, @bug5635. mark used derived col on derived table.
// outer join inner table filter can not be moved in // outer join inner table filter can not be moved in
// MariaDB 10.1: cached_table is never true for derived tables. // MariaDB 10.1: cached_table is never available for derived tables.
// Find another way to determine outer_join // Find the uncached object in table_list
TABLE_LIST* tblList = ifp->context->table_list; TABLE_LIST* tblList = ifp->context->table_list;
while (tblList) while (tblList)
{ {
if (strcasecmp(tblList->alias, ifp->table_name) == 0 && if (strcasecmp(tblList->alias, ifp->table_name) == 0)
!tblList->outer_join)
{ {
sc->derivedTable(derivedName); if (!tblList->outer_join)
sc->derivedRefCol(cols[j].get()); {
sc->derivedTable(derivedName);
sc->derivedRefCol(cols[j].get());
}
break; break;
} }
tblList = tblList->next_local; tblList = tblList->next_local;