40
40
if (not reloadCache())
43
* We WANT to write and we CAN write.
44
* ! we write after unlocking the table.
46
* Presumably, RESET and binlog writing doesn't require synchronization
48
write_bin_log(getSession(), *getSession()->getQueryString());
49
getSession()->my_ok();
71
64
if (flush_tables || flush_tables_with_read_lock)
73
if (getSession() && flush_tables_with_read_lock)
66
if (&session() && flush_tables_with_read_lock)
75
if (getSession()->lockGlobalReadLock())
68
if (session().lockGlobalReadLock())
77
70
return true; /* Killed */
79
result= getSession()->close_cached_tables(tables, true, true);
72
result= session().close_cached_tables(tables, true, true);
81
if (getSession()->makeGlobalReadLockBlockCommit()) /* Killed */
74
if (session().makeGlobalReadLockBlockCommit()) /* Killed */
83
76
/* Don't leave things in a half-locked state */
84
getSession()->unlockGlobalReadLock();
77
session().unlockGlobalReadLock();
90
result= getSession()->close_cached_tables(tables, true, false);
83
result= session().close_cached_tables(tables, true, false);
94
if (getSession() && flush_status)
87
if (&session() && flush_status)
96
getSession()->refresh_status();
89
session().refresh_status();
99
if (getSession() && flush_global_status)
92
if (&session() && flush_global_status)
101
94
memset(¤t_global_counters, 0, sizeof(current_global_counters));
102
plugin::Logging::resetStats(getSession());
103
getSession()->refresh_status();
95
plugin::Logging::resetStats(&session());
96
session().refresh_status();