1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

BUG#37975: wait_for_slave_* should increase the timeout

Problem 1: tests often fail in pushbuild with a timeout when waiting
for the slave to start/stop/receive error.
Fix 1: Updated the wait_for_slave_* macros in the following way:
- The timeout is increased by a factor ten
- Refactored the macros so that wait_for_slave_param does the work for
the other macros.
Problem 2: Tests are often incorrectly written, lacking a
source include/wait_for_slave_to_[start|stop].inc.
Fix 2: Improved the chance to get it right by adding
include/start_slave.inc and include/stop_slave.inc, and updated tests
to use these.
Problem 3: The the built-in test language command
wait_for_slave_to_stop is a misnomer (does not wait for the slave io
thread) and does not give as much debug info in case of failure as
the otherwise equivalent macro
source include/wait_for_slave_sql_to_stop.inc
Fix 3: Replaced all calls to the built-in command by a call to the
macro.
Problem 4: Some, but not all, of the wait_for_slave_* macros had an
implicit connection slave. This made some tests confusing to read,
and made it more difficult to use the macro in circular replication
scenarios, where the connection named master needs to wait.
Fix 4: Removed the implicit connection slave from all
wait_for_slave_* macros, and updated tests to use an explicit
connection slave where necessary.
Problem 5: The macros wait_slave_status.inc and wait_show_pattern.inc
were unused. Moreover, using them is difficult and error-prone.
Fix 5: remove these macros.
Problem 6: log_bin_trust_function_creators_basic failed when running
tests because it assumed @@global.log_bin_trust_function_creators=1,
and some tests modified this variable without resetting it to its
original value.
Fix 6: All tests that use this variable have been updated so that
they reset the value at end of test.


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Replaced wait_for_slave_to_stop by include/wait_for_slave_sql_to_stop.inc
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
  Replaced wait_for_slave_to_stop by include/wait_for_slave_sql_to_stop.inc
  Added connection slave since includ/wait_for_slave_sql_to_stop.inc
  does not do that anymore.
mysql-test/extra/rpl_tests/rpl_log.test:
  Replaced start slave+wait_slave_status by start_slave.inc
mysql-test/include/reset_master_and_slave.inc:
  replaced start/stop slave by start_slave.inc/stop_slave.inc
mysql-test/include/sync_slave_io_with_master.inc:
  Improved comments and error message.
mysql-test/include/wait_for_slave_io_to_stop.inc:
  Refactored to use wait_for_slave_param.inc.
  Removed connection slave.
mysql-test/include/wait_for_slave_param.inc:
  - Improved usage instructions
  - Added more debug info in case of timeout
  - Added parameters $slave_param_comparison, $slave_timeout,
  $slave_keep_connection, $slave_error_message
mysql-test/include/wait_for_slave_sql_error.inc:
  Refactored to use wait_for_slave_param.inc.
  Removed connection slave.
mysql-test/include/wait_for_slave_sql_to_start.inc:
  Refactored to use wait_for_slave_param.inc.
  Removed connection slave.
mysql-test/include/wait_for_slave_sql_to_stop.inc:
  Refactored to use wait_for_slave_param.inc.
  Removed connection slave.
mysql-test/include/wait_for_slave_to_start.inc:
  Refactored to use wait_for_slave_param.inc.
  Removed connection slave.
mysql-test/include/wait_for_slave_to_stop.inc:
  Refactored to use wait_for_slave_param.inc.
  Removed connection slave.
mysql-test/include/wait_show_pattern.inc:
  Removed unused (and error-prone) file
mysql-test/include/wait_slave_status.inc:
  Removed unused (and error-prone) file
mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
  Renamed $keep_connection to $slave_keep_connection.
mysql-test/suite/rpl/t/rpl_bug26395.test:
  Replace stop slave by stop_slave.inc
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test:
  Replace start/stop slave by start_slave.inc/stop_slave.inc.
  Replace wait_for_slave_param by wait_for_slave_sql_to_stop.inc.
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
  Renamed $keep_connection to $slave_keep_connection.
mysql-test/suite/rpl/t/rpl_flushlog_loop.test:
  Replace wait_slave_status by start_slave.inc
