- 09 Mar, 2007 1 commit
-
-
unknown authored
The problem was that some facilities (like CONVERT_TZ() function or server HELP statement) may require implicit access to some tables in 'mysql' database. This access was done by ordinary means of adding such tables to the list of tables the query is going to open. However, if we issued LOCK TABLES before that, we would get "table was not locked" error trying to open such implicit tables. The solution is to treat certain tables as MySQL system tables, like we already do for mysql.proc. Such tables may be opened for reading at any moment regardless of any locks in effect. The cost of this is that system table may be locked for writing only together with other system tables, it is disallowed to lock system tables for writing and have any other lock on any other table. After this patch the following tables are treated as MySQL system tables: mysql.help_category mysql.help_keyword mysql.help_relation mysql.help_topic mysql.proc (it already was) mysql.time_zone mysql.time_zone_leap_second mysql.time_zone_name mysql.time_zone_transition mysql.time_zone_transition_type These tables are now opened with open_system_tables_for_read() and closed with close_system_tables(), or one table may be opened with open_system_table_for_update() and closed with close_thread_tables() (the latter is used for mysql.proc table, which is updated as part of normal MySQL server operation). These functions may be used when some tables were opened and locked already. NOTE: online update of time zone tables is not possible during replication, because there's no time zone cache flush neither on LOCK TABLES, nor on FLUSH TABLES, so the master may serve stale time zone data from cache, while on slave updated data will be loaded from the time zone tables. mysql-test/r/help.result: Update result. mysql-test/r/lock.result: Update result. mysql-test/r/sp-error.result: Update result. mysql-test/r/timezone2.result: Add result for bug#9953: CONVERT_TZ requires mysql.time_zone_name to be locked. mysql-test/r/view.result: Update result: use table t3 rather than utilize MySQL system table. mysql-test/t/help.test: Test that we can use HELP even under LOCK TABLES. mysql-test/t/lock.test: Test LOCK TABLE on system tables. mysql-test/t/timezone2.test: Add test case for bug#9953: CONVERT_TZ requires mysql.time_zone_name to be locked. mysql-test/t/view.test: Update test: use table t3 rather that utilize MySQL system table. sql/handler.h: Fix comment for 'count' parameter of check_if_locking_is_allowed(). Add 'current' and 'system_count' parameters. sql/item_create.cc: We no longer have LEX::add_time_zone_tables_to_query_tables(). sql/item_timefunc.cc: We no longer have LEX::time_zone_tables_used, so Item_func_convert_tz::fix_fields() became the same as base Item_date_func::fix_fields(). my_tz_find() no longer takes table list, but takes THD pointer now. sql/item_timefunc.h: Remove dead field and method. sql/lock.cc: Pass values for 'current' and 'system_count' to check_if_locking_is_allowed(). sql/log_event.cc: We no longer have my_tz_find_with_opening_tz_tables(), its functions is performed by my_tz_find(). sql/mysql_priv.h: Add functions to work with MySQL system tables. sql/set_var.cc: my_tz_find() no longer takes table list, but takes THD pointer now. sql/sp.cc: Remove close_proc_table(). Use close_system_tables() instead. Use open_system_tables_for_read() and open_system_table_for_update(). sql/sp.h: Remove close_proc_table() declaration. sql/sql_base.cc: Add implementation of open_system_tables_for_read(), close_system_tables(), open_system_table_for_update(). sql/sql_help.cc: Operate on MySQL system tables mysql.help_* with open_system_tables_for_read() and close_system_tables() to allow the usage of HELP statement under LOCK TABLES. sql/sql_lex.cc: Remove LEX::time_zone_tables_used and LEX::add_time_zone_tables_to_query_tables() which are no longer used. sql/sql_lex.h: Remove LEX::time_zone_tables_used and LEX::add_time_zone_tables_to_query_tables() which are no longer used. sql/sql_parse.cc: Remove references to LEX::time_zone_tables_used and my_tz_check_n_skip_implicit_tables() which are no longer used. sql/sql_show.cc: Use close_system_tables() instead of removed close_proc_table(). sql/sql_view.cc: LEX::time_zone_tables_used is no longer there. sql/sql_yacc.yy: LEX::add_time_zone_tables_to_query_tables() is no longer there. sql/table.cc: Add more tables that should be treated as MySQL system tables. sql/share/errmsg.txt: Change the error message, as now we allow write-locking of several system tables if not mixed with ordinary tables. sql/tztime.cc: Do not add time zone tables to the list of query tables in tz_init_table_list(). Remove fake_time_zone_tables_list and my_tz_get_tables_list(). In my_tz_init(), open mysql.time_zone_leap_second with simple_open_n_lock_tables(), but pass time zone name to my_tz_find(), which will open and close time zone tables as necessary. In tz_load_from_open_tables() do not call table->use_all_columns(), as this was already done in open_system_tables_for_read(). my_tz_find() takes THD pointer instead of table list, and calls open_system_tables_for_read() and close_system_tables() as necessary. Remove my_tz_find_with_opening_tz_tables(). sql/tztime.h: Remove declarations of my_tz_get_table_list(), my_tz_find_with_opening_tz_tables(), fake_time_zone_tables_list, definition of my_tz_check_n_skip_implicit_tables(). Update prototype for my_tz_find(). storage/csv/ha_tina.cc: Add new parameters to check_if_locking_is_allowed(). storage/csv/ha_tina.h: Add new parameters to check_if_locking_is_allowed(). storage/myisam/ha_myisam.cc: Add new parameters to check_if_locking_is_allowed(). In this function we count system tables. If there are system tables, but there are also non-system tables, we report an error. storage/myisam/ha_myisam.h: Add new parameters to check_if_locking_is_allowed().
-
- 28 Feb, 2007 1 commit
-
-
unknown authored
therefore the logic associated with it never worked. sql/ha_partition.cc: Remove dead code. Update comments. sql/mysql_priv.h: Remove dead code (flush_version). sql/mysqld.cc: Remove dead code (flush_version). sql/sql_base.cc: Remove dead code. sql/table.cc: Remove dead code. sql/table.h: Remove dead code.
-
- 24 Feb, 2007 6 commits
-
-
unknown authored
wrapped by DBUG_ASSERT().
-
unknown authored
-
unknown authored
into booka.opbmk:/home/alik/Documents/MySQL/devel/5.1-rt-im mysql-test/mysql-test-run.pl: Auto merged server-tools/instance-manager/instance_options.cc: Manual merge server-tools/instance-manager/mysqlmanager.cc: Manual merge.
-
unknown authored
server-tools/instance-manager/mysqlmanager.cc: Delete IM-angel pid file on exit.
-
unknown authored
Log messages from shell-scripts were put to var/log/<test id>.log file. Now, this file is used by mysql-test-run.pl. So, move log messages to var/log/<test id>.script.log. mysql-test/t/kill_n_check.sh: Log messages from shell-scripts were put to var/log/<test id>.log file. Now, this file is used by mysql-test-run.pl. So, move log messages to var/log/<test id>.script.log. mysql-test/t/log.sh: Log messages from shell-scripts were put to var/log/<test id>.log file. Now, this file is used by mysql-test-run.pl. So, move log messages to var/log/<test id>.script.log. mysql-test/t/wait_for_process.sh: Log messages from shell-scripts were put to var/log/<test id>.log file. Now, this file is used by mysql-test-run.pl. So, move log messages to var/log/<test id>.script.log. mysql-test/t/wait_for_socket.sh: Log messages from shell-scripts were put to var/log/<test id>.log file. Now, this file is used by mysql-test-run.pl. So, move log messages to var/log/<test id>.script.log.
-
unknown authored
-
- 23 Feb, 2007 8 commits
-
-
unknown authored
mysql-test/mysql-test-run.pl: Fix merge. mysql-test/r/im_utils.result: Updated result file.
-
unknown authored
into alik.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-build mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/im_daemon_life_cycle.result: Merged.
-
unknown authored
'shutdown_delay' option name. mysql-test/mysql-test-run.pl: IM in 5.0 uses old incorrect 'shutdown_delay' option name.
-
unknown authored
-
unknown authored
into alik.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-build mysql-test/r/view.result: Auto merged mysql-test/t/view.test: Auto merged
-
unknown authored
which accidentally got broken during the merge on 16-Feb-2007. mysql-test/r/view.result: Updated result file. mysql-test/t/view.test: Fix test for views with national characters, which accidentally got broken during the merge on 16-Feb-2007. Now view.test is in UTF8 character set, so SET NAMES is required.
-
unknown authored
into alik.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt mysql-test/mysql-test-run.pl: Auto merged mysql-test/t/im_daemon_life_cycle.imtest: Merged.
-
unknown authored
Fix timeouts. Only test suite is changed. mysql-test/mysql-test-run.pl: Decrease MySQL server shutdown delay. Trasactional storage engines are not used here, so it should be enough. mysql-test/t/im_daemon_life_cycle.imtest: Increase wait-timeout.
-
- 22 Feb, 2007 4 commits
-
-
unknown authored
-
unknown authored
into alik.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merge sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_subselect.h: Auto merged sql/mysql_priv.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/t/disabled.def: Merge: enabled im_daemon_life_cycle.imtest mysql-test/t/view.test: Manual merge. server-tools/instance-manager/listener.cc: Manual merge. server-tools/instance-manager/manager.cc: Manual merge. server-tools/instance-manager/manager.h: Manual merge. server-tools/instance-manager/mysqlmanager.cc: Manual merge. server-tools/instance-manager/thread_registry.cc: Manual merge. server-tools/instance-manager/thread_registry.h: Manual merge.
-
unknown authored
server-tools/instance-manager/angel.cc: Include my_dir.h because MacOS defines mode constants (S_IRUSR, S_IWUSR, ...) in sys/stat.h.
-
unknown authored
-
- 21 Feb, 2007 1 commit
-
-
unknown authored
into naruto.:C:/cpp/mysql-5.1-runtime mysys/my_wincond.c: Auto merged include/my_pthread.h: SCCS merged
-
- 20 Feb, 2007 5 commits
-
-
unknown authored
The cause of im_daemon_life_cycle.imtest random failures was the following behaviour of some implementations of LINUX threads: let's suppose that a process has several threads (in LINUX threads, there is a separate process for each thread). When the main process gets killed, the parent receives SIGCHLD before all threads (child processes) die. In other words, the parent receives SIGCHLD, when its child is not completely dead. In terms of IM, that means that IM-angel receives SIGCHLD when IM-main is not dead and still holds some resources. After receiving SIGCHLD, IM-angel restarts IM-main, but IM-main failed to initialize, because previous instance (copy) of IM-main still holds server socket (TCP-port). Another problem here was that IM-angel restarted IM-main only if it was killed by signal. If it exited with error, IM-angel thought it's intended / graceful shutdown and exited itself. So, when the second instance of IM-main failed to initialize, IM-angel thought it's intended shutdown and quit. The fix is 1. to change IM-angel so that it restarts IM-main if it exited with error code; 2. to change IM-main so that it returns proper exit code in case of failure. mysql-test/t/disabled.def: Enable im_daemon_life_cycle. server-tools/instance-manager/listener.cc: Set error status if Listener failed to initialize. server-tools/instance-manager/manager.cc: Return exit code from the manager. server-tools/instance-manager/manager.h: Return exit code from the manager. server-tools/instance-manager/mysqlmanager.cc: 1. Restart IM-main if exit code is not EXIT_SUCCESS (0). 2. Log IM-main exit code in case of failure. server-tools/instance-manager/thread_registry.cc: Add support for exit code. server-tools/instance-manager/thread_registry.h: Add support for exit code.
-
unknown authored
1. use MySQL headers instead of system ones; 2. move logical part of code into a separate function. server-tools/instance-manager/angel.cc: Polishing: try not to use system headers. Use headers from include/ directory when it is possible. server-tools/instance-manager/manager.cc: Polishing: move logical part of code into a separate function. server-tools/instance-manager/manager.h: Polishing: move logical part of code into a separate function. server-tools/instance-manager/mysqlmanager.cc: Polishing: rollback rename.
-
unknown authored
-
unknown authored
server-tools/instance-manager/WindowsService.cpp: Include my_global.h for DBUG_ASSERT. server-tools/instance-manager/mysqlmanager.cc: Include my_dir.h for umask().
-
unknown authored
into kpdesk.mysql.com:/home/thek/dev/mysql-5.1-runtime sql/sql_parse.cc: SCCS merged
-
- 19 Feb, 2007 8 commits
-
-
unknown authored
into kpdesk.mysql.com:/home/thek/dev/mysql-5.1-runtime sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged
-
unknown authored
- Merged from 5.0 - Removed redundant call to set_time(); now included in init_for_queries sql/ha_ndbcluster.cc: Removed redundant call to set_time(); now included in init_for_queries sql/ha_ndbcluster_binlog.cc: Removed redundant call to set_time(); now included in init_for_queries
-
unknown authored
into kpdesk.mysql.com:/home/thek/dev/mysql-5.0-runtime sql/sql_parse.cc: Auto merged
-
unknown authored
into kpdesk.mysql.com:/home/thek/dev/bug23240/my51-bug23240 sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged
-
unknown authored
- Starting time of a query sent by bootstrapping wasn't initialized and starting time defaulted to 0. This later used value by NOW- item and was translated to 1970-01-01 11:00:00. - Marketing the time with thd->set_time() before the call to mysql_parse resolves this issue. - set_time was refactored to be part of the thd->init_for_queries- process. mysql-test/r/init_file.result: Manual merge from 4.1 mysql-test/std_data/init_file.dat: Manual merge from 4.1 sql/sql_class.cc: - Moved set_time into init_for_queries process.
-
unknown authored
-
unknown authored
into kpdesk.mysql.com:/home/thek/dev/bug23240/my50-bug23240 mysql-test/t/init_file.test: Auto merged BitKeeper/deleted/.del-init_file.result: Auto merged mysql-test/std_data/init_file.dat: Null merge sql/sql_parse.cc: Null merge
-
unknown authored
- Starting time of a query sent by file bootstrapping wasn't initialized and starting time defaulted to 0. This later used value by the Now- item and is translated to 1970-01-01 11:00:00. - marking the time with thd->set_time() before the call to mysql_parse resolves this issue. mysql-test/r/init_file.result: Appended test case mysql-test/std_data/init_file.dat: Appended test case mysql-test/t/init_file.test: Appended test case
-
- 18 Feb, 2007 1 commit
-
-
unknown authored
im_daemon_life_cycle fails randomly. 1. Move IM-angel functionality into a separate file, create Angel class. 2. Be more verbose; 3. Fix typo in FLUSH INSTANCES implementation; 4. Polishing. mysql-test/r/im_options.result: Updated result file. mysql-test/t/im_cmd_line.imtest: Updated test. server-tools/instance-manager/IMService.cpp: Move HandleServiceOptions() into IMService::main(). server-tools/instance-manager/IMService.h: Move HandleServiceOptions() into IMService::main(). server-tools/instance-manager/Makefile.am: Added angel.cc and angel.h. server-tools/instance-manager/WindowsService.cpp: Initialize class-members in constructor. server-tools/instance-manager/WindowsService.h: Initialize class-members in constructor. server-tools/instance-manager/commands.cc: Return actual error code (ER_OUT_OF_RESOURCES or ER_THERE_IS_ACTIVE_INSTANCE) from FLUSH INSTANCES. server-tools/instance-manager/manager.cc: 1. Return actual error code from Manager::flush_instances(). 2. Be more verbose. server-tools/instance-manager/manager.h: Return actual error code from Manager::flush_instances(). server-tools/instance-manager/mysqlmanager.cc: Move IM-angel functionality into separate file (angel.cc). server-tools/instance-manager/priv.cc: Use return bool datatype instead int{ 0, 1 }. server-tools/instance-manager/priv.h: Use return bool datatype instead int{ 0, 1 }. server-tools/instance-manager/angel.cc: IM-angel functionality. server-tools/instance-manager/angel.h: IM-angel functionality.
-
- 16 Feb, 2007 3 commits
-
-
unknown authored
-
unknown authored
into weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_subselect.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_yacc.yy: Auto merged
-
unknown authored
-
- 15 Feb, 2007 2 commits
-
-
unknown authored
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge mysql-test/r/subselect.result: Auto merged mysql-test/t/ps_1general.test: Auto merged mysql-test/t/subselect.test: Auto merged sql/event_data_objects.cc: Auto merged sql/event_queue.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_subselect.h: Auto merged sql/set_var.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_yacc.yy: Auto merged
-
unknown authored
- The condition variable implementation "lost" a signal to WaitOnSingleObject when a semaphore was released. - The signal could be consumed by a new call to pthread_cond_wait before all waiting threads had awoken. - The new implementation of pthread_cond_* uses events instead of semaphores. It also uses an extra lock to protect entry into new cond wait before the broadcast has finished. include/my_pthread.h: - New implementatin of pthread_cond_init. This version uses events instead of semaphores mysys/my_wincond.c: - New implementatin of pthread_cond_init. This version uses events instead of semaphores
-