diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-05-12 14:27:49 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-05-15 22:23:10 +0200 |
commit | f9264280d68dcbca2f9312c7d8620b2bcc9d0694 (patch) | |
tree | 4d68b8c47e162b862db88793d312bb93beab8e8b /mysql-test/t/myisam_debug.test | |
parent | 52aa200919b1fd9357c05bcdfc66a42e51f242b3 (diff) | |
download | mariadb-git-f9264280d68dcbca2f9312c7d8620b2bcc9d0694.tar.gz |
MDEV-12761 Error return from external_lock make the server crash
bunch of bugs when external_lock() fails on unlock:
* mi_lock_database() used mi_mark_crashed() under share->intern_lock,
but mi_mark_crashed() itself locks this mutex.
* handler::close() required table to be unlocked, but failed
external_lock didn't count as unlock
* mysql_unlock_tables() ignored all unlock errors, but they still set
the error status in stmt_da.
Diffstat (limited to 'mysql-test/t/myisam_debug.test')
-rw-r--r-- | mysql-test/t/myisam_debug.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/myisam_debug.test b/mysql-test/t/myisam_debug.test index 5b5d006bd22..57d423d88c9 100644 --- a/mysql-test/t/myisam_debug.test +++ b/mysql-test/t/myisam_debug.test @@ -59,3 +59,16 @@ KILL QUERY @thread_id; CHECK TABLE t1; DROP TABLE t1,t2; DISCONNECT insertConn; + +# +# MDEV-12761 Error return from external_lock make the server crash +# +call mtr.add_suppression('Incorrect key file for table'); +create table t1 (a int, index(a)); +lock tables t1 write; +insert t1 values (1),(2),(1); +set @old_dbug=@@debug_dbug; +set debug_dbug='+d,mi_lock_database_failure'; +unlock tables; +set debug_dbug=@old_dbug; +drop table t1; |