1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Bug #49741 test files contain explicit references to bin/relay-log positions

Some of the test cases reference to binlog position and
these position numbers are written into result explicitly.
It is difficult to maintain if log event format changes. 

There are a couple of cases explicit position number appears, 
we handle them in different ways
A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options
   Use --replace_result to mask them.
B. 'SHOW BINLOG EVENT ...'
   Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. 
   show_binlog_events.inc file's function is enhanced by given
   $binlog_file and $binlog_limit.
C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc'
   For the test cases just care a few items in the result of 'SHOW SLAVE STATUS',
   only the items related to each test case are showed.
   'show_slave_status.inc' is rebuild, only the given items in $status_items
   will be showed.
   'check_slave_is_running.inc' and 'check_slave_no_error.inc'
   and 'check_slave_param.inc' are auxiliary files helping
   to show running status and error information easily.
This commit is contained in:
2010-05-24 21:54:08 +08:00
parent ca0aa95c6d
commit cc05440836
196 changed files with 3690 additions and 12027 deletions

View File

@@ -136,25 +136,24 @@ ALTER TABLE t2 DROP COLUMN d;
******************** SHOW BINLOG EVENTS ********************
show binlog events from 1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: #
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test_rpl
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test_rpl_1
master-bin.000001 # Query 1 # CREATE DATABASE test_rpl_1 CHARACTER SET utf8 COLLATE utf8_general_ci
master-bin.000001 # Query 1 # ALTER DATABASE test_rpl_1 CHARACTER SET latin1 COLLATE latin1_general_ci
master-bin.000001 # Query 1 # DROP DATABASE test_rpl_1
master-bin.000001 # Query 1 # CREATE DATABASE test_rpl CHARACTER SET utf8 COLLATE utf8_general_ci
master-bin.000001 # Query 1 # ALTER DATABASE test_rpl CHARACTER SET latin1 COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t0 (a int auto_increment not null, c int not null, PRIMARY KEY(a), KEY index2 (c)) ENGINE=innodb
master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 DROP INDEX index2
master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 ADD COLUMN b char(254)
master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 ADD INDEX index1 (b)
master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 DROP COLUMN c
master-bin.000001 # Query 1 # use `test_rpl`; RENAME TABLE t0 TO t1
master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t2 LIKE t1
master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t2 ADD COLUMN d datetime
master-bin.000001 # Query 1 # use `test_rpl`; CREATE INDEX index2 on t2 (d)
master-bin.000001 # Query 1 # use `test_rpl`; CREATE INDEX index3 on t2 (a, d)
master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d
master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl
master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl_1
master-bin.000001 # Query # # CREATE DATABASE test_rpl_1 CHARACTER SET utf8 COLLATE utf8_general_ci
master-bin.000001 # Query # # ALTER DATABASE test_rpl_1 CHARACTER SET latin1 COLLATE latin1_general_ci
master-bin.000001 # Query # # DROP DATABASE test_rpl_1
master-bin.000001 # Query # # CREATE DATABASE test_rpl CHARACTER SET utf8 COLLATE utf8_general_ci
master-bin.000001 # Query # # ALTER DATABASE test_rpl CHARACTER SET latin1 COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t0 (a int auto_increment not null, c int not null, PRIMARY KEY(a), KEY index2 (c)) ENGINE=innodb
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP INDEX index2
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD COLUMN b char(254)
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD INDEX index1 (b)
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP COLUMN c
master-bin.000001 # Query # # use `test_rpl`; RENAME TABLE t0 TO t1
master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t2 LIKE t1
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 ADD COLUMN d datetime
master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d)
master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d)
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d
drop database test_rpl;