mysql-test/suite/rpl/t/rpl_idempotency.test:
  Added connection slave since wait_for_slave_sql_to_stop.inc does not
  do that any more.
mysql-test/suite/rpl/t/rpl_incident.test:
  Replaced wait_for_slave_to_stop by wait_for_slave_sql_to_stop.inc
mysql-test/suite/rpl/t/rpl_init_slave.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
  Replaced save_master_pos;connection slave;sync_with_master by
  sync_slave_with_master.
mysql-test/suite/rpl/t/rpl_log_pos.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
  Replaced wait_for_slave_param by other wait_for_slave_* macros.
mysql-test/suite/rpl/t/rpl_packet.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/suite/rpl/t/rpl_row_until.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
  Replaced save_master_pos;connection slave;sync_with_master by
  sync_slave_with_master.
mysql-test/suite/rpl/t/rpl_server_id1.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/suite/rpl/t/rpl_slave_grp_exec.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/suite/rpl/t/rpl_slave_skip.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/suite/rpl/t/rpl_slave_status.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/suite/rpl/t/rpl_sp.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/suite/rpl/t/rpl_sp_effects.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/suite/rpl/t/rpl_stm_until.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
  Replaced save_master_pos;connection slave;sync_with_master by
  sync_slave_with_master.
mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test:
  Replaced start slave by start_slave.inc.
  Added explicit connection slave since wait_for_slave_sql_to_stop.inc
  does not do that anymore.
mysql-test/t/disabled.def:
  Disabled failing test.
mysql-test/t/func_time.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/t/grant.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/t/grant2.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/t/innodb_notembedded.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/t/log_bin_trust_function_creators_func.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
  Clean up at end of test by dropping the created user.
mysql-test/t/query_cache.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/t/query_cache_notembedded.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
mysql-test/t/rpl_init_slave_func.test:
  Replaced start/stop slave by start_slave.inc/stop_slave.inc.
mysql-test/t/timezone2.test:
  Restore @@global.log_bin_trust_function_creators at end of test.
This commit is contained in:
Sven Sandberg
2008-07-10 18:09:39 +02:00
parent d034ae598f
commit 6e69536956
77 changed files with 418 additions and 678 deletions

View File

@@ -21,7 +21,7 @@ a
1
[on slave]
==== Verify results on slave ====
STOP SLAVE;
include/stop_slave.inc
SELECT "" AS Slave_IO_State;
Slave_IO_State

View File

@@ -92,7 +92,7 @@ Master D 4 D
* Do failure for C and then make new connection B->D *
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;
include/start_slave.inc
INSERT INTO t1 VALUES(6,'C',2);
INSERT INTO t1(b,c) VALUES('B',2);
INSERT INTO t1(b,c) VALUES('A',2);
@@ -119,7 +119,7 @@ Master D 8 D
STOP SLAVE;
STOP SLAVE;
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS;
START SLAVE;
include/start_slave.inc
* Check data inserted before failure *
SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b;
@@ -166,7 +166,7 @@ Master D 12 D
*** Testing restoring scheme A->B->C->D->A after failure ***
* Remove wrong event from C and restore B->C->D *
STOP SLAVE;
include/stop_slave.inc
DELETE FROM t1 WHERE a = 6;
START SLAVE;
RESET MASTER;

View File

@@ -18,11 +18,7 @@ start slave;
stop slave;
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=SLAVE_PORT;
start slave;
let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
include/start_slave.inc
FLUSH LOGS;
SHOW SLAVE STATUS;
Slave_IO_State #

View File

@@ -103,10 +103,10 @@ DROP PROCEDURE just_log;
DROP PROCEDURE calc_and_log;
DROP FUNCTION log_rows;
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
#### 2. Using mixed mode ####
==== 2.1. Checking a procedure ====
**** On Master ****

View File

@@ -5,8 +5,8 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set global max_connections=151;
stop slave;
start slave;
include/stop_slave.inc
include/start_slave.inc
show variables like 'init_slave';
Variable_name Value
init_slave set global max_connections=500
@@ -25,6 +25,6 @@ set global init_connect="set @c=1";
show variables like 'init_connect';
Variable_name Value
init_connect set @c=1
stop slave;
include/stop_slave.inc
set global init_connect= @my_global_init_connect;
set global max_connections= default;

