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.
Revision history for this message
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)
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve

review: Approve (g2)
557. By Laurynas Biveinis

Merge bug 1188168 fix from 5.1.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result'
--- Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result 2013-10-17 09:13:59 +0000
@@ -0,0 +1,52 @@
1SET @@GLOBAL.userstat=ON;
2DROP TABLE IF EXISTS t1;
3CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
4INSERT INTO t1 VALUES(1, '');
5INSERT INTO t1 VALUES(2, '');
6INSERT INTO t1 VALUES(3, '');
7INSERT INTO t1 VALUES(4, '');
8DELETE FROM t1 WHERE id = 4;
9SELECT @@global.userstat = 1 AS should_be_1;
10should_be_1
111
12SELECT VARIABLE_VALUE INTO @innodb_rows_inserted_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_inserted';
13SELECT VARIABLE_VALUE INTO @innodb_rows_deleted_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_deleted';
14SELECT VARIABLE_VALUE INTO @innodb_rows_updated_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_updated';
15SELECT ROWS INTO @table_rows_estimate_1 FROM INFORMATION_SCHEMA.INNODB_TABLE_STATS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
16SELECT ROWS_CHANGED INTO @table_rows_changed_1 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
17SELECT 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';
18SET innodb_fake_changes=1;
19INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
20ERROR HY000: Got error 131 during COMMIT
21SET innodb_fake_changes=0;
22CHECK TABLE t1;
23Table Op Msg_type Msg_text
24test.t1 check status OK
25SELECT VARIABLE_VALUE INTO @innodb_rows_inserted_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_inserted';
26SELECT VARIABLE_VALUE INTO @innodb_rows_deleted_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_rows_deleted';
27SELECT VARIABLE_VALUE INTO @innodb_rows_updated_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_rows_updated';
28SELECT ROWS INTO @table_rows_estimate_2 FROM INFORMATION_SCHEMA.INNODB_TABLE_STATS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
29SELECT ROWS_CHANGED INTO @table_rows_changed_2 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
30SELECT 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';
31should_be_1
321
33SELECT @innodb_rows_inserted_2 - @innodb_rows_inserted_1 AS should_be_0;
34should_be_0
350
36SELECT @innodb_rows_deleted_2 - @innodb_rows_deleted_1 AS should_be_0;
37should_be_0
380
39SELECT @innodb_rows_updated_2 - @innodb_rows_updated_1 AS should_be_0;
40should_be_0
410
42SELECT @table_rows_estimate_2 - @table_rows_estimate_1 AS should_be_0;
43should_be_0
440
45SELECT @table_rows_changed_2 - @table_rows_changed_1 AS should_be_0;
46should_be_0
470
48SELECT @table_rows_changed_x_indexes_2 - @table_rows_changed_x_indexes_1 AS should_be_0;
49should_be_0
500
51DROP TABLE t1;
52SET @@GLOBAL.userstat=default;
053
=== added file 'Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test'
--- Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test 2013-10-17 09:13:59 +0000
@@ -0,0 +1,28 @@
1--source include/have_innodb.inc
2
3SET @@GLOBAL.userstat=ON;
4
5--disable_warnings
6DROP TABLE IF EXISTS t1;
7--enable_warnings
8
9CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
10
11INSERT INTO t1 VALUES(1, '');
12INSERT INTO t1 VALUES(2, '');
13INSERT INTO t1 VALUES(3, '');
14INSERT INTO t1 VALUES(4, '');
15
16DELETE FROM t1 WHERE id = 4;
17
18--let $fake_changes_table=t1
19--source include/start_fake_changes.inc
20
21--error ER_ERROR_DURING_COMMIT
22INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
23
24--source include/stop_fake_changes.inc
25
26DROP TABLE t1;
27
28SET @@GLOBAL.userstat=default;
029
=== modified file 'Percona-Server/storage/innobase/row/row0ins.c'
--- Percona-Server/storage/innobase/row/row0ins.c 2013-10-17 07:44:31 +0000
+++ Percona-Server/storage/innobase/row/row0ins.c 2013-10-17 09:13:59 +0000
@@ -2122,6 +2122,11 @@
21222122
2123 if (big_rec) {2123 if (big_rec) {
2124 ut_a(err == DB_SUCCESS);2124 ut_a(err == DB_SUCCESS);
2125 if (UNIV_UNLIKELY(thr_get_trx(thr)->
2126 fake_changes)) {
2127 goto stored_big_rec;
2128 }
2129
2125 /* Write out the externally stored2130 /* Write out the externally stored
2126 columns while still x-latching2131 columns while still x-latching
2127 index->lock and block->lock. Allocate2132 index->lock and block->lock. Allocate

Subscribers

People subscribed via source and target branches