457
457
if ((changed && error <= 0) || session->transaction.stmt.modified_non_trans_table || was_insert_delayed)
459
if (drizzle_bin_log.is_open())
464
[Guilhem wrote] Temporary errors may have filled
465
session->net.last_error/errno. For example if there has
466
been a disk full error when writing the row, and it was
467
MyISAM, then session->net.last_error/errno will be set to
468
"disk full"... and the my_pwrite() will wait until free
469
space appears, and so when it finishes then the
470
write_row() was entirely successful
472
/* todo: consider removing */
473
session->clear_error();
477
A query which per-row-loop can not be interrupted with
478
KILLED, like INSERT, and that does not invoke stored
479
routines can be binlogged with neglecting the KILLED error.
481
If there was no error (error == zero) until after the end of
482
inserting loop the KILLED flag that appeared later can be
483
disregarded since previously possible invocation of stored
484
routines did not result in any error due to the KILLED. In
485
such case the flag is ignored for constructing binlog event.
487
assert(session->killed != Session::KILL_BAD_DATA || error > 0);
488
if (session->binlog_query(Session::ROW_QUERY_TYPE,
489
session->query, session->query_length,
490
transactional_table, false,
491
(error>0) ? session->killed : Session::NOT_KILLED) &&
497
459
if (session->transaction.stmt.modified_non_trans_table)
498
460
session->transaction.all.modified_non_trans_table= true;
1405
1366
assert(trans_table || !changed ||
1406
1367
session->transaction.stmt.modified_non_trans_table);
1409
Write to binlog before commiting transaction. No statement will
1410
be written by the binlog_query() below in RBR mode. All the
1411
events are in the transaction cache and will be written when
1412
ha_autocommit_or_rollback() is issued below.
1414
if (drizzle_bin_log.is_open())
1417
session->clear_error();
1418
session->binlog_query(Session::ROW_QUERY_TYPE,
1419
session->query, session->query_length,
1420
trans_table, false, killed_status);
1422
1369
table->file->ha_release_auto_increment();
1478
1425
changed= (info.copied || info.deleted || info.updated);
1479
1426
transactional_table= table->file->has_transactions();
1480
if (session->transaction.stmt.modified_non_trans_table)
1482
if (drizzle_bin_log.is_open())
1483
session->binlog_query(Session::ROW_QUERY_TYPE, session->query, session->query_length,
1484
transactional_table, false);
1486
1427
assert(transactional_table || !changed ||
1487
1428
session->transaction.stmt.modified_non_trans_table);
1488
1429
table->file->ha_release_auto_increment();
1847
1788
result= store_create_info(session, &tmp_table_list, &query, create_info);
1848
1789
assert(result == 0); /* store_create_info() always return 0 */
1850
session->binlog_query(Session::STMT_QUERY_TYPE,
1851
query.ptr(), query.length(),
1852
/* is_trans */ true,
1853
/* suppress_use */ false);
1856
1792
void select_create::store_values(List<Item> &values)