1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug #6849 "Crash while preparing query containing const expr with

IN and CONVERT_TZ()" (with after review changes).

Now we add implicitly used time zone tables to global table list right
at the parsing stage instead of doing it later in mysql_execute_command()
or in check_prepared_statement().

No special test-case needed since this bug also manifests itself as
timezone2.test failure if one runs it with --ps-protocol option.
This commit is contained in:
dlenev@brandersnatch.localdomain
2004-12-17 15:34:48 +03:00
parent 6461d209a5
commit c834a49b66
7 changed files with 41 additions and 31 deletions

View File

@ -1864,8 +1864,7 @@ bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
static void relink_tables_for_multidelete(THD *thd)
{
if (thd->lex->all_selects_list->next_select_in_list() ||
thd->lex->time_zone_tables_used)
if (thd->lex->all_selects_list->next_select_in_list())
{
for (SELECT_LEX *sl= thd->lex->all_selects_list;
sl;