From 6e6ba8654b0e6e078f5f3d41d504ad446ef759ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 8 Mar 2012 17:10:10 +0200 Subject: [PATCH 01/10] Fix a compiler warning about possibly uninitiaizlied variable. --- storage/innobase/btr/btr0pcur.c | 3 +-- storage/innodb_plugin/btr/btr0pcur.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/storage/innobase/btr/btr0pcur.c b/storage/innobase/btr/btr0pcur.c index 439ab3093b2..50aef035f2e 100644 --- a/storage/innobase/btr/btr0pcur.c +++ b/storage/innobase/btr/btr0pcur.c @@ -301,10 +301,9 @@ btr_pcur_restore_position( case BTR_PCUR_BEFORE: mode = PAGE_CUR_L; break; -#ifdef UNIV_DEBUG default: ut_error; -#endif /* UNIV_DEBUG */ + mode = 0; /* silence a warning */ } btr_pcur_open_with_no_init(index, tuple, mode, latch_mode, diff --git a/storage/innodb_plugin/btr/btr0pcur.c b/storage/innodb_plugin/btr/btr0pcur.c index 6cbfd8a64b7..33700501bc5 100644 --- a/storage/innodb_plugin/btr/btr0pcur.c +++ b/storage/innodb_plugin/btr/btr0pcur.c @@ -325,10 +325,9 @@ btr_pcur_restore_position_func( case BTR_PCUR_BEFORE: mode = PAGE_CUR_L; break; -#ifdef UNIV_DEBUG default: ut_error; -#endif /* UNIV_DEBUG */ + mode = 0; } btr_pcur_open_with_no_init_func(index, tuple, mode, latch_mode, From a54e6e002d0297ad02461f933f35c9bcb147a1eb Mon Sep 17 00:00:00 2001 From: Manish Kumar Date: Fri, 9 Mar 2012 08:07:16 +0530 Subject: [PATCH 02/10] BUG#13812374 - RPL.RPL_REPORT_PORT FAILS OCCASIONALLY ON PB2 Fix - Changed the implementation of the condition check from the result file to using an assert. mysql-test/suite/rpl/r/rpl_report_port.result: Updated the result file. mysql-test/suite/rpl/t/rpl_report_port.test: Changed from the a condtional check to an assert. --- mysql-test/suite/rpl/r/rpl_report_port.result | 11 ++------ mysql-test/suite/rpl/t/rpl_report_port.test | 28 ++++++------------- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_report_port.result b/mysql-test/suite/rpl/r/rpl_report_port.result index d5a684241bc..ebdd3f889f3 100644 --- a/mysql-test/suite/rpl/r/rpl_report_port.result +++ b/mysql-test/suite/rpl/r/rpl_report_port.result @@ -1,15 +1,8 @@ include/master-slave.inc [connection master] -[The default value shown for the slave's port number is the actual port number of the slave] -SHOW SLAVE HOSTS; -Server_id Host Port Master_id -2 127.0.0.1 SLAVE_PORT 1 -[The default value shown for the slave's port number is the actual port number of the slave] +include/assert.inc [The default value shown for the slave's port number is the actual port number of the slave.] include/rpl_restart_server.inc [server_number=2 parameters: --report-port=9000] include/start_slave.inc [Slave restarted with the report-port set to some value] -[The value shown for the slave's port number is 9000 which is the value set for report-port] -SHOW SLAVE HOSTS; -Server_id Host Port Master_id -2 127.0.0.1 9000 1 +include/assert.inc [The value shown for the slave's port number is 9000 which is the value set for report-port.] include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_report_port.test b/mysql-test/suite/rpl/t/rpl_report_port.test index 11cb9684090..b1b71a2982c 100644 --- a/mysql-test/suite/rpl/t/rpl_report_port.test +++ b/mysql-test/suite/rpl/t/rpl_report_port.test @@ -21,16 +21,10 @@ source include/master-slave.inc; connection master; ---echo [The default value shown for the slave's port number is the actual port number of the slave] -source include/show_slave_hosts.inc; - -# SLAVE_PORT is the value of the port we should get. - -let $show_statement= SHOW SLAVE HOSTS; -let $field= Port; -let $condition= 'SLAVE_PORT'; -source include/wait_show_condition.inc; ---echo [The default value shown for the slave's port number is the actual port number of the slave] +--let $report_port= query_get_value(SHOW SLAVE HOSTS, Port, 1) +--let assert_text= The default value shown for the slave's port number is the actual port number of the slave. +--let assert_cond= $report_port = "$SLAVE_MYPORT" +--source include/assert.inc # Start the server with some value being passed to the report_port=