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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 528
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1114612-5.1
Merge into: lp:percona-server/5.1
Diff against target: 130 lines (+60/-5)
7 files modified
Percona-Server/mysql-test/suite/innodb_plugin/r/percona_log_block_size.result (+10/-0)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size.test (+40/-0)
Percona-Server/storage/innodb_plugin/fil/fil0fil.c (+2/-2)
Percona-Server/storage/innodb_plugin/handler/ha_innodb.cc (+3/-1)
Percona-Server/storage/innodb_plugin/include/os0file.h (+2/-0)
Percona-Server/storage/innodb_plugin/os/os0file.c (+2/-2)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1114612-5.1
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
George Ormond Lorch III (community) g2 Approve
Laurynas Biveinis Pending
Review via email: mp+146831@code.launchpad.net

This proposal supersedes a proposal from 2013-02-05.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote : Posted in a previous version of this proposal

Laurynas, I see that you have aded the define for MIN_LOG_BLOCK_SIZE. Should we also change the SYSVAR definition to use this for the min/defaults now instead of (1 << 9)/*512*/, (1 << 9)/*512*/ to avoind some potential future disconnect between these?

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

Same as in 5.5.

review: Needs Fixing
Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Looks good, but maybe the 'def' (default) that is also 512 should be using the OS_MIN_LOG_BLOCK_SIZE too? Either way this is better :)

review: Approve (g2)
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

