Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
This is reported by David.Hall
Re: working_tpch1_compareLogOnly/onClauseJoins/bug4031.sql query one gets a different answer than InfiniDB. It looks like another case where InfiniDB's optimizer is conflicting with MariaDB's optimizer and moving things to the inside of a join when they should stay outside.
This was indeed the same bug that optimized when it shouldn't. The shortcut I took before wasn't good enough. A full search of the list is needed.
// MariaDB 10.1: cached_table is never available for derived tables. |
// Find the uncached object in table_list |
TABLE_LIST* tblList = ifp->context ? ifp->context->table_list : NULL;
|
while (tblList) |
{
|
if (strcasecmp(tblList->alias, ifp->table_name) == 0) |
{
|
if (!tblList->outer_join) |
{
|
sc->derivedTable(derivedName);
|
sc->derivedRefCol(cols[j].get());
|
}
|
break; |
}
|
tblList = tblList->next_local;
|
}
|