44
44
* Presumably, RESET and binlog writing doesn't require synchronization
46
write_bin_log(session, *session->getQueryString());
46
write_bin_log(getSession(), *getSession()->getQueryString());
47
getSession()->my_ok();
69
69
if (flush_tables || flush_tables_with_read_lock)
71
if (session && flush_tables_with_read_lock)
71
if (getSession() && flush_tables_with_read_lock)
73
if (session->lockGlobalReadLock())
73
if (getSession()->lockGlobalReadLock())
75
75
return true; /* Killed */
77
result= session->close_cached_tables(tables, true, true);
77
result= getSession()->close_cached_tables(tables, true, true);
79
if (session->makeGlobalReadLockBlockCommit()) /* Killed */
79
if (getSession()->makeGlobalReadLockBlockCommit()) /* Killed */
81
81
/* Don't leave things in a half-locked state */
82
session->unlockGlobalReadLock();
82
getSession()->unlockGlobalReadLock();
88
result= session->close_cached_tables(tables, true, false);
88
result= getSession()->close_cached_tables(tables, true, false);
92
if (session && flush_status)
92
if (getSession() && flush_status)
94
session->refresh_status();
94
getSession()->refresh_status();
97
if (session && flush_global_status)
97
if (getSession() && flush_global_status)
99
99
memset(¤t_global_counters, 0, sizeof(current_global_counters));
100
plugin::Logging::resetStats(session);
101
session->refresh_status();
100
plugin::Logging::resetStats(getSession());
101
getSession()->refresh_status();