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

Rewrite test case for BUG 25843 to avoid SHOW BINLOG EVENTS

statement.


mysql-test/suite/rpl/r/rpl_ps.result:
  Update result file.
This commit is contained in:
unknown
2007-09-03 15:13:34 +04:00
parent 424bda7815
commit 81dff1351a
2 changed files with 63 additions and 25 deletions

View File

@ -34,17 +34,18 @@ stop slave;
#
########################################################################
#
# Check that binlog is filled properly.
#
# Connection: slave
START SLAVE;
# Connection: master
CREATE DATABASE mysqltest1;
CREATE TABLE t1(c INT);
CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32));
RESET MASTER;
RESET SLAVE;
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(1)';
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)';
EXECUTE stmt_d_1;
@ -52,18 +53,28 @@ use mysqltest1;
EXECUTE stmt_d_1;
FLUSH LOGS;
SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 106 Query 2 193 use `test`; INSERT INTO t1 VALUES(1)
slave-bin.000001 193 Query 2 280 use `test`; INSERT INTO t1 VALUES(1)
slave-bin.000001 280 Rotate 2 323 slave-bin.000002;pos=4
# Connection: slave
SELECT * FROM t1;
db_name db_col_name
test latin1_swedish_ci
test latin1_swedish_ci
# Connection: master
DROP DATABASE mysqltest1;
use test;
# Connection: slave
STOP SLAVE;
########################################################################
reset master;
reset slave;

View File

@ -73,20 +73,24 @@ stop slave;
###############################################################################
--echo
--echo #
--echo # Check that binlog is filled properly.
--echo #
--echo # Connection: slave
--echo
--connection slave
--echo
START SLAVE;
--echo
--echo # Connection: master
--echo
--connection master
--echo
CREATE DATABASE mysqltest1;
CREATE TABLE t1(c INT);
CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32));
--echo
RESET MASTER;
RESET SLAVE;
--echo
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(1)';
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)';
--echo
EXECUTE stmt_d_1;
@ -98,10 +102,21 @@ use mysqltest1;
EXECUTE stmt_d_1;
--echo
FLUSH LOGS;
--save_master_pos
--echo
SHOW BINLOG EVENTS FROM 106;
--echo # Connection: slave
--echo
--connection slave
--sync_with_master
--echo
SELECT * FROM t1;
--echo
--echo # Connection: master
--echo
--connection master
--echo
DROP DATABASE mysqltest1;
@ -109,6 +124,18 @@ DROP DATABASE mysqltest1;
--echo
use test;
--echo
--save_master_pos
--echo
--echo # Connection: slave
--echo
--connection slave
--sync_with_master
--echo
STOP SLAVE;
--echo
--echo ########################################################################