1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-bug36197

into  mats-laptop.(none):/home/bk/b36197-mysql-5.1-bugteam
This commit is contained in:
unknown
2008-05-12 20:01:10 +02:00
8 changed files with 113 additions and 212 deletions

View File

@ -0,0 +1,31 @@
###################################################
#Author: Mats (based on file written by Jeb)
#Date: 2008-05-06
#Purpose: To wait for slave SQL thread to start
#Details:
# 1) Fill in and setup variables
# 2) loop through looking for both
# io and sql threads to start
# 3) If loops too long die.
####################################################
connection slave;
let $row_number= 1;
let $run= 1;
let $counter= 300;
while ($run)
{
let $sql_result= query_get_value("SHOW SLAVE STATUS", Slave_SQL_Running, $row_number);
if (`SELECT '$sql_result' = 'Yes'`){
let $run= 0;
}
sleep 0.1;
if (!$counter){
--echo "Failed while waiting for slave SQL to start"
query_vertical SHOW SLAVE STATUS;
exit;
}
dec $counter;
}

View File

@ -226,7 +226,7 @@ sect test count
2 6 0
2 6 183
2 7 0
DROP TABLE t1, logtbl;
DROP TABLE t1, t2, logtbl;
DROP PROCEDURE just_log;
DROP PROCEDURE log_me;
DROP PROCEDURE log_me_inner;

View File

@ -37,7 +37,7 @@ Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1146
Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables
Skip_Counter 0
Exec_Master_Log_Pos 941
Relay_Log_Space #
@ -55,5 +55,5 @@ Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1146
Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables
drop table t1, t2;

View File

@ -247,7 +247,7 @@ sync_slave_with_master;
SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
connection master;
DROP TABLE t1, logtbl;
DROP TABLE t1, t2, logtbl;
DROP PROCEDURE just_log;
DROP PROCEDURE log_me;
DROP PROCEDURE log_me_inner;

View File

@ -36,15 +36,16 @@ connection slave;
# 4. Restart slave without privileges
# (slave.err will contain access denied error for this START SLAVE command)
stop slave;
source include/wait_for_slave_to_stop.inc;
start slave;
source include/wait_for_slave_sql_to_start.inc;
# 5. Make sure Slave_IO_Running = No
--replace_result $MASTER_MYPORT MASTER_MYPORT
# Column 1 is replaced, since the output can be either
# "Connecting to master" or "Waiting for master update"
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
--vertical_results
show slave status;
query_vertical show slave status;
# Cleanup (Note that slave IO thread is not running)
connection slave;