235
Truncate the binary log transaction cache.
238
binlog_trans_log_truncate()
240
session The thread to take the binlog data from
241
pos Position to truncate to
245
Truncate the binary log to the given position. Will not change
250
binlog_trans_log_truncate(Session *session, my_off_t pos)
252
assert(session_get_ha_data(session, binlog_hton) != NULL);
253
/* Only true if binlog_trans_log_savepos() wasn't called before */
254
assert(pos != ~(my_off_t) 0);
256
binlog_trx_data *const trx_data=
257
(binlog_trx_data*) session_get_ha_data(session, binlog_hton);
258
trx_data->truncate(pos);
264
235
this function is mostly a placeholder.
265
236
conceptually, binlog initialization (now mostly done in DRIZZLE_BIN_LOG::open)
266
237
should be moved here.
585
556
static int binlog_savepoint_set(handlerton *, Session *session, void *sv)
587
(void)replicator_savepoint_set(session, sv);
588
559
binlog_trans_log_savepos(session, (my_off_t*) sv);
589
560
/* Write it to the binary log */
592
session->binlog_query(Session::STMT_QUERY_TYPE,
593
session->query, session->query_length, true, false);
562
error= replicator_statement(session, session->query, session->query_length);
597
static int binlog_savepoint_rollback(handlerton *, Session *session, void *sv)
567
static int binlog_savepoint_rollback(handlerton *, Session *session, void *)
601
Write ROLLBACK TO SAVEPOINT to the binlog cache if we have updated some
602
non-transactional table. Otherwise, truncate the binlog cache starting
603
from the SAVEPOINT command.
605
if (unlikely(session->transaction.all.modified_non_trans_table ||
606
(session->options & OPTION_KEEP_LOG)))
609
session->binlog_query(Session::STMT_QUERY_TYPE,
610
session->query, session->query_length, true, false);
613
binlog_trans_log_truncate(session, *(my_off_t*)sv);
616
error= replicator_rollback_to_savepoint(session, sv);
571
error= replicator_statement(session, session->query, session->query_length);