1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-5039: incorrect Item_func_regex::update_used_tables()

Other fix of maybe_null problem and revert of revno: 3608 "MDEV-3873 & MDEV-3876 & MDEV-3912 : Wrong result (extra rows) with ALL subquery from a MERGE view."
This commit is contained in:
unknown
2013-09-25 15:30:13 +03:00
parent 779003e180
commit ec7da1561e
17 changed files with 135 additions and 170 deletions

View File

@@ -622,6 +622,15 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
sl->context.outer_context= 0;
// Prepare underlying views/DT first.
sl->handle_derived(lex, DT_PREPARE);
if (derived->outer_join)
{
/* Mark that table is part of OUTER JOIN and fields may be NULL */
for (TABLE_LIST *cursor= (TABLE_LIST*) sl->table_list.first;
cursor;
cursor= cursor->next_local)
cursor->outer_join|= JOIN_TYPE_OUTER;
}
}
unit->derived= derived;
@@ -716,6 +725,10 @@ exit:
/* Add new temporary table to list of open derived tables */
table->next= thd->derived_tables;
thd->derived_tables= table;
/* If table is used by a left join, mark that any column may be null */
if (derived->outer_join)
table->maybe_null= 1;
}
if (arena)
thd->restore_active_arena(arena, &backup);