mariadb/scripts
unknown 68d7b26698 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.


mysql-test/r/timezone2.result:
  Added test for bug #4508
mysql-test/t/timezone2.test:
  Added test for bug #4508
scripts/mysql_create_system_tables.sh:
  Added one more test time zone to time zone tables which is needed for test for bug #4508.
sql/item_create.cc:
  CONVERT_TZ() now is treated as special function.
sql/item_create.h:
  CONVERT_TZ() now is treated as special function.
sql/item_timefunc.cc:
  Item_func_convert_tz now uses list of pre-opened time zone tables instead of trying to
  open them ad-hoc. Also it avoid calling of current_thd.
sql/item_timefunc.h:
  Added comment describing special nature of CONVERT_TZ() function.
  Optimization: Added own fix_fields() method and tz_tables member for caching pointer
  to list of open time zone tables to Item_func_convert_tz class.
sql/lex.h:
  CONVERT_TZ() now is treated as special function.
sql/mysql_priv.h:
  Removed function which is no longer used.
sql/set_var.cc:
  Now my_tz_find() accepts list of pre-opened time zone tables as last argument 
  and no longer needs pointer to current THD.
sql/set_var.h:
  Exported sys_time_zone, which is now used in sql_yacc.yy for quick finding out if we are
  setting @@time_zone variable.
sql/sql_base.cc:
  Moved propagation of pointers to open tables from global list to local select lists to
  open_and_lock_tables(), also added implicit usage of time zone tables as condition for
  such propagation.
sql/sql_lex.cc:
  Added fake_time_zone_tables_list which is used to indicate that time zone tables are
  implicitly used in statement.
  st_select_lex_unit::create_total_list(): if time zone tables are implicitly used in
  statement add them to global tables list.
sql/sql_lex.h:
  Added LEX::time_zone_tables_used member which is used to indicate that time zone tables 
  are implicitly used in this statement (by pointing to fake_time_zone_table_list) and 
  for holding pointer to those tables after they've been opened.
sql/sql_parse.cc:
  We should also create global table list if statement uses time zone tables implicitly.
  Added initialization of LEX::time_zone_tables_used to mysql_query_init().
sql/sql_prepare.cc:
  We should also create global table list if statement uses time zone tables implicitly.
sql/sql_select.cc:
  Removed functions which are no longer used.
sql/sql_yacc.yy:
  CONVERT_TZ() and @@time_zone variable are handled in special way since they implicitly 
  use time zone tables.
sql/tztime.cc:
  Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
  If statement uses CONVERT_TZ() function or @@time_zone variable is set then it implicitly
  uses time zone tables. We need to open and lock such tables with all other tables of 
  such statement.
  
  All code responsible for opening table was removed from tz_load_from_db() and function was 
  renamed to tz_load_from_open_tables() (which uses list of pre-opened tables).
  We also have new functions for construction and initialization of table list of time
  zone tables.
  my_tz_find() now always require list of pre-opened time zone tables and no longer needs
  current THD. So we have to pre-open them in my_tz_init().
  Also now we try to open time zone tables only if they were found during startup.
sql/tztime.h:
  New function for construction of table list of time zone tables my_tz_get_table_list().
  Now my_tz_find() requires list of pre-pened time zone tables instead of current thread.
2004-08-10 12:42:31 +04:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
fill_func_tables.sh Added missing root user to mysql.user on windows. (Bug #4242) 2004-06-25 18:49:36 +03:00
fill_help_tables.sh - reverted change to fill_help_tables.sh ("Added checking of maximum 2004-04-30 14:31:52 +02:00
make_binary_distribution.sh - added mysql_tzinfo_to_sql to binary distributions 2004-06-24 09:22:45 +02:00
make_sharedlib_distribution.sh - added make_sharedlib_distribution.sh to the source distribution 2003-10-08 12:35:24 +02:00
make_win_binary_distribution.sh Add missing .cnf files to windows installation (Bug #4216) 2004-06-25 18:54:43 +03:00
make_win_src_distribution.sh Fix to be able to cross-compile for modesto 2004-06-27 18:20:06 +03:00
Makefile.am merge with 4.0 2004-02-22 09:50:59 +02:00
msql2mysql.sh Import changeset 2000-07-31 21:29:14 +02:00
mysql_config.sh \| is sed is on-portable 2004-02-20 12:02:34 +01:00
mysql_convert_table_format.sh - fixed typo in scripts/mysql_convert_table_format.sh 2002-10-18 19:43:06 +02:00
mysql_create_system_tables.sh Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server". 2004-08-10 12:42:31 +04:00
mysql_explain_log.sh - applied patch to mysql_explain_log.sh provided by Dennis Haney 2003-06-11 13:40:20 +02:00
mysql_find_rows.sh Fix skipp -> skip once and for all. 2004-06-03 11:52:54 -05:00
mysql_fix_extensions.sh mysql_fix_extensions.sh tool copied from 4.0 tree (referenced in manual). 2002-05-16 10:13:42 +10:00
mysql_fix_privilege_tables.sh mysql_fix_privilege_tables.sh: 2004-07-14 11:33:00 -05:00
mysql_fix_privilege_tables.sql Message/comment touchup. 2004-06-28 11:26:54 -05:00
mysql_install_db.sh Added missing root user to mysql.user on windows. (Bug #4242) 2004-06-25 18:49:36 +03:00
mysql_prepare_privilege_tables_for_5.sql a script that fixes anti-GRANT'ness of privilege tables. 2003-11-25 16:08:55 +01:00
mysql_secure_installation.sh added to mysql_secure_installation 2003-10-24 15:20:46 -04:00
mysql_setpermission.sh - Applied patch provided by Martin Mokrejs <mmokrejs@natur.cuni.cz> 2003-04-25 21:58:25 +02:00
mysql_tableinfo.sh Small fixes in mysql_tableinfo. It's only code tiny changes, does not modify 2003-03-14 16:07:15 +01:00
mysql_zap.sh Minor tweaks to help message of obscure script. 2004-04-04 18:48:41 -05:00
mysqlaccess.conf configure fixes 2000-09-14 15:10:06 +03:00
mysqlaccess.sh Fix to get correct metadata when using temporary tables to create result. (Bug #2654) 2004-03-30 19:24:28 +03:00
mysqlbug.sh merge with 3.23 2004-03-25 22:05:09 +02:00
mysqld_multi.sh Merge with 4.0 2004-04-26 15:53:31 +03:00
mysqld_safe-watch.sh Changed safe_mysqld -> mysqld_safe 2001-06-28 10:49:16 +03:00
mysqld_safe.sh warn about multiple mysqld --user parameters only if their arguments differ 2004-06-10 13:56:58 +02:00
mysqldumpslow.sh Fixed myslqdumpslow for new log format. 2002-03-26 11:54:05 +02:00
mysqlhotcopy.sh - Avoid the error message "Can't read index header from..." 2004-07-15 21:18:31 +02:00