Fake changes bump the changed row counters

Bug #1064333 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQLAtFacebook
New
Undecided
Unassigned
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Laurynas Biveinis
5.1
Fix Released
High
Laurynas Biveinis
5.5
Fix Released
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

Related branches

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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.

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-593

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.