Commit eb38e7ef authored by Monty's avatar Monty

MDEV-22879 SIGSEGV (or hang) in free/my_free

This bug was already fixed in a previous commit.
Added test case from the MDEV to prove it's fixed.
parent 85613a32
......@@ -146,3 +146,22 @@ connection default;
disconnect con1;
show tables;
Tables_in_test
#
# MDEV-22879 SIGSEGV (or hang) in free/my_free from
# _ma_end_block_record (on optimized builds)
#
SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
ERROR HY000: Can't execute the query because you have a conflicting read lock
BACKUP UNLOCK;
CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
LOCK TABLES t3 AS a2 WRITE, t3 AS a1 READ LOCAL;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
DROP TABLE t3;
ERROR HY000: Can't execute the query because you have a conflicting read lock
BACKUP UNLOCK;
DROP TABLE t3;
#
# End of MariaDB 10.4 tests
#
......@@ -167,3 +167,26 @@ connection con1;
connection default;
disconnect con1;
show tables;
--echo #
--echo # MDEV-22879 SIGSEGV (or hang) in free/my_free from
--echo # _ma_end_block_record (on optimized builds)
--echo #
SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
--error ER_CANT_UPDATE_WITH_READLOCK
CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
BACKUP UNLOCK;
CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
--error ER_LOCK_OR_ACTIVE_TRANSACTION
LOCK TABLES t3 AS a2 WRITE, t3 AS a1 READ LOCAL;
--error ER_CANT_UPDATE_WITH_READLOCK
DROP TABLE t3;
BACKUP UNLOCK;
DROP TABLE t3;
--echo #
--echo # End of MariaDB 10.4 tests
--echo #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment