1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Spider cannot run DDL (e.g. create tables) before ddl recovery

use signal_ddl_recovery_done callback for that.

also make the server to call signal_ddl_recovery_done() when loading
plugins at run-time (so that plugins would't need to detect that
on their own)
This commit is contained in:
Sergei Golubchik
2023-12-15 19:58:31 +01:00
parent e95bba9c58
commit 0930eb86cb
2 changed files with 15 additions and 7 deletions

View File

@@ -629,7 +629,7 @@ int ha_finalize_handlerton(st_plugin_int *plugin)
const char *hton_no_exts[]= { 0 };
static bool ddl_recovery_done= false;
int ha_initialize_handlerton(st_plugin_int *plugin)
{
@@ -779,6 +779,9 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
resolve_sysvar_table_options(hton);
update_discovery_counters(hton, 1);
if (ddl_recovery_done && hton->signal_ddl_recovery_done)
hton->signal_ddl_recovery_done(hton);
DBUG_RETURN(ret);
err_deinit:
@@ -975,6 +978,7 @@ void ha_signal_ddl_recovery_done()
DBUG_ENTER("ha_signal_ddl_recovery_done");
plugin_foreach(NULL, signal_ddl_recovery_done, MYSQL_STORAGE_ENGINE_PLUGIN,
NULL);
ddl_recovery_done= true;
DBUG_VOID_RETURN;
}