mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-11802 innodb.innodb_bug14676111 fails on buildbot
The test was unnecessarily depending on InnoDB purge, which can sometimes fail to proceed. Let us rewrite the test to use BEGIN;INSERT;ROLLBACK to cause the immediate removal of the desired records.
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
drop table if exists t1;
|
||||
set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
|
||||
CREATE TABLE t1 (a int not null primary key) engine=InnoDB;
|
||||
set global innodb_limit_optimistic_insert_debug = 2;
|
||||
insert into t1 values (1);
|
||||
begin;
|
||||
insert into t1 values (5);
|
||||
begin;
|
||||
insert into t1 values (4);
|
||||
insert into t1 values (3);
|
||||
begin;
|
||||
insert into t1 values (2);
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
@@ -12,14 +15,14 @@ test.t1 analyze status OK
|
||||
select DATA_LENGTH / 16384 from information_schema.TABLES where TABLE_SCHEMA = 'test' and TABLE_NAME = 't1';
|
||||
DATA_LENGTH / 16384
|
||||
10.0000
|
||||
delete from t1 where a=4;
|
||||
rollback;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
select DATA_LENGTH / 16384 from information_schema.TABLES where TABLE_SCHEMA = 'test' and TABLE_NAME = 't1';
|
||||
DATA_LENGTH / 16384
|
||||
8.0000
|
||||
delete from t1 where a=5;
|
||||
rollback;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
@@ -27,23 +30,25 @@ select DATA_LENGTH / 16384 from information_schema.TABLES where TABLE_SCHEMA = '
|
||||
DATA_LENGTH / 16384
|
||||
5.0000
|
||||
set global innodb_limit_optimistic_insert_debug = 10000;
|
||||
delete from t1 where a=2;
|
||||
rollback;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
select DATA_LENGTH / 16384 from information_schema.TABLES where TABLE_SCHEMA = 'test' and TABLE_NAME = 't1';
|
||||
DATA_LENGTH / 16384
|
||||
3.0000
|
||||
begin;
|
||||
insert into t1 values (2);
|
||||
delete from t1 where a=2;
|
||||
rollback;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
select DATA_LENGTH / 16384 from information_schema.TABLES where TABLE_SCHEMA = 'test' and TABLE_NAME = 't1';
|
||||
DATA_LENGTH / 16384
|
||||
2.0000
|
||||
begin;
|
||||
insert into t1 values (2);
|
||||
delete from t1 where a=2;
|
||||
rollback;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
@@ -51,3 +56,4 @@ select DATA_LENGTH / 16384 from information_schema.TABLES where TABLE_SCHEMA = '
|
||||
DATA_LENGTH / 16384
|
||||
1.0000
|
||||
drop table t1;
|
||||
set global innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug;
|
||||
|
Reference in New Issue
Block a user