mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function or setting of @@time_zone variable we should open and lock them with the rest of statement's table (so we should add them to global table list) and after that use such pre-opened tables for loading info about time zones.
This commit is contained in:
@ -1407,7 +1407,8 @@ static int send_prepare_results(Prepared_statement *stmt, bool text_protocol)
|
||||
DBUG_PRINT("enter",("command: %d, param_count: %ld",
|
||||
sql_command, stmt->param_count));
|
||||
|
||||
if (select_lex != lex->all_selects_list &&
|
||||
if ((&lex->select_lex != lex->all_selects_list ||
|
||||
lex->time_zone_tables_used) &&
|
||||
lex->unit.create_total_list(thd, lex, &tables))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
|
Reference in New Issue
Block a user