mariadb/mysql-test/r/rpl_ddl.result
unknown b0d82705d3 WL#2076: Added if(...) construct to mysqltest
Removed SHOW BINLOG EVENTS in test case for ps-protocol and row-based replication


client/mysqltest.c:
  WL#2067: Added if(...) construct to mysqltest
mysql-test/include/rpl_stmt_seq.inc:
  Removed SHOW BINLOG EVENTS in test case for ps-protocol and row-based replication
mysql-test/r/rpl_ddl.result:
  Removed SHOW BINLOG EVENTS in test case for ps-protocol and row-based replication
mysql-test/t/rpl_ddl.test:
  Comment
2005-06-16 16:56:03 +02:00

1077 lines
19 KiB
Text

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 = 1;
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO mysqltest1.t1 SET f1= 0;
CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB";
CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO mysqltest1.t7 SET f1= 0;
CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT);
SET AUTOCOMMIT = 0;
use mysqltest1;
-------- switch to slave --------
SET AUTOCOMMIT = 0;
use mysqltest1;
-------- switch to master -------
######## COMMIT ########
-------- switch to master -------
INSERT INTO t1 SET f1= 0 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
0
-------- switch to master -------
COMMIT;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## ROLLBACK ########
-------- switch to master -------
INSERT INTO t1 SET f1= 1 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## SET AUTOCOMMIT=1 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 1 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
-------- switch to master -------
SET AUTOCOMMIT=1;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
2
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
2
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SET AUTOCOMMIT=0;
######## START TRANSACTION ########
-------- switch to master -------
INSERT INTO t1 SET f1= 2 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
3
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
2
-------- switch to master -------
START TRANSACTION;
SELECT MAX(f1) FROM t1;
MAX(f1)
3
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
3
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
3
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
3
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## BEGIN ########
-------- switch to master -------
INSERT INTO t1 SET f1= 3 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
3
-------- switch to master -------
BEGIN;
SELECT MAX(f1) FROM t1;
MAX(f1)
4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
4
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
4
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
4
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## DROP TABLE mysqltest1.t2 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 4 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
5
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
4
-------- switch to master -------
DROP TABLE mysqltest1.t2;
SELECT MAX(f1) FROM t1;
MAX(f1)
5
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
5
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW TABLES LIKE 't2';
Tables_in_mysqltest1 (t2)
-------- switch to slave --------
SHOW TABLES LIKE 't2';
Tables_in_mysqltest1 (t2)
-------- switch to master -------
######## DROP TEMPORARY TABLE mysqltest1.t23 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 5 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
-------- switch to master -------
DROP TEMPORARY TABLE mysqltest1.t23;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
-------- switch to master -------
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT MAX(f1) FROM t1;
MAX(f1)
5
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW TABLES LIKE 't23';
Tables_in_mysqltest1 (t23)
-------- switch to slave --------
SHOW TABLES LIKE 't23';
Tables_in_mysqltest1 (t23)
-------- switch to master -------
######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 5 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
-------- switch to master -------
RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW TABLES LIKE 't20';
Tables_in_mysqltest1 (t20)
t20
-------- switch to slave --------
SHOW TABLES LIKE 't20';
Tables_in_mysqltest1 (t20)
t20
-------- switch to master -------
######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ########
-------- switch to master -------
INSERT INTO t1 SET f1= 6 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
7
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
-------- switch to master -------
ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
SELECT MAX(f1) FROM t1;
MAX(f1)
7
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
7
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
7
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
7
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
describe mysqltest1.t4;
Field Type Null Key Default Extra
f1 bigint(20) YES NULL
f2 bigint(20) YES NULL
-------- switch to slave --------
describe mysqltest1.t4;
Field Type Null Key Default Extra
f1 bigint(20) YES NULL
f2 bigint(20) YES NULL
-------- switch to master -------
######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB" ########
-------- switch to master -------
INSERT INTO t1 SET f1= 7 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
8
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
7
-------- switch to master -------
CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB";
SELECT MAX(f1) FROM t1;
MAX(f1)
8
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
8
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ########
-------- switch to master -------
INSERT INTO t1 SET f1= 8 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
-------- switch to master -------
CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT);
SELECT MAX(f1) FROM t1;
MAX(f1)
9
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
-------- switch to master -------
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT MAX(f1) FROM t1;
MAX(f1)
8
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## TRUNCATE TABLE mysqltest1.t7 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 8 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
-------- switch to master -------
TRUNCATE TABLE mysqltest1.t7;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SELECT * FROM mysqltest1.t7;
f1
-------- switch to slave --------
SELECT * FROM mysqltest1.t7;
f1
-------- switch to master -------
######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ########
-------- switch to master -------
INSERT INTO t1 SET f1= 9 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
-------- switch to master -------
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
UNLOCK TABLES;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
LOCK TABLES mysqltest1.t1 READ;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
11
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
11
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## DROP INDEX my_idx6 ON mysqltest1.t6 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 11 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
12
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
11
-------- switch to master -------
DROP INDEX my_idx6 ON mysqltest1.t6;
SELECT MAX(f1) FROM t1;
MAX(f1)
12
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
12
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
12
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
12
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW INDEX FROM mysqltest1.t6;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-------- switch to slave --------
SHOW INDEX FROM mysqltest1.t6;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-------- switch to master -------
######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ########
-------- switch to master -------
INSERT INTO t1 SET f1= 12 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
13
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
12
-------- switch to master -------
CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
SELECT MAX(f1) FROM t1;
MAX(f1)
13
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
13
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
13
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
13
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW INDEX FROM mysqltest1.t5;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
-------- switch to slave --------
SHOW INDEX FROM mysqltest1.t5;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE
-------- switch to master -------
######## DROP DATABASE mysqltest2 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 13 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
14
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
13
-------- switch to master -------
DROP DATABASE mysqltest2;
SELECT MAX(f1) FROM t1;
MAX(f1)
14
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
14
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
14
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
14
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW DATABASES LIKE "mysqltest2";
Database (mysqltest2)
-------- switch to slave --------
SHOW DATABASES LIKE "mysqltest2";
Database (mysqltest2)
-------- switch to master -------
######## CREATE DATABASE mysqltest3 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 14 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
15
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
14
-------- switch to master -------
CREATE DATABASE mysqltest3;
SELECT MAX(f1) FROM t1;
MAX(f1)
15
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
15
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
15
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
15
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW DATABASES LIKE "mysqltest3";
Database (mysqltest3)
mysqltest3
-------- switch to slave --------
SHOW DATABASES LIKE "mysqltest3";
Database (mysqltest3)
mysqltest3
-------- switch to master -------
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;