mirror of
https://github.com/MariaDB/server.git
synced 2025-02-07 06:12:18 +01:00
![Thirunarayanan Balathandayuthapani](/assets/img/avatar_default.png)
Problem: ======= - innodb.log_file_name fails if it executes after innodb.lock_insert_into_empty in few cases. innodb.lock_insert_into_empty test case failed to cleanup the table t2. Rollback of create..select fails to remove the table when it fails to acquire the innodb statistics table. This leads to rename table in log_file_name test case fails. Solution: ======== - Cleanup the table t2 explictly after resetting innodb_lock_wait_timeout variable in innodb.lock_insert_into_empty test case.
65 lines
1.5 KiB
Text
65 lines
1.5 KiB
Text
--source include/have_innodb.inc
|
|
|
|
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
|
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
|
|
|
INSERT INTO t1 VALUES(0);
|
|
BEGIN;
|
|
DELETE FROM t1;
|
|
--error ER_DUP_ENTRY
|
|
INSERT INTO t2 VALUES(1),(1);
|
|
|
|
BEGIN;
|
|
SELECT * FROM t2 LOCK IN SHARE MODE;
|
|
|
|
connect (con1,localhost,root,,);
|
|
SET innodb_lock_wait_timeout=0;
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
INSERT INTO t2 VALUES(2);
|
|
connection default;
|
|
ROLLBACK;
|
|
connection con1;
|
|
INSERT INTO t2 VALUES(3);
|
|
COMMIT;
|
|
disconnect con1;
|
|
connection default;
|
|
|
|
SELECT * FROM t1;
|
|
SELECT * FROM t2;
|
|
DROP TABLE t1, t2;
|
|
|
|
--echo #
|
|
--echo # MDEV-24700 Assertion "lock not found"==0 in lock_table_x_unlock()
|
|
--echo #
|
|
SET FOREIGN_KEY_CHECKS=OFF;
|
|
CREATE TABLE t1 (id INT PRIMARY KEY, f INT REFERENCES nonexistent(x))
|
|
ENGINE=InnoDB;
|
|
SET FOREIGN_KEY_CHECKS=ON;
|
|
BEGIN;
|
|
INSERT IGNORE INTO t1 VALUES (1,11);
|
|
--error ER_NO_REFERENCED_ROW_2
|
|
REPLACE INTO t1 VALUES (1,12);
|
|
COMMIT;
|
|
|
|
DROP TABLE t1;
|
|
|
|
--echo #
|
|
--echo # MDEV-25942 Assertion failed in trx_t::drop_table()
|
|
--echo #
|
|
|
|
CREATE TABLE t1 (k INT PRIMARY KEY) ENGINE=InnoDB;
|
|
INSERT INTO t1 SET k=1;
|
|
START TRANSACTION;
|
|
INSERT INTO t1 SET k=2;
|
|
SELECT count(*) > 0 FROM mysql.innodb_index_stats lock in share mode;
|
|
|
|
--connect (con1,localhost,root,,test)
|
|
SET innodb_lock_wait_timeout=0;
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB
|
|
AS SELECT k FROM t1;
|
|
--disconnect con1
|
|
--connection default
|
|
SET innodb_lock_wait_timeout=default;
|
|
DROP TABLE t1;
|
|
DROP TABLE IF EXISTS t2;
|