Commit fa1aef39 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.2 into 10.3

parents 097786c4 1eb59c30
...@@ -6010,12 +6010,9 @@ static bool xtrabackup_prepare_func(char** argv) ...@@ -6010,12 +6010,9 @@ static bool xtrabackup_prepare_func(char** argv)
srv_shutdown_bg_undo_sources(); srv_shutdown_bg_undo_sources();
srv_purge_shutdown(); srv_purge_shutdown();
buf_flush_sync_all_buf_pools(); buf_flush_sync_all_buf_pools();
innodb_shutdown();
innobase_space_shutdown();
} }
else
innodb_shutdown();
innodb_shutdown();
innodb_free_param(); innodb_free_param();
/* output to metadata file */ /* output to metadata file */
......
...@@ -440,8 +440,8 @@ TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0 ...@@ -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,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, 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,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,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,plug,localhost,ID,0,DISCONNECT,test,,0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
......
...@@ -2069,13 +2069,9 @@ static void update_connection_info(struct connection_info *cn, ...@@ -2069,13 +2069,9 @@ static void update_connection_info(struct connection_info *cn,
{ {
case MYSQL_AUDIT_CONNECTION_CONNECT: case MYSQL_AUDIT_CONNECTION_CONNECT:
setup_connection_connect(cn, event); setup_connection_connect(cn, event);
if (event->status == 0 && event->proxy_user && event->proxy_user[0])
log_proxy(cn, event);
break; break;
case MYSQL_AUDIT_CONNECTION_CHANGE_USER: case MYSQL_AUDIT_CONNECTION_CHANGE_USER:
*after_action= AA_CHANGE_USER; *after_action= AA_CHANGE_USER;
if (event->proxy_user && event->proxy_user[0])
log_proxy(cn, event);
break; break;
default:; default:;
} }
...@@ -2193,6 +2189,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev) ...@@ -2193,6 +2189,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
{ {
case MYSQL_AUDIT_CONNECTION_CONNECT: case MYSQL_AUDIT_CONNECTION_CONNECT:
log_connection(cn, event, event->status ? "FAILED_CONNECT": "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; break;
case MYSQL_AUDIT_CONNECTION_DISCONNECT: case MYSQL_AUDIT_CONNECTION_DISCONNECT:
if (use_event_data_for_disconnect) if (use_event_data_for_disconnect)
...@@ -2202,6 +2200,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev) ...@@ -2202,6 +2200,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
break; break;
case MYSQL_AUDIT_CONNECTION_CHANGE_USER: case MYSQL_AUDIT_CONNECTION_CHANGE_USER:
log_connection(cn, event, "CHANGEUSER"); log_connection(cn, event, "CHANGEUSER");
if (event->proxy_user && event->proxy_user[0])
log_proxy(cn, event);
break; break;
default:; default:;
} }
......
...@@ -3484,10 +3484,12 @@ ha_innobase::init_table_handle_for_HANDLER(void) ...@@ -3484,10 +3484,12 @@ ha_innobase::init_table_handle_for_HANDLER(void)
reset_template(); 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) { if (fil_system.temp_space) {
fil_system.temp_space->close(); fil_system.temp_space->close();
...@@ -3502,16 +3504,6 @@ void innobase_space_shutdown() ...@@ -3502,16 +3504,6 @@ void innobase_space_shutdown()
#ifdef WITH_INNODB_DISALLOW_WRITES #ifdef WITH_INNODB_DISALLOW_WRITES
os_event_destroy(srv_allow_writes_event); os_event_destroy(srv_allow_writes_event);
#endif /* WITH_INNODB_DISALLOW_WRITES */ #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); DBUG_RETURN(1);
} }
...@@ -4322,7 +4314,6 @@ innobase_end(handlerton*, ha_panic_function) ...@@ -4322,7 +4314,6 @@ innobase_end(handlerton*, ha_panic_function)
} }
innodb_shutdown(); innodb_shutdown();
innobase_space_shutdown();
mysql_mutex_destroy(&commit_cond_m); mysql_mutex_destroy(&commit_cond_m);
mysql_cond_destroy(&commit_cond); mysql_cond_destroy(&commit_cond);
......
...@@ -972,6 +972,3 @@ which is in the prepared state ...@@ -972,6 +972,3 @@ which is in the prepared state
@return 0 or error number */ @return 0 or error number */
int innobase_rollback_by_xid(handlerton* hton, XID* xid); int innobase_rollback_by_xid(handlerton* hton, XID* xid);
/** Free tablespace resources allocated. */
void innobase_space_shutdown();
...@@ -2654,6 +2654,17 @@ void innodb_shutdown() ...@@ -2654,6 +2654,17 @@ void innodb_shutdown()
sync_check_close(); 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) { if (srv_was_started && srv_print_verbose_log) {
ib::info() << "Shutdown completed; log sequence number " ib::info() << "Shutdown completed; log sequence number "
<< srv_shutdown_lsn << srv_shutdown_lsn
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment