mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
89 lines
1.9 KiB
Text
89 lines
1.9 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 @old_global_binlog_format = @@global.binlog_format;
|
||
|
set @@global.binlog_format = statement;
|
||
|
CREATE SCHEMA IF NOT EXISTS mysqlslap;
|
||
|
USE mysqlslap;
|
||
|
select @@global.binlog_format;
|
||
|
@@global.binlog_format
|
||
|
STATEMENT
|
||
|
CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
|
||
|
FLUSH TABLE t1;
|
||
|
SELECT COUNT(*) FROM t1;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
use mysqlslap;
|
||
|
SELECT COUNT(*) FROM t1;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
truncate table t1;
|
||
|
insert delayed into t1 values(10, "my name");
|
||
|
insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
|
||
|
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
|
||
|
flush table t1;
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
delete from t1 where id!=10;
|
||
|
insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
|
||
|
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
|
||
|
flush table t1;
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
20 is Bond
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
20 is Bond
|
||
|
USE test;
|
||
|
DROP SCHEMA mysqlslap;
|
||
|
set @@global.binlog_format = mixed;
|
||
|
CREATE SCHEMA IF NOT EXISTS mysqlslap;
|
||
|
USE mysqlslap;
|
||
|
select @@global.binlog_format;
|
||
|
@@global.binlog_format
|
||
|
MIXED
|
||
|
CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
|
||
|
FLUSH TABLE t1;
|
||
|
SELECT COUNT(*) FROM t1;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
use mysqlslap;
|
||
|
SELECT COUNT(*) FROM t1;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
truncate table t1;
|
||
|
insert delayed into t1 values(10, "my name");
|
||
|
insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
|
||
|
flush table t1;
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
20 James Bond
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
20 James Bond
|
||
|
delete from t1 where id!=10;
|
||
|
insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
|
||
|
flush table t1;
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
20 is Bond
|
||
|
select * from t1;
|
||
|
id name
|
||
|
10 my name
|
||
|
20 is Bond
|
||
|
USE test;
|
||
|
DROP SCHEMA mysqlslap;
|
||
|
set @@global.binlog_format = @old_global_binlog_format;
|