MCPcopy Create free account
hub / github.com/Tencent/phxsql / truncate

Method truncate

phx_percona/percona/sql/binlog.cc:482–488  ·  view source on GitHub ↗

It truncates the cache to a certain position. This includes deleting the pending event. */

Source from the content-addressed store, hash-verified

480 pending event.
481 */
482 void truncate(my_off_t pos)
483 {
484 DBUG_PRINT("info", ("truncating to position %lu", (ulong) pos));
485 remove_pending_event();
486 reinit_io_cache(&cache_log, WRITE_CACHE, pos, 0, 0);
487 cache_log.end_of_file= saved_max_binlog_cache_size;
488 }
489
490 /**
491 Flush pending event to the cache buffer.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected