Incorrectly ported fake changes support in row_ins_clust_index_entry_low()

Bug #1188172 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Laurynas Biveinis
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Medium
Laurynas Biveinis

Bug Description

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.

Related branches

tags: added: fake-changes xtradb
tags: added: merge-regression
description: updated
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1377

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.