mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
merge: 5.1 -> 5.1-rpl
conflicts: Text conflict in client/mysqltest.cc Text conflict in mysql-test/include/wait_until_connected_again.inc Text conflict in mysql-test/lib/mtr_report.pm Text conflict in mysql-test/mysql-test-run.pl Text conflict in mysql-test/r/events_bugs.result Text conflict in mysql-test/r/log_state.result Text conflict in mysql-test/r/myisam_data_pointer_size_func.result Text conflict in mysql-test/r/mysqlcheck.result Text conflict in mysql-test/r/query_cache.result Text conflict in mysql-test/r/status.result Text conflict in mysql-test/suite/binlog/r/binlog_index.result Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_packet.result Text conflict in mysql-test/suite/rpl/t/rpl_packet.test Text conflict in mysql-test/t/disabled.def Text conflict in mysql-test/t/events_bugs.test Text conflict in mysql-test/t/log_state.test Text conflict in mysql-test/t/myisam_data_pointer_size_func.test Text conflict in mysql-test/t/mysqlcheck.test Text conflict in mysql-test/t/query_cache.test Text conflict in mysql-test/t/rpl_init_slave_func.test Text conflict in mysql-test/t/status.test
This commit is contained in:
@@ -227,3 +227,20 @@ select * from t3 order by a;
|
||||
a
|
||||
127
|
||||
drop table t1,t2,t3;
|
||||
set auto_increment_increment=1;
|
||||
set auto_increment_offset=1;
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
|
8
mysql-test/suite/rpl/r/rpl_binlog_corruption.result
Normal file
8
mysql-test/suite/rpl/r/rpl_binlog_corruption.result
Normal file
@@ -0,0 +1,8 @@
|
||||
call mtr.add_suppression('Found invalid event in binary log');
|
||||
==== Initialize ====
|
||||
Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001
|
||||
==== Test ====
|
||||
START SLAVE SQL_THREAD;
|
||||
Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
|
||||
==== Clean up ====
|
||||
Cleaning up after setup_fake_relay_log.inc
|
@@ -29,7 +29,7 @@ SET @@global.max_allowed_packet=4096;
|
||||
SET @@global.net_buffer_length=4096;
|
||||
include/stop_slave.inc
|
||||
include/start_slave.inc
|
||||
CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
||||
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
|
||||
Slave_IO_Running = No (expect No)
|
||||
==== clean up ====
|
||||
|
@@ -4,34 +4,39 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
|
||||
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
|
||||
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
|
||||
SHOW BINLOG EVENTS FROM 216;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name #
|
||||
Pos 216
|
||||
Pos 106
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 309
|
||||
End_log_pos 199
|
||||
Info use `test`; CREATE TABLE t1 (a INT, b INT)
|
||||
Log_name #
|
||||
Pos 309
|
||||
Pos 199
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 415
|
||||
End_log_pos 305
|
||||
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
|
||||
Log_name #
|
||||
Pos 415
|
||||
Pos 305
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 521
|
||||
End_log_pos 411
|
||||
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
|
||||
Log_name #
|
||||
Pos 521
|
||||
Pos 411
|
||||
Event_type Query
|
||||
Server_id #
|
||||
End_log_pos 640
|
||||
End_log_pos 530
|
||||
Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
|
||||
**** On Master ****
|
||||
SHOW CREATE TABLE t1;
|
||||
@@ -125,9 +130,14 @@ NULL 3 6
|
||||
NULL 4 2
|
||||
NULL 5 10
|
||||
NULL 6 12
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
||||
ERROR 23000: Duplicate entry '2' for key 'b'
|
||||
SHOW BINLOG EVENTS FROM 1374;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||
INSERT INTO t7 SELECT a,b FROM tt3;
|
||||
@@ -137,18 +147,23 @@ a b
|
||||
1 2
|
||||
2 4
|
||||
3 6
|
||||
SHOW BINLOG EVENTS FROM 1374;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1374 Query # 1474 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
||||
# 1474 Query # 1542 use `test`; BEGIN
|
||||
# 1542 Table_map # 1584 table_id: # (test.t7)
|
||||
# 1584 Write_rows # 1640 table_id: # flags: STMT_END_F
|
||||
# 1640 Query # 1711 use `test`; ROLLBACK
|
||||
# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
||||
# 206 Query # 274 use `test`; BEGIN
|
||||
# 274 Table_map # 316 table_id: # (test.t7)
|
||||
# 316 Write_rows # 372 table_id: # flags: STMT_END_F
|
||||
# 372 Query # 443 use `test`; ROLLBACK
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
a b
|
||||
1 2
|
||||
2 4
|
||||
3 6
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TEMPORARY TABLE tt4 (a INT, b INT);
|
||||
INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
|
||||
BEGIN;
|
||||
@@ -156,12 +171,12 @@ INSERT INTO t7 SELECT a,b FROM tt4;
|
||||
ROLLBACK;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
SHOW BINLOG EVENTS FROM 1711;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1711 Query # 1779 use `test`; BEGIN
|
||||
# 1779 Table_map # 1821 table_id: # (test.t7)
|
||||
# 1821 Write_rows # 1877 table_id: # flags: STMT_END_F
|
||||
# 1877 Query # 1946 use `test`; COMMIT
|
||||
# 106 Query # 174 use `test`; BEGIN
|
||||
# 174 Table_map # 216 table_id: # (test.t7)
|
||||
# 216 Write_rows # 272 table_id: # flags: STMT_END_F
|
||||
# 272 Query # 343 use `test`; ROLLBACK
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
a b
|
||||
1 2
|
||||
@@ -178,6 +193,11 @@ a b
|
||||
4 8
|
||||
5 10
|
||||
6 12
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t8 LIKE t4;
|
||||
CREATE TABLE t9 LIKE tt4;
|
||||
CREATE TEMPORARY TABLE tt5 LIKE t4;
|
||||
@@ -196,10 +216,10 @@ Create Table CREATE TABLE `t9` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW BINLOG EVENTS FROM 1946;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1946 Query # 2032 use `test`; CREATE TABLE t8 LIKE t4
|
||||
# 2032 Query # 2171 use `test`; CREATE TABLE `t9` (
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t8 LIKE t4
|
||||
# 192 Query # 331 use `test`; CREATE TABLE `t9` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
)
|
||||
@@ -276,9 +296,8 @@ a
|
||||
1
|
||||
2
|
||||
3
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 4 Format_desc # 106 Server ver: #, Binlog ver: #
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
|
||||
# 192 Query # 260 use `test`; BEGIN
|
||||
# 260 Table_map # 301 table_id: # (test.t1)
|
||||
@@ -308,7 +327,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1329 Query # 1397 use `test`; BEGIN
|
||||
# 1397 Table_map # 1438 table_id: # (test.t1)
|
||||
# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F
|
||||
# 1482 Query # 1551 use `test`; COMMIT
|
||||
# 1482 Query # 1553 use `test`; ROLLBACK
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
@@ -371,9 +390,8 @@ a
|
||||
4
|
||||
6
|
||||
9
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 4 Format_desc # 106 Server ver: #, Binlog ver: #
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
|
||||
# 192 Query # 260 use `test`; BEGIN
|
||||
# 260 Table_map # 301 table_id: # (test.t1)
|
||||
@@ -394,6 +412,11 @@ a
|
||||
6
|
||||
9
|
||||
TRUNCATE TABLE t2;
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT a*a FROM t1;
|
||||
CREATE TEMPORARY TABLE tt2
|
||||
@@ -406,14 +429,14 @@ Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
SHOW BINLOG EVENTS FROM 949;
|
||||
SHOW BINLOG EVENTS FROM 106;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 949 Query # 1017 use `test`; BEGIN
|
||||
# 1017 Table_map # 1058 table_id: # (test.t2)
|
||||
# 1058 Write_rows # 1102 table_id: # flags: STMT_END_F
|
||||
# 1102 Table_map # 1143 table_id: # (test.t2)
|
||||
# 1143 Write_rows # 1182 table_id: # flags: STMT_END_F
|
||||
# 1182 Query # 1253 use `test`; ROLLBACK
|
||||
# 106 Query # 174 use `test`; BEGIN
|
||||
# 174 Table_map # 215 table_id: # (test.t2)
|
||||
# 215 Write_rows # 259 table_id: # flags: STMT_END_F
|
||||
# 259 Table_map # 300 table_id: # (test.t2)
|
||||
# 300 Write_rows # 339 table_id: # flags: STMT_END_F
|
||||
# 339 Query # 410 use `test`; ROLLBACK
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
DROP TABLE t1,t2;
|
||||
|
@@ -174,6 +174,7 @@ DROP TRIGGER tr2;
|
||||
INSERT INTO t1 VALUES (3,'master/slave');
|
||||
INSERT INTO t2 VALUES (3,'master/slave');
|
||||
INSERT INTO t3 VALUES (3,'master/slave');
|
||||
COMMIT;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
2 master only
|
||||
|
@@ -975,3 +975,22 @@ a b
|
||||
2 b
|
||||
3 c
|
||||
drop table t1;
|
||||
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;
|
||||
create table t1 ( f int ) engine = innodb;
|
||||
create table log ( r int ) engine = myisam;
|
||||
create trigger tr
|
||||
after insert on t1
|
||||
for each row insert into log values ( new.f );
|
||||
set autocommit = 0;
|
||||
insert into t1 values ( 1 );
|
||||
rollback;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
Comparing tables master:test.log and slave:test.log
|
||||
drop table t1, log;
|
||||
|
Reference in New Issue
Block a user