I left the default alone, as the default does not have to be the minimum allowed, just happens to share the value.

Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_log_block_size.result'
2--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_log_block_size.result 1970-01-01 00:00:00 +0000
3+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_log_block_size.result 2013-02-06 11:55:27 +0000
4@@ -0,0 +1,10 @@
5+DROP TABLE IF EXISTS t1;
6+call mtr.add_suppression("InnoDB: Warning: innodb_log_block_size has been changed from default value");
7+1st server restart
8+CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAt=COMPRESSED KEY_BLOCK_SIZE=1;
9+INSERT INTO t1 VALUES (1), (2), (3);
10+SELECT COUNT(*) FROM t1;
11+COUNT(*)
12+3
13+2nd server restart
14+DROP TABLE t1;
15
16=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size-master.opt'
17--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size-master.opt 1970-01-01 00:00:00 +0000
18+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size-master.opt 2013-02-06 11:55:27 +0000
19@@ -0,0 +1,1 @@
20+--innodb_file_per_table --innodb_file_format=Barracuda
21
22=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size.test'
23--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size.test 1970-01-01 00:00:00 +0000
24+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_log_block_size.test 2013-02-06 11:55:27 +0000
25@@ -0,0 +1,40 @@
26+#
27+# Test that innodb_log_block_size works with the rest of the server (bug 1114612)
28+#
29+--source include/have_innodb_plugin.inc
30+
31+--disable_warnings
32+DROP TABLE IF EXISTS t1;
33+--enable_warnings
34+
35+let $MYSQLD_DATADIR= `select @@datadir`;
36+
37+call mtr.add_suppression("InnoDB: Warning: innodb_log_block_size has been changed from default value");
38+
39+--echo 1st server restart
40+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
41+--shutdown_server 10
42+--source include/wait_until_disconnected.inc
43+# Do something while server is down
44+--remove_files_wildcard $MYSQLD_DATADIR ib_logfile*
45+--enable_reconnect
46+--exec echo "restart:--innodb-log-block-size=4096" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
47+--source include/wait_until_connected_again.inc
48+
49+CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAt=COMPRESSED KEY_BLOCK_SIZE=1;
50+
51+INSERT INTO t1 VALUES (1), (2), (3);
52+
53+SELECT COUNT(*) FROM t1;
54+
55+--echo 2nd server restart
56+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
57+--shutdown_server 10
58+--source include/wait_until_disconnected.inc
59+# Do something while server is down
60+--remove_files_wildcard $MYSQLD_DATADIR ib_logfile*
61+--enable_reconnect
62+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
63+--source include/wait_until_connected_again.inc
64+
65+DROP TABLE t1;
66
67=== modified file 'Percona-Server/storage/innodb_plugin/fil/fil0fil.c'
68--- Percona-Server/storage/innodb_plugin/fil/fil0fil.c 2012-08-20 03:14:02 +0000
69+++ Percona-Server/storage/innodb_plugin/fil/fil0fil.c 2013-02-06 11:55:27 +0000
70@@ -5296,8 +5296,8 @@
71
72 /* Do aio */
73
74- ut_a(byte_offset % OS_FILE_LOG_BLOCK_SIZE == 0);
75- ut_a((len % OS_FILE_LOG_BLOCK_SIZE) == 0);
76+ ut_a(byte_offset % OS_MIN_LOG_BLOCK_SIZE == 0);
77+ ut_a((len % OS_MIN_LOG_BLOCK_SIZE) == 0);
78
79 if (srv_pass_corrupt_table == 1 && space->is_corrupt) {
80 /* should ignore i/o for the crashed space */
81
82=== modified file 'Percona-Server/storage/innodb_plugin/handler/ha_innodb.cc'
83--- Percona-Server/storage/innodb_plugin/handler/ha_innodb.cc 2013-01-22 16:28:47 +0000
84+++ Percona-Server/storage/innodb_plugin/handler/ha_innodb.cc 2013-02-06 11:55:27 +0000
85@@ -2357,6 +2357,7 @@
86 } else {
87 srv_log_block_size = 512;
88 }
89+ ut_ad (srv_log_block_size >= OS_MIN_LOG_BLOCK_SIZE);
90
91 if (!srv_log_block_size) {
92 fprintf(stderr,
93@@ -11791,7 +11792,8 @@
94 static MYSQL_SYSVAR_ULONG(log_block_size, innobase_log_block_size,
95 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
96 "###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!",
97- NULL, NULL, (1 << 9)/*512*/, (1 << 9)/*512*/, (1 << UNIV_PAGE_SIZE_SHIFT_MAX), 0);
98+ NULL, NULL, (1 << 9)/*512*/, OS_MIN_LOG_BLOCK_SIZE,
99+ (1 << UNIV_PAGE_SIZE_SHIFT_MAX), 0);
100
101 static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
102 PLUGIN_VAR_READONLY,
103
104=== modified file 'Percona-Server/storage/innodb_plugin/include/os0file.h'
105--- Percona-Server/storage/innodb_plugin/include/os0file.h 2012-06-14 09:16:03 +0000
106+++ Percona-Server/storage/innodb_plugin/include/os0file.h 2013-02-06 11:55:27 +0000
107@@ -188,6 +188,8 @@
108 extern ulint os_n_file_writes;
109 extern ulint os_n_fsyncs;
110
111+#define OS_MIN_LOG_BLOCK_SIZE 512
112+
113 extern ulint srv_log_block_size;
114
115 /* File types for directory entry data type */
116
117=== modified file 'Percona-Server/storage/innodb_plugin/os/os0file.c'
118--- Percona-Server/storage/innodb_plugin/os/os0file.c 2013-01-04 07:28:01 +0000
119+++ Percona-Server/storage/innodb_plugin/os/os0file.c 2013-02-06 11:55:27 +0000
120@@ -3782,8 +3782,8 @@
121 ut_ad(file);
122 ut_ad(buf);
123 ut_ad(n > 0);
124- ut_ad(n % OS_FILE_LOG_BLOCK_SIZE == 0);
125- ut_ad(offset % OS_FILE_LOG_BLOCK_SIZE == 0);
126+ ut_ad(n % OS_MIN_LOG_BLOCK_SIZE == 0);
127+ ut_ad(offset % OS_MIN_LOG_BLOCK_SIZE == 0);
128 ut_ad(os_aio_validate());
129 #ifdef WIN_ASYNC_IO
130 ut_ad((n & 0xFFFFFFFFUL) == n);

Subscribers

People subscribed via source and target branches