457
457
Otherwise, we accumulate the statement
459
460
uint64_t const in_transaction=
460
461
session->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN);
461
464
if ((in_transaction && (all || (!trx_data->at_least_one_stmt && session->transaction.stmt.modified_non_trans_table))) || (!in_transaction && !all))
463
466
Query_log_event qev(session, STRING_WITH_LEN("COMMIT"), true, false);
464
467
qev.error_code= 0; // see comment in DRIZZLE_LOG::write(Session, IO_CACHE)
465
468
/* TODO: Fix return type */
469
int error= binlog_end_trans(session, trx_data, &qev, all);
466
470
(void)replicator_end_transaction(session, all, true);
467
int error= binlog_end_trans(session, trx_data, &qev, all);