1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +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

@@ -2114,19 +2114,6 @@ mysql_execute_command(THD *thd)
}
#endif /* !HAVE_REPLICATION */
if (lex->time_zone_tables_used)
{
TABLE_LIST *tmp;
if ((tmp= my_tz_get_table_list(thd, &lex->query_tables_last)) ==
&fake_time_zone_tables_list)
{
DBUG_RETURN(-1);
}
lex->time_zone_tables_used= tmp;
if (!all_tables)
all_tables= tmp;
}
/*
When option readonly is set deny operations which change tables.
Except for the replication thread and the 'super' users.