Percona Server with XtraDB

Fake changes bump the changed row counters

Reported by Laurynas Biveinis on 2012-10-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQLAtFacebook
Undecided
Unassigned
Percona Server
High
Laurynas Biveinis
5.1
High
Laurynas Biveinis
5.5
High
Laurynas Biveinis

Bug Description

Source: https://bazaar.launchpad.net/~mysqlatfacebook/mysqlatfacebook/5.1/revision/3769

Verified by code review: fake changes bump the srv_n_rows_inserted etc. counters. For Percona Server, they also bump the userstat counters, e.g in ha_innobase::write_row():

#ifdef EXTENDED_FOR_USERSTAT
 if (error == DB_SUCCESS) rows_changed++;
#endif

While porting this fix from Facebook patch we fixed additional issues that affect the Facebook patch:
1) prebuilt->stat->n_rows are still bumped by fake change transactions. This makes fake changes count as real changes for stat recalculation purposes.
2) row_update_cascade_for_mysql() is affected by the original issues too, causing incorrect stats for the combination of ON UPDATE|DELETE CASCADE and fake changes.

These of course might be non-issues for the FB patch, but a heads-up in any case.

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

Other bug subscribers