diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-23 14:25:45 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-23 14:25:45 +0200 |
commit | fa1aef39ebc7d84d24d4e3d2124f982526632ee9 (patch) | |
tree | 08c7c3badde31bf2d9613204846f07e02ce36f0a | |
parent | 097786c485c6d10064e8bc593b6aa54e477712f9 (diff) | |
parent | 1eb59c307de163b507efade1fc372d8ff2bb94b7 (diff) | |
download | mariadb-git-fa1aef39ebc7d84d24d4e3d2124f982526632ee9.tar.gz |
Merge 10.2 into 10.3
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 5 | ||||
-rw-r--r-- | mysql-test/suite/plugins/r/server_audit.result | 2 | ||||
-rw-r--r-- | plugin/server_audit/server_audit.c | 8 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 19 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.h | 3 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 11 |
6 files changed, 22 insertions, 26 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index e705c00465f..57af73bfd0d 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -6010,12 +6010,9 @@ static bool xtrabackup_prepare_func(char** argv) srv_shutdown_bg_undo_sources(); srv_purge_shutdown(); buf_flush_sync_all_buf_pools(); - innodb_shutdown(); - innobase_space_shutdown(); } - else - innodb_shutdown(); + innodb_shutdown(); innodb_free_param(); /* output to metadata file */ diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result index 7c287b369b1..f309b6c95a3 100644 --- a/mysql-test/suite/plugins/r/server_audit.result +++ b/mysql-test/suite/plugins/r/server_audit.result @@ -440,8 +440,8 @@ TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0 TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0 -TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0 TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,test,,0 +TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0 TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,test,,0 TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index bb80e7aa74b..0ab8ea75b49 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -2069,13 +2069,9 @@ static void update_connection_info(struct connection_info *cn, { case MYSQL_AUDIT_CONNECTION_CONNECT: setup_connection_connect(cn, event); - if (event->status == 0 && event->proxy_user && event->proxy_user[0]) - log_proxy(cn, event); break; case MYSQL_AUDIT_CONNECTION_CHANGE_USER: *after_action= AA_CHANGE_USER; - if (event->proxy_user && event->proxy_user[0]) - log_proxy(cn, event); break; default:; } @@ -2193,6 +2189,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev) { case MYSQL_AUDIT_CONNECTION_CONNECT: log_connection(cn, event, event->status ? "FAILED_CONNECT": "CONNECT"); + if (event->status == 0 && event->proxy_user && event->proxy_user[0]) + log_proxy(cn, event); break; case MYSQL_AUDIT_CONNECTION_DISCONNECT: if (use_event_data_for_disconnect) @@ -2202,6 +2200,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev) break; case MYSQL_AUDIT_CONNECTION_CHANGE_USER: log_connection(cn, event, "CHANGEUSER"); + if (event->proxy_user && event->proxy_user[0]) + log_proxy(cn, event); break; default:; } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e66a340a7f0..c6ca287b8f4 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3484,10 +3484,12 @@ ha_innobase::init_table_handle_for_HANDLER(void) reset_template(); } -/** Free tablespace resources allocated. */ -void innobase_space_shutdown() +/*********************************************************************//** +Free any resources that were allocated and return failure. +@return always return 1 */ +static int innodb_init_abort() { - DBUG_ENTER("innobase_space_shutdown"); + DBUG_ENTER("innodb_init_abort"); if (fil_system.temp_space) { fil_system.temp_space->close(); @@ -3502,16 +3504,6 @@ void innobase_space_shutdown() #ifdef WITH_INNODB_DISALLOW_WRITES os_event_destroy(srv_allow_writes_event); #endif /* WITH_INNODB_DISALLOW_WRITES */ - - DBUG_VOID_RETURN; -} - -/** Free any resources that were allocated and return failure. -@return always return 1 */ -static int innodb_init_abort() -{ - DBUG_ENTER("innodb_init_abort"); - innobase_space_shutdown(); DBUG_RETURN(1); } @@ -4322,7 +4314,6 @@ innobase_end(handlerton*, ha_panic_function) } innodb_shutdown(); - innobase_space_shutdown(); mysql_mutex_destroy(&commit_cond_m); mysql_cond_destroy(&commit_cond); diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 6facc9d2e6f..58f825cebda 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -972,6 +972,3 @@ which is in the prepared state @return 0 or error number */ int innobase_rollback_by_xid(handlerton* hton, XID* xid); - -/** Free tablespace resources allocated. */ -void innobase_space_shutdown(); diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 318ab49cc9c..f7ea8c985f6 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -2654,6 +2654,17 @@ void innodb_shutdown() sync_check_close(); + srv_sys_space.shutdown(); + if (srv_tmp_space.get_sanity_check_status()) { + fil_system.temp_space->close(); + srv_tmp_space.delete_files(); + } + srv_tmp_space.shutdown(); + +#ifdef WITH_INNODB_DISALLOW_WRITES + os_event_destroy(srv_allow_writes_event); +#endif /* WITH_INNODB_DISALLOW_WRITES */ + if (srv_was_started && srv_print_verbose_log) { ib::info() << "Shutdown completed; log sequence number " << srv_shutdown_lsn |