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:
@ -735,9 +735,8 @@ typedef struct st_lex
|
||||
/* Names of user variables holding parameters (in EXECUTE) */
|
||||
List<LEX_STRING> prepared_stmt_params;
|
||||
/*
|
||||
If points to fake_time_zone_tables_list indicates that time zone
|
||||
tables are implicitly used by statement, also is used for holding
|
||||
list of those tables after they are opened.
|
||||
Points to part of global table list which contains time zone tables
|
||||
implicitly used by the statement.
|
||||
*/
|
||||
TABLE_LIST *time_zone_tables_used;
|
||||
sp_head *sphead;
|
||||
@ -802,6 +801,7 @@ typedef struct st_lex
|
||||
*(table->prev_global= query_tables_last)= table;
|
||||
query_tables_last= &table->next_global;
|
||||
}
|
||||
bool add_time_zone_tables_to_query_tables(THD *thd);
|
||||
|
||||
bool can_be_merged();
|
||||
bool can_use_merged();
|
||||
@ -810,7 +810,6 @@ typedef struct st_lex
|
||||
bool need_correct_ident();
|
||||
} LEX;
|
||||
|
||||
extern TABLE_LIST fake_time_zone_tables_list;
|
||||
struct st_lex_local: public st_lex
|
||||
{
|
||||
static void *operator new(size_t size)
|
||||
|
Reference in New Issue
Block a user