Might be related to bug 1188168.
row_ins_clust_index_entry_low() reads
if (mode == BTR_MODIFY_LEAF && dict_index_is_online_ddl(index)) { if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) { mode = BTR_SEARCH_LEAF | BTR_ALREADY_S_LATCHED; } else { mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED; } mtr_s_lock(dict_index_get_lock(index), &mtr); } else if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) { mode = (mode & BTR_MODIFY_TREE) ? BTR_SEARCH_TREE : BTR_SEARCH_LEAF; }
...
if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) { mode = (mode & BTR_MODIFY_TREE) ? BTR_SEARCH_TREE : BTR_SEARCH_LEAF; }
The second if is redundant and will clear BTR_ALREADY_S_LATCHED from the first if, which, in turn, might be unnecessary in the first place.
Might be related to bug 1188168.
row_ins_ clust_index_ entry_low( ) reads
if (mode == BTR_MODIFY_LEAF && dict_index_ is_online_ ddl(index) ) { thr_get_ trx(thr) ->fake_ changes) ) { S_LATCHED; S_LATCHED; lock(dict_ index_get_ lock(index) , &mtr); thr_get_ trx(thr) ->fake_ changes) ) {
if (UNIV_UNLIKELY(
mode = BTR_SEARCH_LEAF | BTR_ALREADY_
} else {
mode = BTR_MODIFY_LEAF | BTR_ALREADY_
}
mtr_s_
} else if (UNIV_UNLIKELY(
mode = (mode & BTR_MODIFY_TREE)
? BTR_SEARCH_TREE : BTR_SEARCH_LEAF;
}
...
if (UNIV_UNLIKELY( thr_get_ trx(thr) ->fake_ changes) ) {
mode = (mode & BTR_MODIFY_TREE)
? BTR_SEARCH_TREE : BTR_SEARCH_LEAF;
}
The second if is redundant and will clear BTR_ALREADY_ S_LATCHED from the first if, which, in turn, might be unnecessary in the first place.