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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 480
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1188168-5.6
Merge into: lp:percona-server/5.6
Prerequisite: lp:~laurynas-biveinis/percona-server/fake-changes-from-fb-5.6
Diff against target: 123 lines (+102/-1)
3 files modified
Percona-Server/mysql-test/r/percona_innodb_fake_changes_bug_1188168.result (+71/-0)
Percona-Server/mysql-test/t/percona_innodb_fake_changes_bug_1188168.test (+30/-0)
Percona-Server/storage/innobase/row/row0ins.cc (+1/-1)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1188168-5.6
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Laurynas Biveinis Pending
Sergei Glushchenko g2 Pending
Review via email: mp+176875@code.launchpad.net

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

Description of the change

No BT or ST but blocks BT 20439.

2nd MP

http://jenkins.percona.com/job/percona-server-5.6-param/212/

Review comment addressed

1st MP

http://jenkins.percona.com/job/percona-server-5.6-param/199/

Mere bug 1188168 fix from 5.5.

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote : Posted in a previous version of this proposal

This patch is missing branch prediction. Is it intentionally?

review: Needs Information (g2)
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Yes, because it's (big_rec && !fake_changes) -> (big_rec && likely true) -> as likely as big_rec, and big_rec is neither likely nor unlikely.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote : Posted in a previous version of this proposal

Yes, you're right. But I mean, why not

if (big_rec && UNIV_LIKELY(!thr_get_trx(thr)->fake_changes)) ?

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Hmm, I didn't think of that, thanks

review: Needs Fixing
Revision history for this message
Stewart Smith (stewart) wrote :

(and yes, i looked at the patches themselves before approving)

review: Approve

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:12:51 +0000
@@ -0,0 +1,71 @@
1SET @@GLOBAL.userstat=ON;
2SET @@GLOBAL.innodb_stats_transient_sample_pages=30000;
3DROP TABLE IF EXISTS t1;
4CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
5INSERT INTO t1 VALUES(1, '');
6INSERT INTO t1 VALUES(2, '');
7INSERT INTO t1 VALUES(3, '');
8INSERT INTO t1 VALUES(4, '');
9DELETE FROM t1 WHERE id = 4;
10SELECT @@global.userstat = 1 AS should_be_1;
11should_be_1
121
13SELECT @@global.innodb_stats_transient_sample_pages = 30000 AS should_be_1;
14should_be_1
151
16ANALYZE TABLE t1;
17Table Op Msg_type Msg_text
18test.t1 analyze status OK
19SELECT VARIABLE_VALUE INTO @innodb_rows_inserted_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_inserted';
20SELECT VARIABLE_VALUE INTO @innodb_rows_deleted_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_deleted';
21SELECT VARIABLE_VALUE INTO @innodb_rows_updated_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_updated';
22SELECT NUM_ROWS INTO @table_rows_estimate_1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME LIKE 'test/t1';
23SELECT ROWS_CHANGED INTO @table_rows_changed_1 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
24SELECT 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';
25SELECT MODIFIED_COUNTER INTO @table_dml_counter_1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME LIKE 'test/t1';
26SHOW INDEXES IN t1;
27Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
28t1 0 PRIMARY 1 id A 3 NULL NULL BTREE
29SET innodb_fake_changes=1;
30INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
31ERROR HY000: Got error 131 during COMMIT
32SET innodb_fake_changes=0;
33CHECK TABLE t1;
34Table Op Msg_type Msg_text
35test.t1 check status OK
36SELECT VARIABLE_VALUE INTO @innodb_rows_inserted_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_rows_inserted';
37SELECT VARIABLE_VALUE INTO @innodb_rows_deleted_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_rows_deleted';
38SELECT VARIABLE_VALUE INTO @innodb_rows_updated_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_rows_updated';
39SELECT NUM_ROWS INTO @table_rows_estimate_2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME LIKE 'test/t1';
40SELECT ROWS_CHANGED INTO @table_rows_changed_2 FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_SCHEMA LIKE 'test' AND TABLE_NAME LIKE 't1';
41SELECT 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';
42SELECT MODIFIED_COUNTER INTO @table_dml_counter_2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME LIKE 'test/t1';
43should_be_1
441
45SELECT @innodb_rows_inserted_2 - @innodb_rows_inserted_1 AS should_be_0;
46should_be_0
470
48SELECT @innodb_rows_deleted_2 - @innodb_rows_deleted_1 AS should_be_0;
49should_be_0
500
51SELECT @innodb_rows_updated_2 - @innodb_rows_updated_1 AS should_be_0;
52should_be_0
530
54SELECT @table_rows_estimate_2 - @table_rows_estimate_1 AS should_be_0;
55should_be_0
560
57SELECT @table_rows_changed_2 - @table_rows_changed_1 AS should_be_0;
58should_be_0
590
60SELECT @table_rows_changed_x_indexes_2 - @table_rows_changed_x_indexes_1 AS should_be_0;
61should_be_0
620
63SELECT @table_dml_counter_2 - @table_dml_counter_1 AS should_be_0;
64should_be_0
650
66SHOW INDEXES IN t1;
67Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
68t1 0 PRIMARY 1 id A 3 NULL NULL BTREE
69DROP TABLE t1;
70SET @@GLOBAL.userstat=default;
71SET @@GLOBAL.innodb_stats_transient_sample_pages=default;
072
=== 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:12:51 +0000
@@ -0,0 +1,30 @@
1--source include/have_innodb.inc
2
3SET @@GLOBAL.userstat=ON;
4SET @@GLOBAL.innodb_stats_transient_sample_pages=30000;
5
6--disable_warnings
7DROP TABLE IF EXISTS t1;
8--enable_warnings
9
10CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data TEXT) ENGINE=InnoDB;
11
12INSERT INTO t1 VALUES(1, '');
13INSERT INTO t1 VALUES(2, '');
14INSERT INTO t1 VALUES(3, '');
15INSERT INTO t1 VALUES(4, '');
16
17DELETE FROM t1 WHERE id = 4;
18
19--let $fake_changes_table=t1
20--source include/start_fake_changes.inc
21
22--error ER_ERROR_DURING_COMMIT
23INSERT INTO t1 VALUES (4, LPAD('a', 12000, 'b'));
24
25--source include/stop_fake_changes.inc
26
27DROP TABLE t1;
28
29SET @@GLOBAL.userstat=default;
30SET @@GLOBAL.innodb_stats_transient_sample_pages=default;
031
=== modified file 'Percona-Server/storage/innobase/row/row0ins.cc'
--- Percona-Server/storage/innobase/row/row0ins.cc 2013-10-17 08:00:06 +0000
+++ Percona-Server/storage/innobase/row/row0ins.cc 2013-10-17 09:12:51 +0000
@@ -2430,7 +2430,7 @@
24302430
2431 rec_t* rec = btr_cur_get_rec(&cursor);2431 rec_t* rec = btr_cur_get_rec(&cursor);
24322432
2433 if (big_rec) {2433 if (big_rec && UNIV_LIKELY(!thr_get_trx(thr)->fake_changes)) {
2434 ut_a(err == DB_SUCCESS);2434 ut_a(err == DB_SUCCESS);
2435 /* Write out the externally stored2435 /* Write out the externally stored
2436 columns while still x-latching2436 columns while still x-latching

Subscribers

People subscribed via source and target branches