mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/r/explain.result Text conflict in mysql-test/r/having.result Text conflict in mysql-test/suite/rpl/t/disabled.def Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test Text conflict in storage/federated/ha_federated.cc
This commit is contained in:
@ -241,10 +241,12 @@ STOP SLAVE;
|
||||
SET GLOBAL storage_engine=@storage_engine;
|
||||
START SLAVE;
|
||||
================ BUG#22864 ================
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
START SLAVE;
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SET AUTOCOMMIT=0;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
@ -264,15 +266,6 @@ t1
|
||||
t2
|
||||
t3
|
||||
t4
|
||||
SELECT TABLE_NAME,ENGINE
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_NAME LIKE 't_'
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME ENGINE
|
||||
t1 MyISAM
|
||||
t2 InnoDB
|
||||
t3 InnoDB
|
||||
t4 InnoDB
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
@ -334,15 +327,6 @@ t1
|
||||
t2
|
||||
t3
|
||||
t4
|
||||
SELECT TABLE_NAME,ENGINE
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_NAME LIKE 't_'
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME ENGINE
|
||||
t1 MyISAM
|
||||
t2 InnoDB
|
||||
t3 InnoDB
|
||||
t4 InnoDB
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
|
42
mysql-test/suite/rpl/r/rpl_show_slave_running.result
Normal file
42
mysql-test/suite/rpl/r/rpl_show_slave_running.result
Normal file
@ -0,0 +1,42 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
include/stop_slave.inc
|
||||
SELECT GET_LOCK("debug_lock.before_get_running_status_yes", 1000);
|
||||
GET_LOCK("debug_lock.before_get_running_status_yes", 1000)
|
||||
1
|
||||
set global debug= 'd,debug_lock.before_get_running_status_yes';
|
||||
Slave_running, Slave_IO_Running, Slave_SQL_Running, must be OFF, NO, NO in three following queries
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
Variable_name Value
|
||||
Slave_running OFF
|
||||
Slave_IO_Running= No
|
||||
Slave_SQL_Running= No
|
||||
start slave io_thread;
|
||||
Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF NO NO in three following queries
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
Variable_name Value
|
||||
Slave_running OFF
|
||||
Slave_IO_Running= No
|
||||
Slave_SQL_Running= No
|
||||
SELECT RELEASE_LOCK("debug_lock.before_get_running_status_yes");
|
||||
RELEASE_LOCK("debug_lock.before_get_running_status_yes")
|
||||
1
|
||||
Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF YES NO in three following queries
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
Variable_name Value
|
||||
Slave_running OFF
|
||||
Slave_IO_Running= Yes
|
||||
Slave_SQL_Running= No
|
||||
start slave sql_thread;
|
||||
Slave_running, Slave_IO_Running, Slave_SQL_Running must be ON, YES, YES in three following queries
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
Variable_name Value
|
||||
Slave_running ON
|
||||
Slave_IO_Running= Yes
|
||||
Slave_SQL_Running= Yes
|
||||
set global debug= '';
|
||||
End of tests
|
@ -12,4 +12,5 @@
|
||||
|
||||
rpl_get_master_version_and_clock: # Bug#46931 2009-10-17 joro rpl.rpl_get_master_version_and_clock fails
|
||||
rpl_row_create_table : Bug#45576 2009-12-01 joro rpl_row_create_table fails on PB2
|
||||
rpl_row_create_table : Bug#51574 Feb 27 2010 andrei failed different way than earlier with bug#45576
|
||||
rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
|
||||
|
@ -136,13 +136,9 @@ START SLAVE;
|
||||
# BUG#22864 (Rollback following CREATE ... SELECT discards 'CREATE
|
||||
# table' from log):
|
||||
--echo ================ BUG#22864 ================
|
||||
connection slave;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
connection master;
|
||||
RESET MASTER;
|
||||
connection slave;
|
||||
START SLAVE;
|
||||
|
||||
--source include/master-slave-reset.inc
|
||||
|
||||
connection master;
|
||||
SET AUTOCOMMIT=0;
|
||||
CREATE TABLE t1 (a INT);
|
||||
@ -160,10 +156,6 @@ INSERT INTO t1 VALUES (4),(5),(6);
|
||||
ROLLBACK;
|
||||
|
||||
SHOW TABLES;
|
||||
SELECT TABLE_NAME,ENGINE
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_NAME LIKE 't_'
|
||||
ORDER BY TABLE_NAME;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
SELECT * FROM t3 ORDER BY a;
|
||||
@ -173,10 +165,6 @@ SELECT * FROM t4 ORDER BY a;
|
||||
SHOW BINLOG EVENTS FROM 107;
|
||||
sync_slave_with_master;
|
||||
SHOW TABLES;
|
||||
SELECT TABLE_NAME,ENGINE
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_NAME LIKE 't_'
|
||||
ORDER BY TABLE_NAME;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
SELECT * FROM t3 ORDER BY a;
|
||||
|
76
mysql-test/suite/rpl/t/rpl_show_slave_running.test
Normal file
76
mysql-test/suite/rpl/t/rpl_show_slave_running.test
Normal file
@ -0,0 +1,76 @@
|
||||
#
|
||||
# Bug #30703 SHOW STATUS LIKE 'Slave_running' is not compatible with `SHOW SLAVE STATUS'
|
||||
# The test verifies that SHOW STATUS LIKE 'Slave_running' displays ON
|
||||
# if and only if `SHOW SLAVE STATUS' displays YES for Slave_IO_Running and Slave_SQL_Running
|
||||
#
|
||||
source include/master-slave.inc;
|
||||
source include/have_debug.inc;
|
||||
|
||||
connection slave;
|
||||
|
||||
source include/stop_slave.inc;
|
||||
let $debug_saved= `select @@global.debug`;
|
||||
let $debug_lock= "debug_lock.before_get_running_status_yes";
|
||||
eval SELECT GET_LOCK($debug_lock, 1000);
|
||||
set global debug= 'd,debug_lock.before_get_running_status_yes';
|
||||
|
||||
# Test 1. Slave is stopped
|
||||
|
||||
--echo Slave_running, Slave_IO_Running, Slave_SQL_Running, must be OFF, NO, NO in three following queries
|
||||
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
let $status= query_get_value("show slave status", Slave_IO_Running, 1);
|
||||
echo Slave_IO_Running= $status;
|
||||
let $status= query_get_value("show slave status", Slave_SQL_Running, 1);
|
||||
echo Slave_SQL_Running= $status;
|
||||
|
||||
# Test 2. The slave IO thread is started but not yet got connected to master
|
||||
# and SQL thread is not started
|
||||
|
||||
start slave io_thread;
|
||||
|
||||
--echo Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF NO NO in three following queries
|
||||
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
let $status= query_get_value("show slave status", Slave_IO_Running, 1);
|
||||
echo Slave_IO_Running= $status;
|
||||
let $status= query_get_value("show slave status", Slave_SQL_Running, 1);
|
||||
echo Slave_SQL_Running= $status;
|
||||
|
||||
# Test 3. The slave IO thread is started and got connected to master
|
||||
# and SQL thread is still not started
|
||||
|
||||
eval SELECT RELEASE_LOCK($debug_lock);
|
||||
let $slave_param= Slave_IO_Running;
|
||||
let $slave_param_value= YES;
|
||||
source include/wait_for_slave_param.inc;
|
||||
|
||||
--echo Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF YES NO in three following queries
|
||||
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
let $status= query_get_value("show slave status", Slave_IO_Running, 1);
|
||||
echo Slave_IO_Running= $status;
|
||||
let $status= query_get_value("show slave status", Slave_SQL_Running, 1);
|
||||
echo Slave_SQL_Running= $status;
|
||||
|
||||
# Test 4. The slave IO thread is started and got connected to master
|
||||
# and SQL thread is started
|
||||
|
||||
start slave sql_thread;
|
||||
source include/wait_for_slave_sql_to_start.inc;
|
||||
|
||||
--echo Slave_running, Slave_IO_Running, Slave_SQL_Running must be ON, YES, YES in three following queries
|
||||
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
let $status= query_get_value("show slave status", Slave_IO_Running, 1);
|
||||
echo Slave_IO_Running= $status;
|
||||
let $status= query_get_value("show slave status", Slave_SQL_Running, 1);
|
||||
echo Slave_SQL_Running= $status;
|
||||
|
||||
# cleanup
|
||||
|
||||
connection slave;
|
||||
|
||||
eval set global debug= '$debug_saved';
|
||||
|
||||
--echo End of tests
|
@ -27,7 +27,7 @@ connection slave;
|
||||
|
||||
# Stop when reaching the the first table map event.
|
||||
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
|
||||
-- source include/wait_for_slave_sql_to_stop.inc
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
@ -59,7 +59,7 @@ source include/show_binlog_events.inc;
|
||||
|
||||
connection slave;
|
||||
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
|
||||
-- source include/wait_for_slave_sql_to_stop.inc
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
sync_with_master;
|
||||
|
Reference in New Issue
Block a user