mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
3a793b9d4d
feature_dynamic_columns,feature_fulltext,feature_gis,feature_locale,feature_subquery,feature_timezone,feature_trigger,feature_xml Opened_views, Executed_triggers, Executed_events Added new process status 'updating status' as part of 'freeing items' mysql-test/r/features.result: Test of feature_xxx status variables mysql-test/r/mysqld--help.result: Removed duplicated 'language' variable. mysql-test/r/view.result: Test of opened_views mysql-test/suite/rpl/t/rpl_start_stop_slave.test: Write more information on failure mysql-test/t/features.test: Test of feature_xxx status variables mysql-test/t/view.test: Test of opened_views sql/event_scheduler.cc: Increment executed_events status variable sql/field.cc: Increment status variable sql/item_func.cc: Increment status variable sql/item_strfunc.cc: Increment status variable sql/item_subselect.cc: Increment status variable sql/item_xmlfunc.cc: Increment status variable sql/mysqld.cc: Add new status variables to 'show status' sql/mysqld.h: Added executed_events sql/sql_base.cc: Increment status variable sql/sql_class.h: Add new status variables sql/sql_parse.cc: Added new process status 'updating status' as part of 'freeing items' sql/sql_trigger.cc: Increment status variable sql/sys_vars.cc: Increment status variable sql/tztime.cc: Increment status variable
57 lines
1.8 KiB
Text
57 lines
1.8 KiB
Text
#
|
|
#BUG#11752315 : STOP SLAVE UNABLE TO COMPLETE WHEN SLAVE THREAD IS TRYING
|
|
# TO RECONNECT TO
|
|
#
|
|
# ==== Purpose ====
|
|
#
|
|
#Tests that the slave does not go to a sleep for a long duration after the
|
|
#master is killed and we do a START_SLAVE and STOP_SLAVE.
|
|
#
|
|
# ==== Method ====
|
|
#
|
|
#This is a new functionality of having an interruptable sleep of the slave.
|
|
#We find the thread id for the slave thread. On finding the thread ID of the
|
|
#slave thread we kill the slave thread. A successful kill in less than 60 sec
|
|
#should serve the purpose of checking the functionality.
|
|
#
|
|
|
|
--source include/have_log_bin.inc
|
|
--source include/master-slave.inc
|
|
|
|
connection slave;
|
|
--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
|
|
|
|
if(!$connection_id)
|
|
{
|
|
# Something went wrong (timing)
|
|
# Show process list so that we can debug. In this case we will abort with
|
|
# wrong result
|
|
-- echo "Could not find connect id. Dumping process list for debugging"
|
|
SELECT * FROM information_schema.processlist;
|
|
exit;
|
|
}
|
|
|
|
set @time_before_kill := (select CURRENT_TIMESTAMP);
|
|
|
|
--echo [Time before the query]
|
|
--echo [Connection ID of the slave I/O thread found]
|
|
|
|
--replace_regex /kill [0-9]*/kill <connection_id>/
|
|
--eval kill $connection_id
|
|
let $wait_condition= SELECT COUNT(*) = 0 FROM information_schema.processlist where id=$connection_id;
|
|
--source include/wait_condition.inc
|
|
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
|
|
|
--echo [Time after the query]
|
|
|
|
if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
|
|
{
|
|
--echo # assert : The difference between the timestamps 'time_after_kill' and 'time_before_kill' should be less than 60sec.
|
|
--die
|
|
}
|
|
--echo [Killing of the slave IO thread was successful]
|
|
|
|
START SLAVE IO_THREAD;
|
|
|
|
# End of test
|
|
--source include/rpl_end.inc
|