MDEV-16264 prerequisite patch, ha_preshutdown.

This is a prerequisite patch required to remove Innodb's
thd_destructor_proxy thread.

The patch implement pre-shutdown functionality for handlers.

A storage engine might need to perform some work after all user
connections are shut down, but before killing off the plugins.

The reason is that an SE could still be using some of the
server infrastructure. In case of Innodb this would be purge threads,
that call into the server to calculate results of virtual function,
acquire MDL locks on tables, or possibly also use the audit plugins.
This commit is contained in:
Vladislav Vaintroub 2019-10-29 18:32:14 +01:00
commit 7e08dd85d6
3 changed files with 32 additions and 1 deletions

View file

@ -5743,7 +5743,7 @@ int mysqld_main(int argc, char **argv)
#endif
close_connections();
ha_pre_shutdown();
clean_up(1);
sd_notify(0, "STATUS=MariaDB server is down");