3216 Bjorn Munch 2010-12-20 [merge]
Some if simplifications in tests
modified:
mysql-test/extra/rpl_tests/rpl_stop_slave.test
mysql-test/include/check_ftwrl_compatible.inc
mysql-test/include/check_ftwrl_incompatible.inc
mysql-test/include/check_slave_param.inc
mysql-test/include/diff_tables.inc
mysql-test/include/rpl_change_topology.inc
mysql-test/include/rpl_connect.inc
mysql-test/include/rpl_diff.inc
mysql-test/include/rpl_end.inc
mysql-test/include/rpl_init.inc
mysql-test/include/show_slave_status.inc
mysql-test/include/sync_slave_io_with_master.inc
mysql-test/include/wait_for_binlog_event.inc
mysql-test/include/wait_for_slave_param.inc
mysql-test/include/write_var_to_file.inc
mysql-test/suite/innodb/t/innodb_bug42419.test
3215 Tor Didriksen 2010-12-20
Bug #59021 Valgrind warning in key_unpack()
Introduced by fix for Bug#57687
@ sql/sql_select.cc
Add missing initialization of key_part_info->key_part_flag
modified:
sql/sql_select.cc
=== modified file 'mysql-test/extra/rpl_tests/rpl_stop_slave.test'
--- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test 2010-12-19 17:15:12 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test 2010-12-20 14:15:01 +0000
@@ -9,7 +9,7 @@
# --source extra/rpl_tests/rpl_stop_slave.test
#
-if (`SELECT "$tmp_table_stm" = ''`)
+if (!$tmp_table_stm)
{
--echo \$tmp_table_stm is NULL
--die $tmp_table_stm is NULL
=== modified file 'mysql-test/include/check_ftwrl_compatible.inc'
--- a/mysql-test/include/check_ftwrl_compatible.inc 2010-11-11 17:11:05 +0000
+++ b/mysql-test/include/check_ftwrl_compatible.inc 2010-12-17 10:30:59 +0000
@@ -34,7 +34,7 @@ if (!$err)
{
--echo Success: Was able to run '$statement' under FTWRL.
unlock tables;
-if (`SELECT "$cleanup_stmt" <> ""`)
+if ($cleanup_stmt)
{
--eval $cleanup_stmt;
}
@@ -91,12 +91,12 @@ connection default;
--reap
}
-if (`SELECT "$cleanup_stmt" <> ""`)
+if ($cleanup_stmt)
{
--eval $cleanup_stmt;
}
-if (`SELECT "$skip_3rd_check" = ""`)
+if (!$skip_3rd_check)
{
#
# Finally, let us check that FTWRL will succeed if this statement
@@ -147,7 +147,7 @@ connection default;
}
set debug_sync= "RESET";
-if (`SELECT "$cleanup_stmt" <> ""`)
+if ($cleanup_stmt)
{
--eval $cleanup_stmt;
}
=== modified file 'mysql-test/include/check_ftwrl_incompatible.inc'
--- a/mysql-test/include/check_ftwrl_incompatible.inc 2010-11-11 17:11:05 +0000
+++ b/mysql-test/include/check_ftwrl_incompatible.inc 2010-12-17 10:30:59 +0000
@@ -41,11 +41,11 @@ if (!$err)
{
--echo Error: Was able to run '$statement' under FTWRL!
unlock tables;
-if (`SELECT "$cleanup_stmt1" <> ""`)
+if ($cleanup_stmt1)
{
--eval $cleanup_stmt1;
}
-if (`SELECT "$cleanup_stmt2" <> ""`)
+if ($cleanup_stmt2)
{
--eval $cleanup_stmt2;
}
@@ -88,16 +88,16 @@ unlock tables;
connection default;
--reap
-if (`SELECT "$cleanup_stmt1" <> ""`)
+if ($cleanup_stmt1)
{
--eval $cleanup_stmt1;
}
-if (`SELECT "$cleanup_stmt2" <> ""`)
+if ($cleanup_stmt2)
{
--eval $cleanup_stmt2;
}
-if (`SELECT "$skip_3rd_check" = ""`)
+if (!$skip_3rd_check)
{
#
# Finally, let us check that FTWRL will not succeed if this
@@ -141,11 +141,11 @@ connection default;
set debug_sync= "RESET";
-if (`SELECT "$cleanup_stmt1" <> ""`)
+if ($cleanup_stmt1)
{
--eval $cleanup_stmt1;
}
-if (`SELECT "$cleanup_stmt2" <> ""`)
+if ($cleanup_stmt2)
{
--eval $cleanup_stmt2;
}
=== modified file 'mysql-test/include/check_slave_param.inc'
--- a/mysql-test/include/check_slave_param.inc 2010-12-19 17:07:28 +0000
+++ b/mysql-test/include/check_slave_param.inc 2010-12-20 14:15:01 +0000
@@ -25,7 +25,7 @@
--let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
-if (`SELECT '$_param_value' != '$slave_param_value'`) {
+if ($_param_value != $slave_param_value) {
--source include/show_rpl_debug_info.inc
--echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
--die Wrong value for slave parameter
=== modified file 'mysql-test/include/diff_tables.inc'
--- a/mysql-test/include/diff_tables.inc 2010-12-19 17:15:12 +0000
+++ b/mysql-test/include/diff_tables.inc 2010-12-20 14:15:01 +0000
@@ -81,7 +81,7 @@ if (`SELECT LOCATE(',', '$diff_tables')
# Iterate over all tables
--let $_dt_outfile=
--let $_dt_prev_outfile=
-while (`SELECT '$_dt_tables' != ''`)
+while ($_dt_tables)
{
--let $_dt_table= `SELECT SUBSTRING_INDEX('$_dt_tables', ',', 1)`
--let $_dt_tables= `SELECT SUBSTRING('$_dt_tables', LENGTH('$_dt_table') + 2)`
=== modified file 'mysql-test/include/rpl_change_topology.inc'
--- a/mysql-test/include/rpl_change_topology.inc 2010-12-19 17:15:12 +0000
+++ b/mysql-test/include/rpl_change_topology.inc 2010-12-20 14:15:01 +0000
@@ -111,11 +111,11 @@ if (`SELECT '$rpl_topology' = '' OR '$rp
--die You must set $rpl_topology and $rpl_server_count before you source rpl_change_topology.inc. If you really want to change to the empty topology, set $rpl_topology= none
}
--let $_rpl_topology= $rpl_topology
-if (`SELECT '$_rpl_topology' = 'none'`)
+if ($_rpl_topology == 'none')
{
--let $_rpl_topology=
}
-if (`SELECT '!$rpl_master_list!' = '!!'`)
+if ($rpl_master_list == '')
{
--die You must source include/rpl_init.inc before you source include/rpl_change_topology.inc
}
@@ -227,16 +227,13 @@ if (!$rpl_skip_change_master)
}
eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1;
}
- if (!$_rpl_master)
+ if ($_rpl_master == '')
{
- if (`SELECT '$_rpl_master' = ''`)
- {
# This un-configures the server so that it's not a slave.
# After BUG#28796, such configuration is not possible any more.
#--let $rpl_connection_name= server_$_rpl_server
#--source include/rpl_connection.inc
#CHANGE MASTER TO MASTER_HOST = '';
- }
}
--dec $_rpl_server
}
=== modified file 'mysql-test/include/rpl_connect.inc'
--- a/mysql-test/include/rpl_connect.inc 2010-12-19 17:07:28 +0000
+++ b/mysql-test/include/rpl_connect.inc 2010-12-20 14:15:01 +0000
@@ -33,7 +33,7 @@ if (!$rpl_server_number)
{
--die ERROR IN TEST: You must set $rpl_server_number before sourcing include/rpl_connect.inc
}
-if (`SELECT '$rpl_connection_name' = ''`)
+if (!$rpl_connection_name)
{
--die ERROR IN TEST: You must set $rpl_connection_name before sourcing include/rpl_connect.inc
}
=== modified file 'mysql-test/include/rpl_diff.inc'
--- a/mysql-test/include/rpl_diff.inc 2010-12-19 17:07:28 +0000
+++ b/mysql-test/include/rpl_diff.inc 2010-12-20 14:15:01 +0000
@@ -46,7 +46,7 @@ if (!$rpl_diff_statement)
# Get database name.
--let $_rpl_diff_database= $rpl_diff_database
-if (`SELECT '$_rpl_diff_database' = ''`)
+if (!$_rpl_diff_database)
{
--let $_rpl_diff_database= test
}
=== modified file 'mysql-test/include/rpl_end.inc'
--- a/mysql-test/include/rpl_end.inc 2010-12-19 17:15:12 +0000
+++ b/mysql-test/include/rpl_end.inc 2010-12-20 14:15:01 +0000
@@ -68,7 +68,7 @@ while ($_rpl_server)
# Only check slave threads for error on hosts that were at some
# point configured as slave.
--let $_tmp= query_get_value(SHOW SLAVE STATUS, Master_Host, 1)
- if (`SELECT '$_tmp' != 'No such row'`)
+ if ($_tmp != 'No such row')
{
--source include/check_slave_no_error.inc
}
=== modified file 'mysql-test/include/rpl_init.inc'
--- a/mysql-test/include/rpl_init.inc 2010-12-19 17:07:28 +0000
+++ b/mysql-test/include/rpl_init.inc 2010-12-20 14:15:01 +0000
@@ -116,24 +116,24 @@ if ($rpl_debug)
}
# Allow $MASTER_MYPORT as alias for $SERVER_MYPORT_1
-if (`SELECT '$SERVER_MYPORT_1' = ''`)
+if (!$SERVER_MYPORT_1)
{
--let SERVER_MYPORT_1= $MASTER_MYPORT
}
# Allow $SLAVE_MYPORT as alias for $SERVER_MYPORT_2
-if (`SELECT '$SERVER_MYPORT_2' = ''`)
+if (!$SERVER_MYPORT_2)
{
--let SERVER_MYPORT_2= $SLAVE_MYPORT
}
# Allow $MASTER_MYPORT1 as alias for $SERVER_MYPORT_3
# (this alias is used by rpl_ndb tests)
-if (`SELECT '$SERVER_MYPORT_3' = ''`)
+if (!$SERVER_MYPORT_3)
{
--let SERVER_MYPORT_3= $MASTER_MYPORT1
}
# Allow $SLAVE_MYPORT1 as alias for $SERVER_MYPORT_4
# (this alias is used by rpl_ndb tests)
-if (`SELECT '$SERVER_MYPORT_4' = ''`)
+if (!$SERVER_MYPORT_4)
{
--let SERVER_MYPORT_4= $SLAVE_MYPORT1
}
=== modified file 'mysql-test/include/show_slave_status.inc'
--- a/mysql-test/include/show_slave_status.inc 2010-12-19 17:15:12 +0000
+++ b/mysql-test/include/show_slave_status.inc 2010-12-20 14:15:01 +0000
@@ -58,13 +58,13 @@
--let $_show_slave_status_items=$status_items
-if (`SELECT "XX$status_items" = "XX"`)
+if (!$status_items)
{
--die Bug in test case: The mysqltest variable $status_items is not set.
}
-while (`SELECT "XX$_show_slave_status_items" <> "XX"`)
+while ($_show_slave_status_items)
{
--let $_show_slave_status_name= `SELECT SUBSTRING_INDEX('$_show_slave_status_items', ',', 1)`
--let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))`
=== modified file 'mysql-test/include/sync_slave_io_with_master.inc'
--- a/mysql-test/include/sync_slave_io_with_master.inc 2010-12-19 17:07:28 +0000
+++ b/mysql-test/include/sync_slave_io_with_master.inc 2010-12-20 14:15:01 +0000
@@ -36,7 +36,7 @@
--source include/save_master_pos.inc
--let $rpl_connection_name= slave
-if (`SELECT '$sync_slave_connection' != ''`)
+if ($sync_slave_connection)
{
--let $rpl_connection_name= $sync_slave_connection
}
=== modified file 'mysql-test/include/wait_for_binlog_event.inc'
--- a/mysql-test/include/wait_for_binlog_event.inc 2010-05-24 13:54:08 +0000
+++ b/mysql-test/include/wait_for_binlog_event.inc 2010-12-20 14:15:01 +0000
@@ -24,7 +24,7 @@ while (`SELECT INSTR("$_last_event","$wa
real_sleep 0.1;
let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos);
let $_last_event= $_event;
- while (`SELECT "$_event" != "No such row"`)
+ while ($_event != "No such row")
{
inc $_event_pos;
let $_last_event= $_event;
=== modified file 'mysql-test/include/wait_for_slave_param.inc'
--- a/mysql-test/include/wait_for_slave_param.inc 2010-12-19 17:15:12 +0000
+++ b/mysql-test/include/wait_for_slave_param.inc 2010-12-20 14:15:01 +0000
@@ -52,7 +52,7 @@ if (!$_slave_timeout)
let $_slave_timeout= 300;
}
-if (`SELECT '$slave_error_param' = ''`)
+if ($slave_error_param == '')
{
--let $slave_error_param= 1
}
@@ -70,7 +70,7 @@ if ($rpl_debug)
--let $_slave_check_configured= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1)
-if (`SELECT '$_slave_check_configured' = 'No such row'`)
+if ($_slave_check_configured == 'No such row')
{
--echo **** ERROR: SHOW SLAVE STATUS returned empty result set. Slave not configured. ****
--source include/show_rpl_debug_info.inc
=== modified file 'mysql-test/include/write_var_to_file.inc'
--- a/mysql-test/include/write_var_to_file.inc 2010-12-19 17:07:28 +0000
+++ b/mysql-test/include/write_var_to_file.inc 2010-12-20 14:15:01 +0000
@@ -27,12 +27,12 @@
# @@secure_file_priv. That makes this more complex than you might
# expect.
-if (`SELECT '$write_to_file' = ''`)
+if (!$write_to_file)
{
--die You must set the mysqltest variable \$write_to_file before you source include/write_var_to_file.inc
}
-if (`SELECT '$write_to_file' = 'GENERATE'`)
+if ($write_to_file == 'GENERATE')
{
--let $_wvtf_suffix= `SELECT UUID()`
--let $write_to_file= $MYSQLTEST_VARDIR/tmp/_var_file_$_wvtf_suffix.inc
=== modified file 'mysql-test/suite/innodb/t/innodb_bug42419.test'
--- a/mysql-test/suite/innodb/t/innodb_bug42419.test 2010-07-05 09:35:24 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug42419.test 2010-12-17 10:30:59 +0000
@@ -7,7 +7,7 @@
--source include/have_innodb.inc
let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1);
-if (`SELECT $innodb_lock_wait_timeout < 10`)
+if ($innodb_lock_wait_timeout < 10)
{
--echo # innodb_lock_wait_timeout must be >= 10 seconds
--echo # so that this test can work all time fine on an overloaded testing box
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-bugteam branch (bjorn.munch:3215 to 3216) | Bjorn Munch | 20 Dec |