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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user