summaryrefslogtreecommitdiffstats
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
commit347c164c35eddab388009470e6848cb361ac93f8 (patch)
tree2c0c44eac690f510bb0a35b2a13b36d606b77b6b /sql/sql_reload.cc
parentReleasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff)
downloadmariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz
mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r--sql/sql_reload.cc25
1 files changed, 24 insertions, 1 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 8f0f15a9..f6f5cf20 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -68,6 +68,15 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
bool result=0;
select_errors=0; /* Write if more errors */
int tmp_write_to_binlog= *write_to_binlog= 1;
+#ifndef DBUG_OFF
+ /*
+ When invoked for handling a SIGHUP by rpl_shutdown_sighup.test, we need to
+ force the signal handler to wait after REFRESH_TABLES, as that will check
+ for a killed server, and we need to call hostname_cache_refresh after
+ server cleanup has happened to trigger MDEV-30260.
+ */
+ int do_dbug_sleep= 0;
+#endif
DBUG_ASSERT(!thd || !thd->in_sub_stmt);
@@ -100,6 +109,15 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
*/
my_error(ER_UNKNOWN_ERROR, MYF(0));
}
+
+#ifndef DBUG_OFF
+ DBUG_EXECUTE_IF("hold_sighup_log_refresh", {
+ DBUG_ASSERT(!debug_sync_set_action(
+ thd, STRING_WITH_LEN("now SIGNAL in_reload_acl_and_cache "
+ "WAIT_FOR refresh_logs")));
+ do_dbug_sleep= 1;
+ });
+#endif
}
opt_noacl= 0;
@@ -352,6 +370,11 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
}
my_dbopt_cleanup();
}
+
+#ifndef DBUG_OFF
+ if (do_dbug_sleep)
+ my_sleep(3000000); // 3s
+#endif
if (options & REFRESH_HOSTS)
hostname_cache_refresh();
if (thd && (options & REFRESH_STATUS))
@@ -370,7 +393,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
}
}
#endif
-#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
if (options & REFRESH_DES_KEY_FILE)
{
if (des_key_file && load_des_key_file(des_key_file))