mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
As noted in MDEV-8841, any test that kills the server must issue FLUSH TABLES, so that tables of crash-unsafe storage engines will not be corrupted. Consistently issue this statement after any call mtr.add_suppression() calls. Also, do not invoke shutdown_server directly, but use helpers instead.
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
--source include/not_embedded.inc
|
|
--source include/not_crashrep.inc
|
|
--source include/have_innodb.inc
|
|
|
|
SET GLOBAL max_allowed_packet = 100*1024*1024;
|
|
|
|
--disable_query_log
|
|
call mtr.add_suppression("InnoDB: The total blob data length");
|
|
FLUSH TABLES;
|
|
--enable_query_log
|
|
|
|
--echo # Connection big_packets:
|
|
connect(big_packets,localhost,root,,);
|
|
connection big_packets;
|
|
|
|
CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB;
|
|
|
|
# Insert a few rows (it doesn't really matter how many). These transactions
|
|
# are committed once they are acked, so they should not be lost.
|
|
INSERT INTO t1 (a, b) VALUES (1, '1');
|
|
INSERT INTO t1 (a, b) VALUES (2, '2');
|
|
INSERT INTO t1 (a, b) VALUES (3, '3');
|
|
INSERT INTO t1 (a, b) VALUES (4, '4');
|
|
INSERT INTO t1 (a, b) VALUES (5, '5');
|
|
|
|
# The BLOB insert will fail, and should disappear. However all data committed
|
|
# up to this point should not be lost.
|
|
start transaction;
|
|
--replace_regex /\(> [0-9]*\)/(> ####)/
|
|
--error ER_TOO_BIG_ROWSIZE
|
|
INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024));
|
|
|
|
connection default;
|
|
--source include/kill_and_restart_mysqld.inc
|
|
disconnect big_packets;
|
|
|
|
# We should see (1,2,3,4,5) here.
|
|
SELECT a FROM t1;
|
|
|
|
# Clean up.
|
|
DROP TABLE t1;
|