mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.6 into 10.11
This commit is contained in:
@@ -534,7 +534,6 @@ INSERT INTO t1 VALUES(1,1);
|
||||
ROLLBACK;
|
||||
SET DEBUG_SYNC = 'now SIGNAL inserted';
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
@@ -543,6 +542,31 @@ CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-36281 DML aborts during online virtual index
|
||||
#
|
||||
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY, f2 INT NOT NULL,
|
||||
f3 INT NOT NULL, f4 INT AS (f3) VIRTUAL,
|
||||
f5 INT AS (f1) VIRTUAL, INDEX(f4))ENGINE=InnoDB;
|
||||
INSERT INTO t1(f1, f2, f3) VALUES(1, 2, 3);
|
||||
SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter SIGNAL dml_start WAIT_FOR dml_finish';
|
||||
ALTER TABLE t1 ADD INDEX v1(f5, f2, f4), ADD INDEX v2(f3, f5);
|
||||
connection con1;
|
||||
set DEBUG_SYNC="now WAIT_FOR dml_start";
|
||||
UPDATE t1 SET f3= f3 + 1;
|
||||
set DEBUG_SYNC="now SIGNAL dml_finish";
|
||||
disconnect con1;
|
||||
connection default;
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SELECT f5, f2, f4 FROM t1 USE INDEX(v1);
|
||||
f5 f2 f4
|
||||
1 2 4
|
||||
SELECT f3, f5 FROM t1 USE INDEX(v2);
|
||||
f3 f5
|
||||
4 1
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
||||
SET GLOBAL innodb_monitor_enable = default;
|
||||
|
@@ -2,8 +2,31 @@ SET @save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
|
||||
SET @save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
|
||||
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
|
||||
SET GLOBAL innodb_max_dirty_pages_pct=0.0;
|
||||
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
connect prevent_purge,localhost,root;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
connection default;
|
||||
SET GLOBAL innodb_max_purge_lag_wait=0;
|
||||
SET GLOBAL innodb_max_dirty_pages_pct=90.0;
|
||||
CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_10000;
|
||||
SELECT variable_value INTO @log_writes FROM information_schema.global_status
|
||||
WHERE variable_name='innodb_log_writes';
|
||||
BEGIN;
|
||||
INSERT INTO t SELECT * FROM seq_1_to_500;
|
||||
INSERT INTO t SELECT * FROM seq_501_to_1000;
|
||||
INSERT INTO t SELECT * FROM seq_1001_to_1500;
|
||||
INSERT INTO t SELECT * FROM seq_1501_to_2000;
|
||||
INSERT INTO t SELECT * FROM seq_2001_to_2500;
|
||||
INSERT INTO t SELECT * FROM seq_2501_to_3000;
|
||||
INSERT INTO t SELECT * FROM seq_3001_to_3500;
|
||||
INSERT INTO t SELECT * FROM seq_3501_to_4000;
|
||||
INSERT INTO t SELECT * FROM seq_4001_to_4500;
|
||||
INSERT INTO t SELECT * FROM seq_4501_to_5000;
|
||||
ROLLBACK;
|
||||
SELECT if(variable_value-@log_writes<10,'ok',variable_value-@log_writes)
|
||||
FROM information_schema.global_status WHERE variable_name='innodb_log_writes';
|
||||
if(variable_value-@log_writes<10,'ok',variable_value-@log_writes)
|
||||
ok
|
||||
disconnect prevent_purge;
|
||||
SELECT variable_value>0 FROM information_schema.global_status
|
||||
WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
|
||||
variable_value>0
|
||||
|
Reference in New Issue
Block a user