Merge lp:~vlad-lesin/percona-server/bugs-1008609-1008278 into lp:percona-server/5.5

Proposed by Vlad Lesin on 2012-06-13
Status: Merged
Approved by: Alexey Kopytov on 2012-06-14
Approved revision: 259
Merged at revision: 261
Proposed branch: lp:~vlad-lesin/percona-server/bugs-1008609-1008278
Merge into: lp:percona-server/5.5
Diff against target: 103 lines (+59/-2)
6 files modified
Percona-Server/mysql-test/r/percona_bug1008278.result (+8/-0)
Percona-Server/mysql-test/r/percona_bug1008609.result (+1/-0)
Percona-Server/mysql-test/t/percona_bug1008278-slave.opt (+1/-0)
Percona-Server/mysql-test/t/percona_bug1008278.test (+23/-0)
Percona-Server/mysql-test/t/percona_bug1008609.test (+24/-0)
Percona-Server/sql/sql_connect.cc (+2/-2)
To merge this branch: bzr merge lp:~vlad-lesin/percona-server/bugs-1008609-1008278
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2012-06-13 Approve on 2012-06-14
Review via email: mp+110016@code.launchpad.net

Description of the change

Fix for bugs 1008609 and 1008278. Jenkins build: http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/424 .

To post a comment you must log in.
Alexey Kopytov (akopytov) wrote :

Vlad,

Please recommit and provide more descriptive revision comments, mentioning all three bug numbers, and the problem description. Here's an example of a good revision comment: http://bazaar.launchpad.net/~laurynas-biveinis/percona-server/bug951588-5.1/revision/447

It would also be great to have a replication test to verify bug #1008278 is indeed fixed by this patch. It's not clear why only Master-Master replication was affected, could it be that SQL thread always crashes with userstat enabled? In both cases a test case should be rather trivial.

review: Needs Fixing
Vlad Lesin (vlad-lesin) wrote :

> Vlad,
>
> Please recommit and provide more descriptive revision comments, mentioning all
> three bug numbers, and the problem description. Here's an example of a good
> revision comment: http://bazaar.launchpad.net/~laurynas-biveinis/percona-
> server/bug951588-5.1/revision/447
>
> It would also be great to have a replication test to verify bug #1008278 is
> indeed fixed by this patch. It's not clear why only Master-Master replication
> was affected, could it be that SQL thread always crashes with userstat
> enabled? In both cases a test case should be rather trivial.

Done.

Alexey Kopytov (akopytov) :
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/r/percona_bug1008278.result'
2--- Percona-Server/mysql-test/r/percona_bug1008278.result 1970-01-01 00:00:00 +0000
3+++ Percona-Server/mysql-test/r/percona_bug1008278.result 2012-06-14 14:34:30 +0000
4@@ -0,0 +1,8 @@
5+include/master-slave.inc
6+[connection master]
7+DROP TABLE IF EXISTS t;
8+CREATE TABLE t(id INT,data CHAR(30));
9+INSERT INTO t VALUES
10+(1,"aaaaabbbbbcccccdddddeeeeefffff");
11+DROP TABLE t;
12+include/rpl_end.inc
13
14=== added file 'Percona-Server/mysql-test/r/percona_bug1008609.result'
15--- Percona-Server/mysql-test/r/percona_bug1008609.result 1970-01-01 00:00:00 +0000
16+++ Percona-Server/mysql-test/r/percona_bug1008609.result 2012-06-14 14:34:30 +0000
17@@ -0,0 +1,1 @@
18+OK
19
20=== added file 'Percona-Server/mysql-test/t/percona_bug1008278-slave.opt'
21--- Percona-Server/mysql-test/t/percona_bug1008278-slave.opt 1970-01-01 00:00:00 +0000
22+++ Percona-Server/mysql-test/t/percona_bug1008278-slave.opt 2012-06-14 14:34:30 +0000
23@@ -0,0 +1,1 @@
24+--userstat=1
25
26=== added file 'Percona-Server/mysql-test/t/percona_bug1008278.test'
27--- Percona-Server/mysql-test/t/percona_bug1008278.test 1970-01-01 00:00:00 +0000
28+++ Percona-Server/mysql-test/t/percona_bug1008278.test 2012-06-14 14:34:30 +0000
29@@ -0,0 +1,23 @@
30+# Bug 1008278: The server crashes when replication is started
31+# with "--userstat=1" parameter.
32+# Just start replcation with "--userstat=1" parameter and execute any
33+# query on master to be ensure slave doesn't crash.
34+
35+--source include/have_binlog_format_statement.inc
36+--source include/master-slave.inc
37+
38+connection master;
39+-- disable_warnings
40+DROP TABLE IF EXISTS t;
41+-- enable_warnings
42+
43+CREATE TABLE t(id INT,data CHAR(30));
44+INSERT INTO t VALUES
45+(1,"aaaaabbbbbcccccdddddeeeeefffff");
46+sync_slave_with_master;
47+
48+connection master;
49+DROP TABLE t;
50+sync_slave_with_master;
51+
52+--source include/rpl_end.inc
53
54=== added file 'Percona-Server/mysql-test/t/percona_bug1008609.test'
55--- Percona-Server/mysql-test/t/percona_bug1008609.test 1970-01-01 00:00:00 +0000
56+++ Percona-Server/mysql-test/t/percona_bug1008609.test 2012-06-14 14:34:30 +0000
57@@ -0,0 +1,24 @@
58+# The bug #1008609 test cause.
59+# The bug consist in crashing the server when it is launched with both
60+# "--userstat=1" and "--bootstrap" parameters.
61+#
62+# Just start with --userstat=1 --bootstrap. If the server doesn't crash the
63+# test is passed.
64+
65+let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD
66+ --default-storage-engine=MyISAM
67+ --skip-innodb
68+ --userstat=on;
69+
70+--write_file $MYSQLTEST_VARDIR/tmp/percona_bug1008609.sql
71+SELECT 1;
72+EOF
73+
74+exec
75+ $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/percona_bug1008609.sql >>
76+ $MYSQLTEST_VARDIR/tmp/percona_bug1008609.log 2>&1;
77+
78+--remove_file $MYSQLTEST_VARDIR/tmp/percona_bug1008609.sql
79+--remove_file $MYSQLTEST_VARDIR/tmp/percona_bug1008609.log
80+
81+--echo OK
82
83=== modified file 'Percona-Server/sql/sql_connect.cc'
84--- Percona-Server/sql/sql_connect.cc 2012-05-18 04:36:35 +0000
85+++ Percona-Server/sql/sql_connect.cc 2012-06-14 14:34:30 +0000
86@@ -499,7 +499,7 @@
87 }
88 }
89 user_stats->total_connections++;
90- if (thd->net.vio->type == VIO_TYPE_SSL)
91+ if (thd->net.vio && thd->net.vio->type == VIO_TYPE_SSL)
92 user_stats->total_ssl_connections++;
93 return 0;
94 }
95@@ -539,7 +539,7 @@
96 }
97 }
98 thread_stats->total_connections++;
99- if (thd->net.vio->type == VIO_TYPE_SSL)
100+ if (thd->net.vio && thd->net.vio->type == VIO_TYPE_SSL)
101 thread_stats->total_ssl_connections++;
102 return 0;
103 }

Subscribers

People subscribed via source and target branches