24 #include <drizzled/session.h>
25 #include <drizzled/lock.h>
26 #include <drizzled/statement/flush.h>
28 #include <drizzled/plugin/logging.h>
29 #include <drizzled/plugin/storage_engine.h>
30 #include <drizzled/statistics_variables.h>
51 if (plugin::StorageEngine::flushLogs(NULL))
60 if (flush_tables || flush_tables_with_read_lock)
62 if (&session() && flush_tables_with_read_lock)
64 if (session().lockGlobalReadLock())
68 result= session().close_cached_tables(tables,
true,
true);
70 if (session().makeGlobalReadLockBlockCommit())
73 session().unlockGlobalReadLock();
79 result= session().close_cached_tables(tables,
true,
false);
83 if (&session() && flush_status)
85 session().refresh_status();
88 if (&session() && flush_global_status)
90 memset(¤t_global_counters, 0,
sizeof(current_global_counters));
91 plugin::Logging::resetStats(&session());
92 session().refresh_status();
void my_ok(ha_rows affected_rows=0, ha_rows found_rows_arg=0, uint64_t passed_id=0, const char *message=NULL)