Skip to content

Commit ba80eeb

Browse files
dr-mmidenok
authored andcommitted
Fix warnings
1 parent ef295cb commit ba80eeb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

storage/innobase/row/row0ins.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,7 @@ row_ins_scan_sec_index_for_duplicate(
21672167
bools_latch,/*!< in: whether index->lock is being held */
21682168
mtr_t* mtr,/*!< in/out: mini-transaction */
21692169
mem_heap_t* offsets_heap,
2170-
trx_t* trx = 0)
2170+
trx_t* trx)
21712171
/*!< in/out: memory heap that can be emptied */
21722172
{
21732173
ulint n_unique;
@@ -2179,13 +2179,8 @@ row_ins_scan_sec_index_for_duplicate(
21792179
ulint* offsets = NULL;
21802180
DBUG_ENTER("row_ins_scan_sec_index_for_duplicate");
21812181

2182-
2183-
ut_ad(thr || (trx && flags & BTR_NO_LOCKING_FLAG));
2184-
if (!trx)
2185-
trx = thr_get_trx(thr);
2186-
21872182
ut_ad(s_latch == rw_lock_own_flagged(
2188-
&index->lock, RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX));
2183+
&index->lock, RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX));
21892184

21902185
n_unique = dict_index_get_n_unique(index);
21912186

@@ -3016,7 +3011,8 @@ row_ins_sec_index_entry_low(
30163011

30173012
cursor.thr = thr;
30183013
cursor.rtr_info = NULL;
3019-
ut_ad(trx && trx->id != 0 || thr_get_trx(thr)->id != 0);
3014+
ut_ad(trx);
3015+
ut_ad(trx->id != 0);
30203016

30213017
mtr_start(&mtr);
30223018
mtr.set_named_space(index->space);

0 commit comments

Comments
 (0)