Merge lp:~laurynas-biveinis/percona-server/bug1188168-5.1 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 595
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1188168-5.1
Merge into: lp:percona-server/5.1
Diff against target: 59 lines (+39/-0)
3 files modified
Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result (+12/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test (+23/-0)
Percona-Server/storage/innodb_plugin/row/row0ins.c (+4/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1188168-5.1
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+175185@code.launchpad.net

Description of the change

No BT or ST but blocks BT 20439.

http://jenkins.percona.com/job/percona-server-5.1-param/561/

    Fix bug 1188168 (Fake changes assertion fail in
    row_ins_clust_index_entry_by_modify() |
    btr_store_big_rec_extern_fields ()).

    The issue is caused that fake changes, while normally skipping the
    write of externally-stored columns, failed to so for one path in
    row_ins_index_entry_low(). Adjust accordingly and add a regression
    testcase.

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve

review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result'
2--- Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result 1970-01-01 00:00:00 +0000
3+++ Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result 2013-07-17 03:43:40 +0000
4@@ -0,0 +1,12 @@
5+DROP TABLE IF EXISTS t1;
6+CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
7+INSERT INTO t1 VALUES(1, '');
8+INSERT INTO t1 VALUES(2, '');
9+INSERT INTO t1 VALUES(3, '');
10+INSERT INTO t1 VALUES(4, '');
11+DELETE FROM t1 WHERE id = 4;
12+SET innodb_fake_changes=1;
13+INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
14+ERROR HY000: Got error 131 during COMMIT
15+SET innodb_fake_changes=0;
16+DROP TABLE t1;
17
18=== added file 'Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test'
19--- Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test 1970-01-01 00:00:00 +0000
20+++ Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test 2013-07-17 03:43:40 +0000
21@@ -0,0 +1,23 @@
22+--source include/have_innodb_plugin.inc
23+
24+--disable_warnings
25+DROP TABLE IF EXISTS t1;
26+--enable_warnings
27+
28+CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
29+
30+INSERT INTO t1 VALUES(1, '');
31+INSERT INTO t1 VALUES(2, '');
32+INSERT INTO t1 VALUES(3, '');
33+INSERT INTO t1 VALUES(4, '');
34+
35+DELETE FROM t1 WHERE id = 4;
36+
37+SET innodb_fake_changes=1;
38+
39+--error ER_ERROR_DURING_COMMIT
40+INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
41+
42+SET innodb_fake_changes=0;
43+
44+DROP TABLE t1;
45
46=== modified file 'Percona-Server/storage/innodb_plugin/row/row0ins.c'
47--- Percona-Server/storage/innodb_plugin/row/row0ins.c 2013-05-23 09:09:56 +0000
48+++ Percona-Server/storage/innodb_plugin/row/row0ins.c 2013-07-17 03:43:40 +0000
49@@ -2127,6 +2127,10 @@
50
51 if (big_rec) {
52 ut_a(err == DB_SUCCESS);
53+ if (UNIV_UNLIKELY(thr_get_trx(thr)->
54+ fake_changes)) {
55+ goto stored_big_rec;
56+ }
57 /* Write out the externally stored
58 columns while still x-latching
59 index->lock and block->lock. Allocate

Subscribers

People subscribed via source and target branches