From 35e18c240b906c6c6cc76fdf9351744642a874fd Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 14 Sep 2022 19:59:05 +0200 Subject: [PATCH] race condition in the test this test loads sql_errlog plugin. then in a second connection it triggers an error, this locks the plugin in that thd. then the plugin is uninstalled in the default connection. but that doesn't unload the plugin, as it's still locked. it'll auto-unload after the foo connection is closed. without an explicit disconnect it is closed after mysqltest exits and the post-test check might still see sql_errlog not fully unoaded. --- mysql-test/suite/sys_vars/r/sysvars_star.result | 1 + mysql-test/suite/sys_vars/t/sysvars_star.test | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/sys_vars/r/sysvars_star.result b/mysql-test/suite/sys_vars/r/sysvars_star.result index eede5c17b36..b80515db23d 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_star.result +++ b/mysql-test/suite/sys_vars/r/sysvars_star.result @@ -108,6 +108,7 @@ global_value_path NULL connection default; select global_value_path from information_schema.system_variables where variable_name='plugin_maturity'; global_value_path var/my.cnf +disconnect foo; drop user foo@localhost; set global low_priority_updates=default; uninstall soname 'sql_errlog'; diff --git a/mysql-test/suite/sys_vars/t/sysvars_star.test b/mysql-test/suite/sys_vars/t/sysvars_star.test index 2f0ef5c9ab0..8d0aefdc4c7 100644 --- a/mysql-test/suite/sys_vars/t/sysvars_star.test +++ b/mysql-test/suite/sys_vars/t/sysvars_star.test @@ -34,8 +34,10 @@ select global_value_path from information_schema.system_variables where variable connection default; replace_regex /\/.*\//var\//; select global_value_path from information_schema.system_variables where variable_name='plugin_maturity'; - +disconnect foo; drop user foo@localhost; set global low_priority_updates=default; disable_warnings; uninstall soname 'sql_errlog'; +let $count_sessions= 1; +source include/wait_until_count_sessions.inc;