View File

@@ -7,7 +7,7 @@ start slave;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
stop slave;
include/stop_slave.inc
change master to master_log_pos=75;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -49,7 +49,7 @@ Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave;
stop slave;
include/stop_slave.inc
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1

View File

@@ -8,8 +8,8 @@ drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________
create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
SET @@global.max_allowed_packet=1024;
SET @@global.net_buffer_length=1024;
STOP SLAVE;
START SLAVE;
include/stop_slave.inc
include/start_slave.inc
select @@net_buffer_length, @@max_allowed_packet;
@@net_buffer_length @@max_allowed_packet
1024 1024
@@ -27,8 +27,8 @@ SLAVE_RUNNING ON
drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
SET @@global.max_allowed_packet=4096;
SET @@global.net_buffer_length=4096;
STOP SLAVE;
START SLAVE;
include/stop_slave.inc
include/start_slave.inc
CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
show slave status;

View File

@@ -423,10 +423,10 @@ a b c
**** On Master ****
DELETE FROM t1;
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
**** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master ****

View File

@@ -423,10 +423,10 @@ a b c
**** On Master ****
DELETE FROM t1;
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
**** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master ****

View File

@@ -16,6 +16,6 @@ INSERT INTO t1 VALUES (1);
[on slave]
Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables
==== Clean up ====
STOP SLAVE;
include/stop_slave.inc
[on master]
DROP TABLE t1;

View File

@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
include/stop_slave.inc
reset master;
reset slave;
reset master;
@@ -113,11 +113,7 @@ Aberdeen
Abernathy
aberrant
aberration
start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
include/start_slave.inc
select * from t1 order by 1 asc;
word
Aarhus
@@ -190,7 +186,8 @@ Abernathy
aberrant
aberration
flush logs;
stop slave;
include/stop_slave.inc
include/start_slave.inc
create table t2 (n int)ENGINE=MyISAM;
insert into t2 values (1);
show binlog events from <binlog_start>;
@@ -220,7 +217,6 @@ show binary logs;
Log_name File_size
master-bin.000001 1540
master-bin.000002 516
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1638

View File

@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
include/stop_slave.inc
reset master;
reset slave;
reset master;
@@ -113,11 +113,7 @@ Aberdeen
Abernathy
aberrant
aberration
start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
include/start_slave.inc
select * from t1 order by 1 asc;
word
Aarhus
@@ -190,7 +186,8 @@ Abernathy
aberrant
aberration
flush logs;
stop slave;
include/stop_slave.inc
include/start_slave.inc
create table t2 (n int)ENGINE=InnoDB;
insert into t2 values (1);
show binlog events from <binlog_start>;
@@ -220,7 +217,6 @@ show binary logs;
Log_name File_size
master-bin.000001 1456
master-bin.000002 474
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1536

View File

@@ -13,4 +13,5 @@ select count(*) from t1;
count(*)
70
drop table t1;
include/stop_slave.inc
drop table t1;

View File

@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
include/stop_slave.inc
create table t1(n int not null auto_increment primary key);
insert into t1 values (1),(2),(3),(4);
drop table t1;
@@ -149,7 +149,7 @@ Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave;
stop slave;
include/stop_slave.inc
start slave sql_thread until master_log_file='master-bin.000001', master_log_pos=740;
SHOW SLAVE STATUS;
Slave_IO_State #

View File

@@ -44,9 +44,9 @@ a b
SELECT * FROM t2 ORDER BY a;
a b
1 AA_for_row_or_YY_for_stmt_mixed
STOP SLAVE;
include/stop_slave.inc
RENAME TABLE t3_bak TO t3;
START SLAVE;
include/start_slave.inc
TRUNCATE t1;
TRUNCATE t2;
TRUNCATE t3;
@@ -78,9 +78,9 @@ SELECT * FROM t1 ORDER BY a;
a b
SELECT * FROM t2 ORDER BY a;
a b
STOP SLAVE;
include/stop_slave.inc
RENAME TABLE t3_bak TO t3;
START SLAVE;
include/start_slave.inc
TRUNCATE t1;
TRUNCATE t2;
TRUNCATE t3;
@@ -116,8 +116,8 @@ SELECT * FROM t1 ORDER BY a;
a b
SELECT * FROM t2 ORDER BY a;
a b
STOP SLAVE;
include/stop_slave.inc
RENAME TABLE t3_bak TO t3;
START SLAVE;
include/start_slave.inc
*** Clean up ***
DROP TABLE t1,t2,t3;

