3871 Vasil Dimov 2012-02-09
Fix Bug#13513676 INNODB_BUFFER_POOL_DUMP_STATUS IS NOT POPULATED WITHIN EXPECTED TIME
There is a tiny interval of time during startup when the status variable
'innodb_buffer_pool_dump_status' can be '' before it becomes 'not started'.
This patch makes the bug 100% reproducable:
--- cut ---
--- storage/innobase/buf/buf0dump.cc
+++ storage/innobase/buf/buf0dump.cc
@@ -577,12 +577,13 @@ DECLARE_THREAD(buf_dump_thread)(
/*============================*/
void* arg __attribute__((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
srv_buf_dump_thread_active = TRUE;
+ sleep(5);
buf_dump_status(STATUS_INFO, "not started");
buf_load_status(STATUS_INFO, "not started");
--- cut ---
It is not easy to assign a default value to this variable which to be
available before buf_dump_thread() starts, thus:
The solution is to use include/wait_for_status_var.inc to wait for the
variable to become 'not started'.
modified:
mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test
3870 Guilhem Bichot 2012-02-09 [merge]
merge from trunk
modified:
mysql-test/r/events_restart.result
mysql-test/t/events_restart.test
sql/events.cc
=== modified file 'mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test'
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test revid:guilhem.bichot@stripped
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test revid:vasil.dimov@stripped
@@ -13,6 +13,9 @@ SELECT @orig;
# 'Buffer pool(s) dump completed at ' left from previous runs because if
# it is then the following wait condition may be satisfied without the
# dump actually being complete and file_exists may fail.
+let $status_var = innodb_buffer_pool_dump_status;
+let $status_var_value = not started;
+-- source include/wait_for_status_var.inc
SELECT variable_value
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status';
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (vasil.dimov:3870 to 3871) Bug#13513676 | vasil.dimov | 10 Feb |