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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Sergei Glushchenko
Approved revision: no longer in the source branch.
Merged at revision: 588
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1188168-5.5
Merge into: lp:percona-server/5.5
Prerequisite: lp:~laurynas-biveinis/percona-server/fake-changes-from-fb-5.5
Diff against target: 105 lines (+85/-0)
3 files modified
Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result (+52/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test (+28/-0)
Percona-Server/storage/innobase/row/row0ins.c (+5/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1188168-5.5
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+176652@code.launchpad.net

This proposal supersedes a proposal from 2013-07-17.

Description of the change

No BT or ST but blocks BT 20439.

http://jenkins.percona.com/job/percona-server-5.5-param/809/

Merge bug 1188168 fix from 5.1

To post a comment you must log in.
Sergei Glushchenko (sergei.glushchenko) wrote : Posted in a previous version of this proposal

This branch is proposed to merge to 5.6 while it should be proposed to merge to 5.5

review: Needs Fixing (g2)

Approve

review: Approve (g2)
557. By Laurynas Biveinis on 2013-10-17

Merge bug 1188168 fix from 5.1.

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-10-17 09:13:59 +0000
4@@ -0,0 +1,52 @@
5+SET @@GLOBAL.userstat=ON;
6+DROP TABLE IF EXISTS t1;
7+CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
8+INSERT INTO t1 VALUES(1, '');
9+INSERT INTO t1 VALUES(2, '');
10+INSERT INTO t1 VALUES(3, '');
11+INSERT INTO t1 VALUES(4, '');
12+DELETE FROM t1 WHERE id = 4;
13+SELECT @@global.userstat = 1 AS should_be_1;
14+should_be_1
15+1
16+SELECT VARIABLE_VALUE INTO @innodb_rows_inserted_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_inserted';
17+SELECT VARIABLE_VALUE INTO @innodb_rows_deleted_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_deleted';
18+SELECT VARIABLE_VALUE INTO @innodb_rows_updated_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_updated';
19+SELECT ROWS INTO @table_rows_estimate_1 FROM INFORMATION_SCHEMA.INNODB_TABLE_STATS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
20+SELECT ROWS_CHANGED INTO @table_rows_changed_1 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
21+SELECT ROWS_CHANGED_X_INDEXES INTO @table_rows_changed_x_indexes_1 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
22+SET innodb_fake_changes=1;
23+INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
24+ERROR HY000: Got error 131 during COMMIT
25+SET innodb_fake_changes=0;
26+CHECK TABLE t1;
27+Table Op Msg_type Msg_text
28+test.t1 check status OK
29+SELECT VARIABLE_VALUE INTO @innodb_rows_inserted_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_inserted';
30+SELECT VARIABLE_VALUE INTO @innodb_rows_deleted_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_rows_deleted';
31+SELECT VARIABLE_VALUE INTO @innodb_rows_updated_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_rows_updated';
32+SELECT ROWS INTO @table_rows_estimate_2 FROM INFORMATION_SCHEMA.INNODB_TABLE_STATS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
33+SELECT ROWS_CHANGED INTO @table_rows_changed_2 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
34+SELECT ROWS_CHANGED_X_INDEXES INTO @table_rows_changed_x_indexes_2 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
35+should_be_1
36+1
37+SELECT @innodb_rows_inserted_2 - @innodb_rows_inserted_1 AS should_be_0;
38+should_be_0
39+0
40+SELECT @innodb_rows_deleted_2 - @innodb_rows_deleted_1 AS should_be_0;
41+should_be_0
42+0
43+SELECT @innodb_rows_updated_2 - @innodb_rows_updated_1 AS should_be_0;
44+should_be_0
45+0
46+SELECT @table_rows_estimate_2 - @table_rows_estimate_1 AS should_be_0;
47+should_be_0
48+0
49+SELECT @table_rows_changed_2 - @table_rows_changed_1 AS should_be_0;
50+should_be_0
51+0
52+SELECT @table_rows_changed_x_indexes_2 - @table_rows_changed_x_indexes_1 AS should_be_0;
53+should_be_0
54+0
55+DROP TABLE t1;
56+SET @@GLOBAL.userstat=default;
57
58=== added file 'Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test'
59--- Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test 1970-01-01 00:00:00 +0000
60+++ Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test 2013-10-17 09:13:59 +0000
61@@ -0,0 +1,28 @@
62+--source include/have_innodb.inc
63+
64+SET @@GLOBAL.userstat=ON;
65+
66+--disable_warnings
67+DROP TABLE IF EXISTS t1;
68+--enable_warnings
69+
70+CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
71+
72+INSERT INTO t1 VALUES(1, '');
73+INSERT INTO t1 VALUES(2, '');
74+INSERT INTO t1 VALUES(3, '');
75+INSERT INTO t1 VALUES(4, '');
76+
77+DELETE FROM t1 WHERE id = 4;
78+
79+--let $fake_changes_table=t1
80+--source include/start_fake_changes.inc
81+
82+--error ER_ERROR_DURING_COMMIT
83+INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
84+
85+--source include/stop_fake_changes.inc
86+
87+DROP TABLE t1;
88+
89+SET @@GLOBAL.userstat=default;
90
91=== modified file 'Percona-Server/storage/innobase/row/row0ins.c'
92--- Percona-Server/storage/innobase/row/row0ins.c 2013-10-17 07:44:31 +0000
93+++ Percona-Server/storage/innobase/row/row0ins.c 2013-10-17 09:13:59 +0000
94@@ -2122,6 +2122,11 @@
95
96 if (big_rec) {
97 ut_a(err == DB_SUCCESS);
98+ if (UNIV_UNLIKELY(thr_get_trx(thr)->
99+ fake_changes)) {
100+ goto stored_big_rec;
101+ }
102+
103 /* Write out the externally stored
104 columns while still x-latching
105 index->lock and block->lock. Allocate

Subscribers

People subscribed via source and target branches