View File

@@ -166,7 +166,7 @@ BEGIN
UPDATE t3 SET a =2, b = 'master only';
END|
**** On Slave ****
STOP SLAVE;
include/stop_slave.inc
**** On Master ****
UPDATE t1 SET a = 2, b = 'master only' WHERE a = 1;
DROP TRIGGER tr1;
@@ -188,7 +188,7 @@ a b
3 master/slave
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a b
1 master/slave
@@ -208,7 +208,7 @@ CREATE TABLE t4 (a INT, b VARCHAR(20)) ENGINE=innodb;
CREATE TABLE t5 (a INT, b VARCHAR(20)) ENGINE=innodb;
CREATE TABLE t6 (a INT, b VARCHAR(20)) ENGINE=innodb;
**** On Slave ****
STOP SLAVE;
include/stop_slave.inc
*** On Master ***
BEGIN;
INSERT INTO t4 VALUES (2, 'master only');
@@ -234,7 +234,7 @@ a b
3 master/slave
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
include/start_slave.inc
SELECT * FROM t4 ORDER BY a;
a b
3 master/slave
@@ -245,7 +245,7 @@ SELECT * FROM t6 ORDER BY a;
a b
3 master/slave
**** On Slave ****
STOP SLAVE;
include/stop_slave.inc
*** On Master ***
BEGIN;
INSERT INTO t4 VALUES (6, 'master only');
@@ -277,7 +277,7 @@ a b
7 master only
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=10;
START SLAVE;
include/start_slave.inc
SELECT * FROM t4 ORDER BY a;
a b
3 master/slave
@@ -287,7 +287,7 @@ a b
SELECT * FROM t6 ORDER BY a;
a b
3 master/slave
STOP SLAVE;
include/stop_slave.inc
SET AUTOCOMMIT=0;
INSERT INTO t4 VALUES (4, 'master only');
INSERT INTO t5 VALUES (4, 'master only');
@@ -323,7 +323,7 @@ a b
7 master only
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
include/start_slave.inc
SELECT * FROM t4 ORDER BY a;
a b
3 master/slave
@@ -341,7 +341,7 @@ DROP TABLE t4, t5, t6;
*** On Master ***
CREATE TABLE t10 (a INT, b VARCHAR(20)) ENGINE=myisam;
*** On Slave ***
STOP SLAVE;
include/stop_slave.inc
*** On Master ***
SET SESSION BINLOG_FORMAT=STATEMENT;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|';
@@ -352,7 +352,7 @@ a b
3 master only
*** On Slave ***
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
include/start_slave.inc
SELECT * FROM t10 ORDER BY a;
a b
DROP TABLE t10;

View File

@@ -8,9 +8,9 @@ start slave;
[on master]
GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl';
[on slave]
STOP SLAVE;
include/stop_slave.inc
CHANGE MASTER TO master_user='rpl', master_password='rpl';
START SLAVE;
include/start_slave.inc
==== Do replication as new user ====
[on master]
CREATE TABLE t1 (n INT);
@@ -25,7 +25,7 @@ DROP USER rpl@127.0.0.1;
FLUSH PRIVILEGES;
[on slave]
==== Restart slave without privileges =====
STOP SLAVE;
include/stop_slave.inc
START SLAVE;
==== Verify that Slave_IO_Running = No ====
Slave_IO_Running = No (should be No)

View File

