Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m authored and midenok committed Nov 13, 2017
1 parent ef295cb commit ba80eeb
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions storage/innobase/row/row0ins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ row_ins_scan_sec_index_for_duplicate(
bool s_latch,/*!< in: whether index->lock is being held */
mtr_t* mtr, /*!< in/out: mini-transaction */
mem_heap_t* offsets_heap,
trx_t* trx = 0)
trx_t* trx)
/*!< in/out: memory heap that can be emptied */
{
ulint n_unique;
Expand All @@ -2179,13 +2179,8 @@ row_ins_scan_sec_index_for_duplicate(
ulint* offsets = NULL;
DBUG_ENTER("row_ins_scan_sec_index_for_duplicate");


ut_ad(thr || (trx && flags & BTR_NO_LOCKING_FLAG));
if (!trx)
trx = thr_get_trx(thr);

ut_ad(s_latch == rw_lock_own_flagged(
&index->lock, RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX));
&index->lock, RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX));

n_unique = dict_index_get_n_unique(index);

Expand Down Expand Up @@ -3016,7 +3011,8 @@ row_ins_sec_index_entry_low(

cursor.thr = thr;
cursor.rtr_info = NULL;
ut_ad(trx && trx->id != 0 || thr_get_trx(thr)->id != 0);
ut_ad(trx);
ut_ad(trx->id != 0);

mtr_start(&mtr);
mtr.set_named_space(index->space);
Expand Down

0 comments on commit ba80eeb

Please sign in to comment.