MCPcopy Create free account
hub / github.com/MariaDB/server / restore_ptr_backup

Function restore_ptr_backup

sql/sql_plugin.cc:4478–4482  ·  view source on GitHub ↗

On dlclose() we need to restore values of all symbols that we've modified in the DSO. The reason is - the DSO might not actually be unloaded, so on the next dlopen() these symbols will have old values, they won't be reinitialized. Perhaps, there can be many reason, why a DSO won't be unloaded. Strictly speaking, it's implementation defined whether to unload an unused DSO or to keep it

Source from the content-addressed store, hash-verified

4476 state before dlclose().
4477*/
4478static void restore_ptr_backup(uint n, st_ptr_backup *backup)
4479{
4480 while (n--)
4481 (backup++)->restore();
4482}
4483
4484/****************************************************************************
4485 thd specifics service, see include/mysql/service_thd_specifics.h

Callers 5

free_plugin_memFunction · 0.85
plugin_dl_addFunction · 0.85
plugin_delFunction · 0.85
construct_help_optionsFunction · 0.85
test_plugin_optionsFunction · 0.85

Calls 1

restoreMethod · 0.45

Tested by 1

test_plugin_optionsFunction · 0.68