MCPcopy Create free account
hub / github.com/MariaDB/server / binlog_commit_flush_stmt_cache

Function binlog_commit_flush_stmt_cache

sql/log.cc:2314–2332  ·  view source on GitHub ↗

This function flushes the stmt-cache upon commit. @param thd The thread whose transaction should be flushed @param cache_mngr Pointer to the cache manager @return nonzero if an error pops up when flushing the cache. */

Source from the content-addressed store, hash-verified

2312 nonzero if an error pops up when flushing the cache.
2313*/
2314static inline int
2315binlog_commit_flush_stmt_cache(THD *thd, bool all,
2316 binlog_cache_mngr *cache_mngr)
2317{
2318 DBUG_ENTER("binlog_commit_flush_stmt_cache");
2319#ifdef WITH_WSREP
2320 if (thd->wsrep_mysql_replicated > 0)
2321 {
2322 DBUG_ASSERT(WSREP(thd));
2323 WSREP_DEBUG("avoiding binlog_commit_flush_trx_cache: %d",
2324 thd->wsrep_mysql_replicated);
2325 return 0;
2326 }
2327#endif
2328
2329 Query_log_event end_evt(thd, STRING_WITH_LEN("COMMIT"),
2330 FALSE, TRUE, TRUE, 0);
2331 DBUG_RETURN(binlog_flush_cache(thd, cache_mngr, &end_evt, all, TRUE, FALSE));
2332}
2333
2334
2335inline size_t serialize_with_xid(XID *xid, char *buf, size_t buf_size,

Callers 2

binlog_commitFunction · 0.85
binlog_rollbackFunction · 0.85

Calls 1

binlog_flush_cacheFunction · 0.85

Tested by

no test coverage detected