mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/extra/rpl_tests/rpl_loaddata.test Text conflict in mysql-test/r/mysqlbinlog2.result Text conflict in mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result Text conflict in mysql-test/suite/binlog/r/binlog_unsafe.result Text conflict in mysql-test/suite/rpl/r/rpl_insert_id.result Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result Text conflict in mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result Text conflict in mysql-test/suite/rpl/r/rpl_udf.result Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test Text conflict in sql/field.h Text conflict in sql/log.cc Text conflict in sql/log_event.cc Text conflict in sql/log_event_old.cc Text conflict in sql/mysql_priv.h Text conflict in sql/share/errmsg.txt Text conflict in sql/sp.cc Text conflict in sql/sql_acl.cc Text conflict in sql/sql_base.cc Text conflict in sql/sql_class.h Text conflict in sql/sql_db.cc Text conflict in sql/sql_delete.cc Text conflict in sql/sql_insert.cc Text conflict in sql/sql_lex.cc Text conflict in sql/sql_lex.h Text conflict in sql/sql_load.cc Text conflict in sql/sql_table.cc Text conflict in sql/sql_update.cc Text conflict in sql/sql_view.cc Conflict adding files to storage/innobase. Created directory. Conflict because storage/innobase is not versioned, but has versioned children. Versioned directory. Conflict adding file storage/innobase. Moved existing file to storage/innobase.moved. Conflict adding files to storage/innobase/handler. Created directory. Conflict because storage/innobase/handler is not versioned, but has versioned children. Versioned directory. Contents conflict in storage/innobase/handler/ha_innodb.cc
210 lines
5.3 KiB
Plaintext
210 lines
5.3 KiB
Plaintext
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;
|
|
CALL mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
|
DROP TABLE IF EXISTS t1, t2;
|
|
DROP PROCEDURE IF EXISTS p1;
|
|
DROP PROCEDURE IF EXISTS p2;
|
|
DROP TRIGGER IF EXISTS tr1;
|
|
DROP FUNCTION IF EXISTS f1;
|
|
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY);
|
|
CREATE TABLE t2 (id INT AUTO_INCREMENT PRIMARY KEY);
|
|
CREATE PROCEDURE p1()
|
|
BEGIN
|
|
DECLARE ins_count INT DEFAULT 10;
|
|
WHILE ins_count > 0 DO
|
|
INSERT INTO t1 VALUES (NULL);
|
|
SET ins_count = ins_count - 1;
|
|
END WHILE;
|
|
DELETE FROM t1 WHERE id = 1;
|
|
DELETE FROM t1 WHERE id = 2;
|
|
DELETE FROM t2 WHERE id = 1;
|
|
DELETE FROM t2 WHERE id = 2;
|
|
END//
|
|
CREATE PROCEDURE p2()
|
|
BEGIN
|
|
INSERT INTO t1 VALUES (NULL);
|
|
DELETE FROM t1 WHERE id = f1(3);
|
|
DELETE FROM t1 WHERE id = f1(4);
|
|
DELETE FROM t2 WHERE id = 3;
|
|
DELETE FROM t2 WHERE id = 4;
|
|
END//
|
|
CREATE TRIGGER tr1 BEFORE DELETE
|
|
ON t1 FOR EACH ROW
|
|
BEGIN
|
|
INSERT INTO t2 VALUES (NULL);
|
|
END//
|
|
CREATE FUNCTION f1 (i int) RETURNS int
|
|
BEGIN
|
|
INSERT INTO t2 VALUES (NULL);
|
|
RETURN i;
|
|
END//
|
|
CALL p1();
|
|
show binlog events from <binlog_start>;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=1
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=2
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=3
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=4
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=5
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=6
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=7
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=8
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=9
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=10
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=1
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = 1
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=2
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = 2
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 1
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 2
|
|
master-bin.000001 # Query # # COMMIT
|
|
# Result on master
|
|
SELECT * FROM t1;
|
|
id
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
SELECT * FROM t2;
|
|
id
|
|
# Result on slave
|
|
SELECT * FROM t1;
|
|
id
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
SELECT * FROM t2;
|
|
id
|
|
DROP TRIGGER tr1;
|
|
CALL p2();
|
|
show binlog events from <binlog_start>;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=11
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=3
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = f1(3)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Intvar # # INSERT_ID=12
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = f1(4)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 3
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 4
|
|
master-bin.000001 # Query # # COMMIT
|
|
# Result on master
|
|
SELECT * FROM t1;
|
|
id
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
SELECT * FROM t2;
|
|
id
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
|
# Result on slave
|
|
SELECT * FROM t1;
|
|
id
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
SELECT * FROM t2;
|
|
id
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
|
DROP TABLE IF EXISTS t1, t2;
|
|
DROP PROCEDURE IF EXISTS p1;
|
|
DROP PROCEDURE IF EXISTS p2;
|
|
DROP FUNCTION IF EXISTS f1;
|
|
DROP TRIGGER IF EXISTS tr1;
|
|
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|