summaryrefslogtreecommitdiff
path: root/sql/tztime.h
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-12-17 15:34:48 +0300
committerunknown <dlenev@brandersnatch.localdomain>2004-12-17 15:34:48 +0300
commitbc152db57932ffec118a11ad9607fb99d9d2bdd4 (patch)
tree577624a5e1b07aa6fa2e71cc63e8ca25649164a8 /sql/tztime.h
parent9a3de9447460e33a9f318c9b33bc96558eabe5d1 (diff)
downloadmariadb-git-bc152db57932ffec118a11ad9607fb99d9d2bdd4.tar.gz
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. sql/sql_base.cc: relink_tables_for_multidelete(): presence of implicitly used time zone tables is no longer condition for propagation of TABLE pointers from global table list to local table lists (since now global list is always created...) sql/sql_lex.cc: - Added LEX::add_time_zone_tables_to_query_tables() function which adds implicitly used time zone tables to global table list. - Definition of fake_time_zone_tables_list moved to tztime.cc, since it is no longer used in parser. sql/sql_lex.h: - Since now we add implicitly used time zone tables right at parsing stage, LEX::time_zone_tables_used is either zero or points to valid time zone tables list. Updated its description to reflect that. - Added LEX::add_time_zone_tables_to_query_tables() function which adds implicitly used time zone tables to global table list. - Declaration of fake_time_zone_tables_list moved to tztime.h, since it is no longer used in parser. sql/sql_parse.cc: mysql_execute_command(): Removed adding list of implicitly used time zone tables to global table list, since now we do this right at the parsing stage. sql/sql_yacc.yy: Let us 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(). sql/tztime.cc: Moved fake_time_zone_tables_list definition from sql_lex.cc to tztime.cc since now it is used only for error reporting from my_tz_get_table_list() function. sql/tztime.h: Moved fake_time_zone_tables_list declaration from sql_lex.h to tztime.h since now it is used only for error reporting from my_tz_get_table_list() function.
Diffstat (limited to 'sql/tztime.h')
-rw-r--r--sql/tztime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/tztime.h b/sql/tztime.h
index 6d2388bb160..07e9146c6e9 100644
--- a/sql/tztime.h
+++ b/sql/tztime.h
@@ -64,6 +64,7 @@ extern Time_zone * my_tz_find(const String *name, TABLE_LIST *tz_tables);
extern my_bool my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap);
extern void my_tz_free();
+extern TABLE_LIST fake_time_zone_tables_list;
/*
Check if we have pointer to the beggining of list of implictly used