1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +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:
dlenev@brandersnatch.localdomain
2004-08-10 12:42:31 +04:00
parent bcbbfc3bb8
commit f49d4f5350
20 changed files with 314 additions and 198 deletions

View File

@ -633,6 +633,12 @@ typedef struct st_lex
bool prepared_stmt_code_is_varref;
/* 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.
*/
TABLE_LIST *time_zone_tables_used;
st_lex() {}
inline void uncacheable(uint8 cause)
{
@ -661,6 +667,7 @@ typedef struct st_lex
TABLE_LIST *local_first);
} LEX;
extern TABLE_LIST fake_time_zone_tables_list;
void lex_init(void);
void lex_free(void);