From 6d21b6acb852ad86678452fe0f78122c75382b03 Mon Sep 17 00:00:00 2001 From: Monty Date: Thu, 27 May 2021 13:11:17 +0300 Subject: [PATCH 1/4] Updated main.trigger-trans.test to make it more resiliant --- mysql-test/main/trigger-trans.result | 5 +++-- mysql-test/main/trigger-trans.test | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mysql-test/main/trigger-trans.result b/mysql-test/main/trigger-trans.result index 24ef9a4291a..2113377b1ab 100644 --- a/mysql-test/main/trigger-trans.result +++ b/mysql-test/main/trigger-trans.result @@ -234,11 +234,12 @@ DROP TABLE t3, t2, t1; # void MDL_context::release_lock(MDL_ticket*) # CREATE TABLE t1 (id int(11)) ENGINE=InnoDB; -SET max_statement_time= 0.001; LOCK TABLES t1 WRITE; +SET max_statement_time= 0.001; CREATE TRIGGER tr16 AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t1 VALUES (1); -DROP TABLE t1; SET max_statement_time= default; +DROP TRIGGER IF EXISTS trg16; +DROP TABLE t1; # # End of 10.5 tests # diff --git a/mysql-test/main/trigger-trans.test b/mysql-test/main/trigger-trans.test index 378da045e0a..5d7d1f8afef 100644 --- a/mysql-test/main/trigger-trans.test +++ b/mysql-test/main/trigger-trans.test @@ -240,11 +240,17 @@ DROP TABLE t3, t2, t1; --echo # CREATE TABLE t1 (id int(11)) ENGINE=InnoDB; -SET max_statement_time= 0.001; LOCK TABLES t1 WRITE; +SET max_statement_time= 0.001; +--error 0,1969,2013 +--disable_warnings CREATE TRIGGER tr16 AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t1 VALUES (1); -DROP TABLE t1; +--enable_warnings SET max_statement_time= default; +--disable_warnings +DROP TRIGGER IF EXISTS trg16; +--enable_warnings +DROP TABLE t1; --echo # --echo # End of 10.5 tests From a8434c6c59e291b65f1e294cafa4555470c3094c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 2 Jun 2021 08:25:12 +0300 Subject: [PATCH 2/4] MDEV-25730 fixup: GCC -Og -Wmaybe-uninitialized Silence a warning about an uninitialized variable that was introduced by commit d8fa71a089aa5cbe569e7f8b6fa67326a9ecab2b. --- sql/sql_admin.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 3fa00b81f2e..41af1e22de6 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -515,6 +515,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, if (thd->check_killed()) { + open_error= false; fatal_error= true; result_code= HA_ADMIN_FAILED; goto send_result; From 4847a2e730877f00971f10de3e2656d2b418fac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 2 Jun 2021 08:28:48 +0300 Subject: [PATCH 3/4] MDEV-17749 fixup: ./mtr --embedded main.lock_kill --- mysql-test/main/lock_kill.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/main/lock_kill.test b/mysql-test/main/lock_kill.test index d0b83fe1413..dfeebbc4f6a 100644 --- a/mysql-test/main/lock_kill.test +++ b/mysql-test/main/lock_kill.test @@ -17,7 +17,7 @@ LOCK TABLE t1 WRITE; eval KILL $conid; --enable_query_log --connection con1 ---error 0,2013 +--error 0,2013,ER_CONNECTION_KILLED reap; --connection default --disconnect con1 @@ -35,7 +35,7 @@ LOCK TABLE t1 WRITE, t2 WRITE; eval KILL $conid; --enable_query_log --connection con1 ---error 0,2013 +--error 0,2013,ER_CONNECTION_KILLED reap; --connection default --disconnect con1 From 8426c7411bcd1c3efec6a65db98266b0cad5f62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 2 Jun 2021 08:48:09 +0300 Subject: [PATCH 4/4] MDEV-23399 fixup for MDEV-10814 buf_madvise_do_dump(): Fix a mutex release that was broken in commit 7cffb5f6e8a231a041152447be8980ce35d2c9b8. This function is not covered by any tests. Its only purpose is to be called from a debugger so that buffers that would normally be excluded from core dumps ever since commit b600f30786816e33c1706dd36cdabf21034dc781 can be included. --- storage/innobase/buf/buf0buf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 4b0e1edd6c9..72f44ab9c32 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1021,7 +1021,7 @@ buf_madvise_do_dump() ret+= madvise(chunk->mem, chunk->mem_size(), MADV_DODUMP); } - mysql_mutex_lock(&buf_pool.mutex); + mysql_mutex_unlock(&buf_pool.mutex); return ret; } #endif