diff options
author | Monty <monty@mariadb.org> | 2020-10-29 17:06:56 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-10-29 19:20:10 +0200 |
commit | eb38e7ef607146ca307ab15e2d5cdb49209d3c7e (patch) | |
tree | 601eba3ccf02624603bd7e74792def6ef34d0593 | |
parent | 85613a32477ef4b8fb9aefba5f61689028f3ff87 (diff) | |
download | mariadb-git-eb38e7ef607146ca307ab15e2d5cdb49209d3c7e.tar.gz |
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.
-rw-r--r-- | mysql-test/main/backup_locks.result | 19 | ||||
-rw-r--r-- | mysql-test/main/backup_locks.test | 23 |
2 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/main/backup_locks.result b/mysql-test/main/backup_locks.result index f1c02677b7a..1505c39f166 100644 --- a/mysql-test/main/backup_locks.result +++ b/mysql-test/main/backup_locks.result @@ -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 +# diff --git a/mysql-test/main/backup_locks.test b/mysql-test/main/backup_locks.test index ed7d3875d1d..d2f3d95d703 100644 --- a/mysql-test/main/backup_locks.test +++ b/mysql-test/main/backup_locks.test @@ -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 # |