Commit 1924594b authored by Marko Mäkelä's avatar Marko Mäkelä Committed by Sergei Golubchik

Minor (mainly non-functional) cleanup

parent b1818dcc
......@@ -8033,29 +8033,20 @@ ha_innobase::write_row(
DBUG_ENTER("ha_innobase::write_row");
trx_t* trx = thd_to_trx(m_user_thd);
ins_mode_t vers_set_fields;
/* Validation checks before we commence write_row operation. */
if (high_level_read_only) {
ib_senderrf(ha_thd(), IB_LOG_LEVEL_WARN, ER_READ_ONLY_MODE);
DBUG_RETURN(HA_ERR_TABLE_READONLY);
} else if (m_prebuilt->trx != trx) {
ib::error() << "The transaction object for the table handle is"
" at " << static_cast<const void*>(m_prebuilt->trx)
<< ", but for the current thread it is at "
<< static_cast<const void*>(trx);
fputs("InnoDB: Dump of 200 bytes around m_prebuilt: ", stderr);
ut_print_buf(stderr, ((const byte*) m_prebuilt) - 100, 200);
fputs("\nInnoDB: Dump of 200 bytes around ha_data: ", stderr);
ut_print_buf(stderr, ((const byte*) trx) - 100, 200);
putc('\n', stderr);
ut_error;
} else if (!trx_is_started(trx)) {
}
ut_a(m_prebuilt->trx == trx);
if (!trx_is_started(trx)) {
++trx->will_lock;
}
ins_mode_t vers_set_fields;
/* Handling of Auto-Increment Columns. */
if (table->next_number_field && record == table->record[0]) {
......
......@@ -1720,7 +1720,7 @@ lock_rec_enqueue_waiting(
trx_t* trx = thr_get_trx(thr);
if (trx->mysql_thd && thd_lock_wait_timeout(trx->mysql_thd) == 0) {
//trx->error_state = DB_LOCK_WAIT_TIMEOUT;
trx->error_state = DB_LOCK_WAIT_TIMEOUT;
return DB_LOCK_WAIT_TIMEOUT;
}
......@@ -3119,19 +3119,15 @@ lock_update_merge_right(
lock_rec_reset_and_release_wait_low(
lock_sys.rec_hash, left_block, PAGE_HEAP_NO_SUPREMUM);
#ifdef UNIV_DEBUG
/* there should exist no page lock on the left page,
otherwise, it will be blocked from merge */
ulint space = left_block->page.id.space();
ulint page_no = left_block->page.id.page_no();
ut_ad(lock_rec_get_first_on_page_addr(
lock_sys.prdt_page_hash, space, page_no) == NULL);
#endif /* UNIV_DEBUG */
ut_ad(!lock_rec_get_first_on_page_addr(lock_sys.prdt_page_hash,
left_block->page.id.space(),
left_block->page.id.page_no()));
lock_rec_free_all_from_discard_page(left_block);
lock_mutex_exit();
}
/*************************************************************//**
......@@ -3244,15 +3240,12 @@ lock_update_merge_left(
lock_rec_move(left_block, right_block,
PAGE_HEAP_NO_SUPREMUM, PAGE_HEAP_NO_SUPREMUM);
#ifdef UNIV_DEBUG
/* there should exist no page lock on the right page,
otherwise, it will be blocked from merge */
ulint space = right_block->page.id.space();
ulint page_no = right_block->page.id.page_no();
lock_t* lock_test = lock_rec_get_first_on_page_addr(
lock_sys.prdt_page_hash, space, page_no);
ut_ad(!lock_test);
#endif /* UNIV_DEBUG */
ut_ad(!lock_rec_get_first_on_page_addr(
lock_sys.prdt_page_hash,
right_block->page.id.space(),
right_block->page.id.page_no()));
lock_rec_free_all_from_discard_page(right_block);
......
......@@ -205,7 +205,7 @@ bool trx_rseg_read_wsrep_checkpoint(XID& xid)
if (rseg_id == 0) {
found = trx_rseg_init_wsrep_xid(sys->frame, xid);
ut_ad(!found || xid.formatID == 1);
if (found) {
if (found) {
max_xid_seqno = wsrep_xid_seqno(&xid);
memcpy(wsrep_uuid, wsrep_xid_uuid(&xid),
sizeof wsrep_uuid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment