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. */
| 2312 | nonzero if an error pops up when flushing the cache. |
| 2313 | */ |
| 2314 | static inline int |
| 2315 | binlog_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 | |
| 2335 | inline size_t serialize_with_xid(XID *xid, char *buf, size_t buf_size, |
no test coverage detected