mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
a12fb5d0eb
Also, move part of the test back to innodb.innodb_mysql and another part to a new test innodb.purge. Last but not least, merge the tests innodb_zip.4k and innodb_zip.8k to innodb_zip.page_size.
117 lines
4.5 KiB
Text
117 lines
4.5 KiB
Text
--source include/have_innodb.inc
|
|
--source include/have_innodb_16k.inc
|
|
|
|
SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
|
|
|
|
--echo # Bug #12429576 - Test an assertion failure on purge.
|
|
CREATE TABLE t1_purge (
|
|
A int,
|
|
B blob, C blob, D blob, E blob,
|
|
F blob, G blob, H blob,
|
|
PRIMARY KEY (B(767), C(767), D(767), E(767), A),
|
|
INDEX (A)
|
|
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
|
|
|
INSERT INTO t1_purge VALUES (1,
|
|
REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
|
|
REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766));
|
|
|
|
CREATE TABLE t2_purge (
|
|
A int PRIMARY KEY,
|
|
B blob, C blob, D blob, E blob,
|
|
F blob, G blob, H blob, I blob,
|
|
J blob, K blob, L blob,
|
|
INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
|
|
|
INSERT INTO t2_purge VALUES (1,
|
|
REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
|
|
REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766),
|
|
REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766));
|
|
|
|
CREATE TABLE t3_purge (
|
|
A int,
|
|
B varchar(800), C varchar(800), D varchar(800), E varchar(800),
|
|
F varchar(800), G varchar(800), H varchar(800),
|
|
PRIMARY KEY (B(767), C(767), D(767), E(767), A),
|
|
INDEX (A)
|
|
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
|
|
|
INSERT INTO t3_purge SELECT * FROM t1_purge;
|
|
|
|
CREATE TABLE t4_purge (
|
|
A int PRIMARY KEY,
|
|
B varchar(800), C varchar(800), D varchar(800), E varchar(800),
|
|
F varchar(800), G varchar(800), H varchar(800), I varchar(800),
|
|
J varchar(800), K varchar(800), L varchar(800),
|
|
INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
|
|
|
INSERT INTO t4_purge SELECT * FROM t2_purge;
|
|
|
|
# This would trigger the failure (Bug #12429576)
|
|
# if purge gets a chance to run before DROP TABLE t1_purge, ....
|
|
DELETE FROM t1_purge;
|
|
DELETE FROM t2_purge;
|
|
DELETE FROM t3_purge;
|
|
DELETE FROM t4_purge;
|
|
# We need to activate the purge thread before DROP TABLE.
|
|
|
|
# Bug#12637786 - Assertion hit; ut_ad(dict_index_is_clust(index));
|
|
# A secondary index tuple is found to be too long to fit into a page.
|
|
# This test is not in innodb_8k or innodb_4k since the bug is not about
|
|
# page size. It just tests the condition that caused the assertion.
|
|
SET @r=REPEAT('a',500);
|
|
CREATE TABLE t12637786(a int,
|
|
v1 varchar(500), v2 varchar(500), v3 varchar(500),
|
|
v4 varchar(500), v5 varchar(500), v6 varchar(500),
|
|
v7 varchar(500), v8 varchar(500), v9 varchar(500),
|
|
v10 varchar(500), v11 varchar(500), v12 varchar(500),
|
|
v13 varchar(500), v14 varchar(500), v15 varchar(500),
|
|
v16 varchar(500), v17 varchar(500), v18 varchar(500)
|
|
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
|
CREATE INDEX idx1 ON t12637786(a,v1);
|
|
INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
|
|
UPDATE t12637786 SET a=1000;
|
|
DELETE FROM t12637786;
|
|
# We need to activate the purge thread before DROP TABLE
|
|
# to make sure it is able to clean up the old versions.
|
|
|
|
--echo # Bug#12963823 - Test that the purge thread does not crash when
|
|
# the number of indexes has changed since the UNDO record was logged.
|
|
# This test is not in innodb_8k or innodb_4k since the bug is not about
|
|
# page size. It just tests the condition that caused the crash.
|
|
CREATE TABLE t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
|
|
i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
|
|
ENGINE=innodb ROW_FORMAT=dynamic;
|
|
SET @r = REPEAT('a', 767);
|
|
INSERT INTO t12963823 VALUES (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
|
|
CREATE INDEX ndx_a ON t12963823 (a(500));
|
|
CREATE INDEX ndx_b ON t12963823 (b(500));
|
|
CREATE INDEX ndx_c ON t12963823 (c(500));
|
|
CREATE INDEX ndx_d ON t12963823 (d(500));
|
|
CREATE INDEX ndx_e ON t12963823 (e(500));
|
|
CREATE INDEX ndx_f ON t12963823 (f(500));
|
|
CREATE INDEX ndx_k ON t12963823 (k(500));
|
|
CREATE INDEX ndx_l ON t12963823 (l(500));
|
|
|
|
SET @r = REPEAT('b', 500);
|
|
UPDATE t12963823 set a=@r,b=@r,c=@r,d=@r;
|
|
UPDATE t12963823 set e=@r,f=@r,g=@r,h=@r;
|
|
UPDATE t12963823 set i=@r,j=@r,k=@r,l=@r;
|
|
UPDATE t12963823 set m=@r,n=@r,o=@r,p=@r;
|
|
ALTER TABLE t12963823 DROP INDEX ndx_a;
|
|
ALTER TABLE t12963823 DROP INDEX ndx_b;
|
|
CREATE INDEX ndx_g ON t12963823 (g(500));
|
|
CREATE INDEX ndx_h ON t12963823 (h(500));
|
|
CREATE INDEX ndx_i ON t12963823 (i(500));
|
|
CREATE INDEX ndx_j ON t12963823 (j(500));
|
|
CREATE INDEX ndx_m ON t12963823 (m(500));
|
|
CREATE INDEX ndx_n ON t12963823 (n(500));
|
|
CREATE INDEX ndx_o ON t12963823 (o(500));
|
|
CREATE INDEX ndx_p ON t12963823 (p(500));
|
|
SHOW CREATE TABLE t12963823;
|
|
# We need to activate the purge thread before DROP TABLE.
|
|
|
|
-- source include/wait_all_purged.inc
|
|
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge, t12637786, t12963823;
|
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|