mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-32897 main suite test case prints extra row for metadata_lock_info query
- Added the parameter stats_persistent=0 for InnoDB engine. - Before printing metadata_lock_info query, make sure that InnoDB does complete purging. Reviewed by: Marko Mäkelä
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
#
|
||||
# Test lock taken
|
||||
#
|
||||
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
|
||||
InnoDB 0 transactions not purged
|
||||
BACKUP LOCK test.t1;
|
||||
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
|
||||
LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
|
||||
@ -23,7 +26,7 @@ BACKUP UNLOCK;
|
||||
#
|
||||
connect con1,localhost,root,,;
|
||||
connection default;
|
||||
create table t1 (a int) engine=innodb;
|
||||
create table t1 (a int) stats_persistent=0,engine=innodb;
|
||||
insert into t1 values (1);
|
||||
backup lock t1;
|
||||
select * from t1;
|
||||
@ -32,6 +35,7 @@ a
|
||||
connection con1;
|
||||
drop table t1;
|
||||
connection default;
|
||||
InnoDB 0 transactions not purged
|
||||
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
|
||||
LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
|
||||
MDL_SHARED_HIGH_PRIO Table metadata lock test t1
|
||||
@ -93,6 +97,7 @@ BACKUP LOCK t1;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
UNLOCK TABLES;
|
||||
INSERT INTO t1 VALUES(0);
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
|
||||
# restart
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
Reference in New Issue
Block a user