@@ -191,11 +191,15 @@ begin
return unix_timestamp();
end|
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators;
set @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
set global log_bin_trust_routine_creators=1;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=1;
set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators;
set @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
set global log_bin_trust_function_creators=1;
create function fn2()
returns int
@@ -549,8 +553,14 @@ insert into t values (1);
return 0;
end
master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`()
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=0;
set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
drop database mysqltest;
drop database mysqltest2;
use test;

View File

@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
drop procedure if exists p1;
drop procedure if exists p2;
drop function if exists f1;
@@ -275,5 +276,5 @@ E
drop table t2;
drop procedure sp_bug26199;
drop function sf_bug26199;
SET GLOBAL log_bin_trust_function_creators = 0;
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
end of the tests

View File

@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
include/stop_slave.inc
reset master;
reset slave;
reset master;
@@ -109,11 +109,7 @@ Aberdeen
Abernathy
aberrant
aberration
start slave;
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
--source include/wait_slave_status.inc
include/start_slave.inc
select * from t1 order by 1 asc;
word
Aarhus
@@ -186,7 +182,8 @@ Abernathy
aberrant
aberration
flush logs;
stop slave;
include/stop_slave.inc
include/start_slave.inc
create table t2 (n int)ENGINE=MyISAM;
insert into t2 values (1);
show binlog events from <binlog_start>;
@@ -209,7 +206,6 @@ show binary logs;
Log_name File_size
master-bin.000001 1347
master-bin.000002 392
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1450

View File

@@ -4,7 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
include/stop_slave.inc
create table t1(n int not null auto_increment primary key);
insert into t1 values (1),(2),(3),(4);
drop table t1;
@@ -149,7 +149,7 @@ Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave;
stop slave;
include/stop_slave.inc
start slave until master_log_file='master-bin.000001', master_log_pos=776;
SHOW SLAVE STATUS;
Slave_IO_State #

View File

@@ -40,10 +40,10 @@ SET @user_num = 10;
SET @user_text = 'Alunda';
[on master]
**** Resetting master and slave ****
STOP SLAVE;
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
START SLAVE;
include/start_slave.inc
[on slave]
SET @@global.init_slave = 'ant';
[on master]

View File

@@ -23,7 +23,7 @@
#
# To simulate the slave correctly, we wait until everything up to but
# not including the XID is replicated. This has to be done with
# include/wait_for_slave_io_to_sync.inc, not sync_slave_with_master,
# include/sync_slave_io_with_master.inc, not sync_slave_with_master,
# since the latter waits until the slave *SQL* thread has caught up
# with the master's position, which it will never do.
#
@@ -70,8 +70,7 @@ sync_with_master 0;
--echo ==== Verify results on slave ====
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
let $tmp= query_get_value("SHOW SLAVE STATUS", Slave_IO_State, 1);
eval SELECT "$tmp" AS Slave_IO_State;
let $tmp= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);

View File

@@ -57,8 +57,7 @@ SELECT 'Master D',a,b FROM t1 WHERE c = 1 ORDER BY a,b;
connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2);
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;
--source include/wait_for_slave_to_start.inc
source include/start_slave.inc;
disconnect slave;
--connection master_c
INSERT INTO t1 VALUES(6,'C',2);
@@ -67,9 +66,7 @@ INSERT INTO t1 VALUES(6,'C',2);
INSERT INTO t1(b,c) VALUES('B',2);
# Wait while C will stop.
--connection master_c
--let $slave_param= Slave_SQL_Running
--let $slave_param_value= No
--source include/wait_for_slave_param.inc
source include/wait_for_slave_sql_to_stop.inc;
--connection master_a
INSERT INTO t1(b,c) VALUES('A',2);
--connection master_d
@@ -105,8 +102,7 @@ STOP SLAVE;
--replace_result $SLAVE_MYPORT MASTER_B_PORT $file_c LOG_FILE $pos_c LOG_POS
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT,master_user='root',master_log_file='$file_c',master_log_pos=$pos_c
connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2);
START SLAVE;
--source include/wait_for_slave_to_start.inc
source include/start_slave.inc;
disconnect slave;
--connection master_b
--sync_slave_with_master master_d
@@ -154,8 +150,7 @@ SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b;
# distributed to other servers
--echo * Remove wrong event from C and restore B->C->D *
--connection master_d
STOP SLAVE;
--wait_for_slave_to_stop
source include/stop_slave.inc;
--connection master_c
DELETE FROM t1 WHERE a = 6;
START SLAVE;

View File

@@ -12,7 +12,7 @@ source include/have_innodb.inc;
# set up "dual head"
let $keep_connection= 1;
let $slave_keep_connection= 1;
connection slave;
reset master;

View File

@@ -25,13 +25,8 @@ stop slave;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$SLAVE_MYPORT;
start slave;
#
# Wait for start of slave IO and SQL threads
#
let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%';
--source include/wait_slave_status.inc
source include/start_slave.inc;
#
# Flush logs of slave

View File

@@ -207,9 +207,8 @@ select * from ti1 order by b /* must be (2),(3) */;
# foreign key: row is referenced
--echo *** slave must stop
source include/wait_for_slave_sql_to_stop.inc;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log;
@@ -240,11 +239,10 @@ delete from ti1 where b=3;
connection master;
insert into ti2 set a=3, b=3 /* offending write event */;
--echo *** slave must stop
source include/wait_for_slave_sql_to_stop.inc;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log;
@@ -282,9 +280,8 @@ connection master;
insert into ti1 set b=1 /* offending write event */;
--echo *** slave must stop
source include/wait_for_slave_sql_to_stop.inc;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log;
@@ -318,9 +315,8 @@ connection master;
DELETE FROM t1 WHERE a = -2;
--echo *** slave must stop
source include/wait_for_slave_sql_to_stop.inc;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log;
@@ -337,9 +333,8 @@ set global slave_exec_mode='STRICT';
connection master;
DELETE FROM t2 WHERE a = -2;
--echo *** slave must stop
source include/wait_for_slave_sql_to_stop.inc;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log;
@@ -360,9 +355,8 @@ connection master;
UPDATE t1 SET a = 1 WHERE a = -1;
--echo *** slave must stop
source include/wait_for_slave_sql_to_stop.inc;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log;
@@ -381,9 +375,8 @@ connection master;
UPDATE t2 SET a = 1 WHERE a = -1;
--echo *** slave must stop
source include/wait_for_slave_sql_to_stop.inc;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log;

View File

@@ -14,7 +14,7 @@ REPLACE INTO t1 VALUES (4);
SELECT * FROM t1;
connection slave;
--wait_for_slave_to_stop
source include/wait_for_slave_sql_to_stop.inc;
# The 4 should not be inserted into the table, since the incident log
# event should have stop the slave.

View File

@@ -7,33 +7,25 @@ source include/master-slave.inc;
set global max_connections=151;
connection slave;
stop slave;
source include/wait_for_slave_to_stop.inc;
start slave;
source include/wait_for_slave_to_start.inc;
source include/stop_slave.inc;
source include/start_slave.inc;
connection master;
save_master_pos;
connection slave;
sync_slave_with_master;
show variables like 'init_slave';
show variables like 'max_connections';
sync_with_master;
reset master;
connection master;
show variables like 'init_slave';
show variables like 'max_connections';
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
# Save variable value
set @my_global_init_connect= @@global.init_connect;
set global init_connect="set @c=1";
show variables like 'init_connect';
connection master;
save_master_pos;
connection slave;
sync_with_master;
stop slave;
sync_slave_with_master;
source include/stop_slave.inc;
# Restore changed global variable
set global init_connect= @my_global_init_connect;

View File

@@ -13,20 +13,14 @@
source include/master-slave.inc;
source include/show_master_status.inc;
sync_slave_with_master;
stop slave;
--source include/wait_for_slave_to_stop.inc
source include/stop_slave.inc;
change master to master_log_pos=75;
source include/show_slave_status2.inc;
start slave;
let $slave_param= Slave_SQL_Running;
let $slave_param_value= Yes;
--source include/wait_for_slave_param.inc
let $slave_param= Slave_IO_Running;
let $slave_param_value= No;
--source include/wait_for_slave_param.inc
stop slave;
--source include/wait_for_slave_to_stop.inc
source include/wait_for_slave_sql_to_start.inc;
source include/wait_for_slave_io_to_stop.inc;
source include/stop_slave.inc;
source include/show_slave_status.inc;
connection master;

View File

@@ -18,10 +18,8 @@ SET @@global.net_buffer_length=1024;
# Restart slave for setting to take effect
connection slave;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/stop_slave.inc;
source include/start_slave.inc;
# Reconnect to master for new setting to take effect
disconnect master;
@@ -65,10 +63,8 @@ SET @@global.net_buffer_length=4096;
# Restart slave for new setting to take effect
connection slave;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/stop_slave.inc;
source include/start_slave.inc;
# Reconnect to master for new setting to take effect
disconnect master;

View File

@@ -35,8 +35,7 @@ let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
--echo Last_SQL_Error = $err
--echo ==== Clean up ====
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
--echo [on master]
connection master;

View File

@@ -15,12 +15,12 @@ save_master_pos;
connection slave;
# slave will automatically tell itself to stop thanks to the .opt
# slave will automatically stop the sql thread thanks to the .opt
# file; it will initiate the stop request after the first
# Rows_log_event (out of 3) but should wait until the last one is
# executed before stopping.
wait_for_slave_to_stop;
source include/wait_for_slave_sql_to_stop.inc;
# check that we inserted all rows (waited until the last Rows event)
select count(*) from t1;
@@ -28,4 +28,5 @@ select count(*) from t1;
connection master;
drop table t1;
connection slave; # slave SQL thread is stopped
source include/stop_slave.inc;
drop table t1;

View File

@@ -9,12 +9,8 @@ let $VERSION=`select version()`;
# stop slave before he will start replication also sync with master
# for avoiding undetermenistic behaviour
save_master_pos;
connection slave;
sync_with_master;
stop slave;
# Make sure the slave sql and io thread has stopped
--source include/wait_for_slave_to_stop.inc
sync_slave_with_master;
--source include/stop_slave.inc
connection master;
# create some events on master
@@ -53,9 +49,7 @@ connection master;
save_master_pos;
connection slave;
sync_with_master;
stop slave;
# Make sure the slave sql and io thread has stopped
--source include/wait_for_slave_to_stop.inc
--source include/stop_slave.inc
# this should stop immediately as we are already there
start slave sql_thread until master_log_file='master-bin.000001', master_log_pos=740;

View File

@@ -9,8 +9,7 @@ connection slave;
reset master;
# replicate ourselves
stop slave;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_port=$SLAVE_MYPORT;
start slave;

View File

@@ -77,11 +77,9 @@ if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) {
SELECT * FROM t2 ORDER BY a;
}
STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
--source include/stop_slave.inc
RENAME TABLE t3_bak TO t3;
START SLAVE;
--source include/wait_for_slave_to_start.inc
--source include/start_slave.inc
--connection master
TRUNCATE t1;
@@ -121,11 +119,9 @@ SHOW TABLES LIKE 't%';
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
--source include/stop_slave.inc
RENAME TABLE t3_bak TO t3;
START SLAVE;
--source include/wait_for_slave_to_start.inc
--source include/start_slave.inc
--connection master
TRUNCATE t1;
@@ -167,11 +163,9 @@ SHOW TABLES LIKE 't%';
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
source include/stop_slave.inc;
RENAME TABLE t3_bak TO t3;
START SLAVE;
--source include/wait_for_slave_to_start.inc
source include/start_slave.inc;
# Clean up
--echo *** Clean up ***

View File

@@ -110,8 +110,7 @@ DELIMITER ;|
--echo **** On Slave ****
sync_slave_with_master;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
--echo **** On Master ****
connection master;
@@ -131,8 +130,7 @@ save_master_pos;
--echo *** On Slave ***
connection slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/start_slave.inc;
sync_with_master;
SELECT * FROM t1 ORDER BY a;
@@ -156,8 +154,7 @@ CREATE TABLE t6 (a INT, b VARCHAR(20)) ENGINE=innodb;
--echo **** On Slave ****
sync_slave_with_master;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
--echo *** On Master ***
connection master;
@@ -182,8 +179,7 @@ save_master_pos;
--echo *** On Slave ***
connection slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/start_slave.inc;
sync_with_master;
SELECT * FROM t4 ORDER BY a;
@@ -194,8 +190,7 @@ SELECT * FROM t6 ORDER BY a;
--echo **** On Slave ****
connection slave;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
--echo *** On Master ***
connection master;
@@ -220,8 +215,7 @@ save_master_pos;
--echo *** On Slave ***
connection slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=10;
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/start_slave.inc;
sync_with_master;
SELECT * FROM t4 ORDER BY a;
@@ -232,8 +226,7 @@ SELECT * FROM t6 ORDER BY a;
# And the same, but with autocommit = 0
#
connection slave;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
connection master;
SET AUTOCOMMIT=0;
@@ -257,8 +250,7 @@ save_master_pos;
--echo *** On Slave ***
connection slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/start_slave.inc;
sync_with_master;
SELECT * FROM t4 ORDER BY a;
@@ -280,8 +272,7 @@ CREATE TABLE t10 (a INT, b VARCHAR(20)) ENGINE=myisam;
--echo *** On Slave ***
sync_slave_with_master;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
--echo *** On Master ***
connection master;
@@ -297,8 +288,7 @@ save_master_pos;
--echo *** On Slave ***
connection slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/start_slave.inc;
sync_with_master;
SELECT * FROM t10 ORDER BY a;

View File

@@ -27,11 +27,9 @@ GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl';
--echo [on slave]
sync_slave_with_master;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
source include/stop_slave.inc;
CHANGE MASTER TO master_user='rpl', master_password='rpl';
START SLAVE;
source include/wait_for_slave_to_start.inc;
source include/start_slave.inc;
--echo ==== Do replication as new user ====
--echo [on master]
@@ -53,8 +51,7 @@ sync_slave_with_master;
--echo ==== 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;
source include/stop_slave.inc;
START SLAVE;
source include/wait_for_slave_sql_to_start.inc;

View File

@@ -11,6 +11,7 @@
source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;
# we need a db != test, where we don't have automatic grants
--disable_warnings
drop database if exists mysqltest1;
@@ -240,6 +241,8 @@ begin
end|
delimiter ;|
connection master;
set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators;
set @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
# test old variable name:
set global log_bin_trust_routine_creators=1;
# now use new name:
@@ -247,6 +250,8 @@ set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=1;
# slave needs it too otherwise will not execute what master allowed:
connection slave;
set @old_log_bin_trust_routine_creators= @@global.log_bin_trust_routine_creators;
set @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
set global log_bin_trust_function_creators=1;
connection con1;
@@ -571,9 +576,12 @@ show binlog events in 'master-bin.000001' from 106;
# Restore log_bin_trust_function_creators to its original value.
# This is a cleanup for all parts above where we tested stored
# functions and triggers.
set global log_bin_trust_function_creators=0;
connection slave;
set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators;
set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
connection master;
set global log_bin_trust_function_creators=0;
set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators;
set @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
# Clean up
drop database mysqltest;

View File

@@ -10,6 +10,8 @@
# ****************************************************************
connection master;
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
# cleanup
--disable_warnings
drop procedure if exists p1;
@@ -254,8 +256,8 @@ drop table t2;
drop procedure sp_bug26199;
drop function sf_bug26199;
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
sync_slave_with_master;
SET GLOBAL log_bin_trust_function_creators = 0;
--echo end of the tests

View File

@@ -8,12 +8,8 @@ let $VERSION=`select version()`;
# stop slave before he will start replication also sync with master
# for avoiding undetermenistic behaviour
save_master_pos;
connection slave;
sync_with_master;
stop slave;
# Make sure the slave sql and io thread has stopped
--source include/wait_for_slave_to_stop.inc
sync_slave_with_master;
--source include/stop_slave.inc
connection master;
# create some events on master
@@ -49,12 +45,8 @@ source include/show_slave_status2.inc;
# clean up
start slave;
connection master;
save_master_pos;
connection slave;
sync_with_master;
stop slave;
# Make sure the slave sql and io thread has stopped
--source include/wait_for_slave_to_stop.inc
sync_slave_with_master;
--source include/stop_slave.inc
# this should stop immediately as we are already there
start slave until master_log_file='master-bin.000001', master_log_pos=776;