mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge InnoDB 5.7 from mysql-5.7.9.
Contains also MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7 The failure happened because 5.7 has changed the signature of the bool handler::primary_key_is_clustered() const virtual function ("const" was added). InnoDB was using the old signature which caused the function not to be used. MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7 Fixed mutexing problem on lock_trx_handle_wait. Note that rpl_parallel and rpl_optimistic_parallel tests still fail. MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan) Reason: incorrect merge MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan) Reason: incorrect merge
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
# columns are stored off-page.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
# The 7000 in this test is a bit less than half the innodb_page_size.
|
||||
--source include/have_innodb_16k.inc
|
||||
|
||||
# DEBUG_SYNC must be compiled in.
|
||||
@ -15,6 +16,8 @@
|
||||
# Avoid CrashReporter popup on Mac
|
||||
--source include/not_crashrep.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
|
||||
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b TEXT, c TEXT) ENGINE=InnoDB;
|
||||
@ -41,7 +44,7 @@ connect (con2,localhost,root,,);
|
||||
# Check that the above SELECT is blocked
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = 'Sending data' and
|
||||
where state in ('Sending data', 'Opening tables') and
|
||||
info = 'SELECT a, RIGHT(b,20) FROM t1';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
@ -51,7 +54,7 @@ connection con1;
|
||||
reap;
|
||||
connection default;
|
||||
reap;
|
||||
SET DEBUG_DBUG='+d,row_ins_extern_checkpoint';
|
||||
SET DEBUG='+d,row_ins_extern_checkpoint';
|
||||
SET DEBUG_SYNC='before_row_ins_extern_latch SIGNAL rec_not_blob WAIT_FOR crash';
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
@ -68,7 +71,8 @@ SELECT a, RIGHT(b,20) FROM t1;
|
||||
SELECT a FROM t1;
|
||||
|
||||
# Request a crash, and restart the server.
|
||||
SET DEBUG_DBUG='+d,crash_commit_before';
|
||||
SET DEBUG='+d,crash_commit_before';
|
||||
# Write file to make mysql-test-run.pl restart the server
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--error 2013
|
||||
INSERT INTO t2 VALUES (42);
|
||||
@ -80,7 +84,6 @@ connection default;
|
||||
--error 2013
|
||||
reap;
|
||||
|
||||
# Write file to make mysql-test-run.pl restart the server
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--disable_reconnect
|
||||
@ -90,41 +93,34 @@ CHECK TABLE t1;
|
||||
INSERT INTO t3 VALUES
|
||||
(1,REPEAT('d',7000),REPEAT('e',100)),
|
||||
(2,REPEAT('g',7000),REPEAT('h',100));
|
||||
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR go';
|
||||
SET DEBUG_SYNC='blob_write_middle SIGNAL go_sel WAIT_FOR go_upd';
|
||||
# This should move column b off-page.
|
||||
--send
|
||||
UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
|
||||
|
||||
--echo # Connection con1:
|
||||
connect (con1,localhost,root,,);
|
||||
SET DEBUG_SYNC='now WAIT_FOR have_latch';
|
||||
SET DEBUG_SYNC='now WAIT_FOR go_sel';
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT @@tx_isolation;
|
||||
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
|
||||
set debug_sync='now SIGNAL go_upd';
|
||||
|
||||
# this one should block
|
||||
-- send
|
||||
--echo # Connection default:
|
||||
connection default;
|
||||
--echo # reap UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
|
||||
reap;
|
||||
|
||||
--echo # Connection con1:
|
||||
connection con1;
|
||||
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
|
||||
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
# Check that the above SELECT is blocked
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = 'Sending data' and
|
||||
info = 'SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SET DEBUG_SYNC='now SIGNAL go';
|
||||
|
||||
connection con1;
|
||||
reap;
|
||||
disconnect con1;
|
||||
|
||||
connection default;
|
||||
reap;
|
||||
|
||||
CHECK TABLE t1,t2,t3;
|
||||
|
||||
connection con2;
|
||||
connect (con2,localhost,root,,);
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (347);
|
||||
connection default;
|
||||
@ -134,7 +130,7 @@ connection default;
|
||||
# remain open while we are writing the off-page columns and are
|
||||
# stuck in the DEBUG_SYNC. A checkpoint involves a flush, which
|
||||
# would wait for the buffer-fix to cease.
|
||||
SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
|
||||
SET DEBUG='+d,row_upd_extern_checkpoint';
|
||||
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
|
||||
# This should move column b off-page.
|
||||
--send
|
||||
@ -148,7 +144,8 @@ SELECT info FROM information_schema.processlist
|
||||
WHERE state = 'debug sync point: before_row_upd_extern';
|
||||
|
||||
# Request a crash, and restart the server.
|
||||
SET DEBUG_DBUG='+d,crash_commit_before';
|
||||
SET DEBUG='+d,crash_commit_before';
|
||||
# Write file to make mysql-test-run.pl restart the server
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--error 2013
|
||||
COMMIT;
|
||||
@ -159,7 +156,6 @@ connection default;
|
||||
--error 2013
|
||||
reap;
|
||||
|
||||
# Write file to make mysql-test-run.pl restart the server
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--disable_reconnect
|
||||
@ -178,7 +174,7 @@ connection default;
|
||||
# remain open while we are writing the off-page columns and are
|
||||
# stuck in the DEBUG_SYNC. A checkpoint involves a flush, which
|
||||
# would wait for the buffer-fix to cease.
|
||||
SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
|
||||
SET DEBUG='+d,row_upd_extern_checkpoint';
|
||||
SET DEBUG_SYNC='after_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
|
||||
# This should move column b off-page.
|
||||
--send
|
||||
@ -192,7 +188,8 @@ SELECT info FROM information_schema.processlist
|
||||
WHERE state = 'debug sync point: after_row_upd_extern';
|
||||
|
||||
# Request a crash, and restart the server.
|
||||
SET DEBUG_DBUG='+d,crash_commit_before';
|
||||
SET DEBUG='+d,crash_commit_before';
|
||||
# Write file to make mysql-test-run.pl restart the server
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--error 2013
|
||||
COMMIT;
|
||||
@ -203,7 +200,6 @@ connection default;
|
||||
--error 2013
|
||||
reap;
|
||||
|
||||
# Write file to make mysql-test-run.pl restart the server
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--disable_reconnect
|
||||
|
Reference in New Issue
Block a user