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

Proposed by Vlad Lesin
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
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) Approve
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.
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
Alexey Kopytov (akopytov) :
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_bug1008278.result'
--- Percona-Server/mysql-test/r/percona_bug1008278.result 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/r/percona_bug1008278.result 2012-06-14 14:34:30 +0000
@@ -0,0 +1,8 @@
1include/master-slave.inc
2[connection master]
3DROP TABLE IF EXISTS t;
4CREATE TABLE t(id INT,data CHAR(30));
5INSERT INTO t VALUES
6(1,"aaaaabbbbbcccccdddddeeeeefffff");
7DROP TABLE t;
8include/rpl_end.inc
09
=== added file 'Percona-Server/mysql-test/r/percona_bug1008609.result'
--- Percona-Server/mysql-test/r/percona_bug1008609.result 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/r/percona_bug1008609.result 2012-06-14 14:34:30 +0000
@@ -0,0 +1,1 @@
1OK
02
=== added file 'Percona-Server/mysql-test/t/percona_bug1008278-slave.opt'
--- Percona-Server/mysql-test/t/percona_bug1008278-slave.opt 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/t/percona_bug1008278-slave.opt 2012-06-14 14:34:30 +0000
@@ -0,0 +1,1 @@
1--userstat=1
02
=== added file 'Percona-Server/mysql-test/t/percona_bug1008278.test'
--- Percona-Server/mysql-test/t/percona_bug1008278.test 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/t/percona_bug1008278.test 2012-06-14 14:34:30 +0000
@@ -0,0 +1,23 @@
1# Bug 1008278: The server crashes when replication is started
2# with "--userstat=1" parameter.
3# Just start replcation with "--userstat=1" parameter and execute any
4# query on master to be ensure slave doesn't crash.
5
6--source include/have_binlog_format_statement.inc
7--source include/master-slave.inc
8
9connection master;
10-- disable_warnings
11DROP TABLE IF EXISTS t;
12-- enable_warnings
13
14CREATE TABLE t(id INT,data CHAR(30));
15INSERT INTO t VALUES
16(1,"aaaaabbbbbcccccdddddeeeeefffff");
17sync_slave_with_master;
18
19connection master;
20DROP TABLE t;
21sync_slave_with_master;
22
23--source include/rpl_end.inc
024
=== added file 'Percona-Server/mysql-test/t/percona_bug1008609.test'
--- Percona-Server/mysql-test/t/percona_bug1008609.test 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/t/percona_bug1008609.test 2012-06-14 14:34:30 +0000
@@ -0,0 +1,24 @@
1# The bug #1008609 test cause.
2# The bug consist in crashing the server when it is launched with both
3# "--userstat=1" and "--bootstrap" parameters.
4#
5# Just start with --userstat=1 --bootstrap. If the server doesn't crash the
6# test is passed.
7
8let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD
9 --default-storage-engine=MyISAM
10 --skip-innodb
11 --userstat=on;
12
13--write_file $MYSQLTEST_VARDIR/tmp/percona_bug1008609.sql
14SELECT 1;
15EOF
16
17exec
18 $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/percona_bug1008609.sql >>
19 $MYSQLTEST_VARDIR/tmp/percona_bug1008609.log 2>&1;
20
21--remove_file $MYSQLTEST_VARDIR/tmp/percona_bug1008609.sql
22--remove_file $MYSQLTEST_VARDIR/tmp/percona_bug1008609.log
23
24--echo OK
025
=== modified file 'Percona-Server/sql/sql_connect.cc'
--- Percona-Server/sql/sql_connect.cc 2012-05-18 04:36:35 +0000
+++ Percona-Server/sql/sql_connect.cc 2012-06-14 14:34:30 +0000
@@ -499,7 +499,7 @@
499 }499 }
500 }500 }
501 user_stats->total_connections++;501 user_stats->total_connections++;
502 if (thd->net.vio->type == VIO_TYPE_SSL)502 if (thd->net.vio && thd->net.vio->type == VIO_TYPE_SSL)
503 user_stats->total_ssl_connections++;503 user_stats->total_ssl_connections++;
504 return 0;504 return 0;
505}505}
@@ -539,7 +539,7 @@
539 }539 }
540 }540 }
541 thread_stats->total_connections++;541 thread_stats->total_connections++;
542 if (thd->net.vio->type == VIO_TYPE_SSL)542 if (thd->net.vio && thd->net.vio->type == VIO_TYPE_SSL)
543 thread_stats->total_ssl_connections++;543 thread_stats->total_ssl_connections++;
544 return 0;544 return 0;
545}545}

Subscribers

People subscribed via source and target branches