diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-12-17 15:34:48 +0300 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-12-17 15:34:48 +0300 |
commit | bc152db57932ffec118a11ad9607fb99d9d2bdd4 (patch) | |
tree | 577624a5e1b07aa6fa2e71cc63e8ca25649164a8 /sql/tztime.cc | |
parent | 9a3de9447460e33a9f318c9b33bc96558eabe5d1 (diff) | |
download | mariadb-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.cc')
-rw-r--r-- | sql/tztime.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index 50c496577e0..2c25c647a19 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1440,6 +1440,12 @@ tz_init_table_list(TABLE_LIST *tz_tabs, TABLE_LIST ***global_next_ptr) /* + Fake table list object, pointer to which is returned by + my_tz_get_tables_list() as indication of error. +*/ +TABLE_LIST fake_time_zone_tables_list; + +/* Create table list with time zone related tables and add it to the end of global table list. |