Fake changes bump the changed row counters
Bug #1064333 reported by
Laurynas Biveinis
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:/
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:
#ifdef EXTENDED_
if (error == DB_SUCCESS) rows_changed++;
#endif
Related branches
lp:~laurynas-biveinis/percona-server/26611-bug1064333-5.1
- Stewart Smith (community): Approve
-
Diff: 289 lines (+137/-17)4 files modifiedPercona-Server/mysql-test/r/percona_innodb_fake_changes.result (+41/-1)
Percona-Server/mysql-test/t/percona_innodb_fake_changes.test (+66/-2)
Percona-Server/storage/innodb_plugin/handler/ha_innodb.cc (+9/-3)
Percona-Server/storage/innodb_plugin/row/row0mysql.c (+21/-11)
lp:~laurynas-biveinis/percona-server/26611-bug1064333-5.5
- Stewart Smith (community): Approve
-
Diff: 289 lines (+137/-17)4 files modifiedPercona-Server/mysql-test/r/percona_innodb_fake_changes.result (+41/-1)
Percona-Server/mysql-test/t/percona_innodb_fake_changes.test (+66/-2)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+9/-3)
Percona-Server/storage/innobase/row/row0mysql.c (+21/-11)
To post a comment you must log in.
While porting this fix from Facebook patch we fixed additional issues that affect the Facebook patch: >stat-> n_rows are still bumped by fake change transactions. This makes fake changes count as real changes for stat recalculation purposes. cascade_ for_mysql( ) is affected by the original issues too, causing incorrect stats for the combination of ON UPDATE|DELETE CASCADE and fake changes.
1) prebuilt-
2) row_update_
These of course might be non-issues for the FB patch, but a heads-up in any case.