1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-35944 DELETE fails to notice transaction abort, violating ACID

Process errors of read_record().

Also, add an assert that Marko requested
This commit is contained in:
Sergei Golubchik
2025-01-27 19:22:20 +01:00
parent d5e7bce14b
commit 03d2328785
4 changed files with 73 additions and 12 deletions

View File

@@ -24,3 +24,30 @@ SELECT * FROM t1;
c1
SET sort_buffer_size=@save_sort_buffer_size;
DROP TABLE t1;
#
# MDEV-35944 DELETE fails to notice transaction abort, violating ACID
#
CREATE TABLE t1 (id INT PRIMARY KEY, col_varchar VARCHAR(8)) ENGINE=InnoDB;
INSERT INTO t1 (id) VALUES (1),(2);
CREATE TABLE t2 (id INT, f INT, s DATE, e DATE, PERIOD FOR p(s,e), PRIMARY KEY(id, p WITHOUT OVERLAPS)) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1,0,'2000-01-01','2000-01-02');
CREATE TABLE t3 (id INT, f BLOB, UNIQUE(f)) ENGINE=InnoDB;
connection default;
SET innodb_lock_wait_timeout=1;
START TRANSACTION;
DELETE FROM t1;
connect con1,localhost,root,,;
START TRANSACTION;
UPDATE t2 SET f = 20;
connection default;
DELETE FROM t2 FOR PORTION OF p FROM '2000-01-01' TO '2000-01-02';
connection con1;
INSERT INTO t3 (id) VALUES (1), (2);
UPDATE t1 SET col_varchar = 'bar';
COMMIT;
connection default;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
COMMIT;
UPDATE t3 SET f = 'foo' ORDER BY f LIMIT 1;
DROP TABLE t1, t2, t3;
# End of 10.5 tests