#At file:///home/bm136801/my/bug-tr/ based on revid:bjorn.munch@stripped
3453 Bjorn Munch 2010-12-20 [merge]
upmerge some more test if simplifications
modified:
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/rpl_row_img_parts_master_slave.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
=== 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:22:30 +0000
+++ b/mysql-test/include/diff_tables.inc 2010-12-20 14:57:35 +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/rpl_row_img_parts_master_slave.inc'
--- a/mysql-test/include/rpl_row_img_parts_master_slave.inc 2010-06-02 22:32:22 +0000
+++ b/mysql-test/include/rpl_row_img_parts_master_slave.inc 2010-12-20 14:57:35 +0000
@@ -68,7 +68,7 @@
# wait for 5 minutes
-- let $iterations=3000
-while(`SELECT $_pos = $row_img_pos_master`)
+while($_pos == $row_img_pos_master)
{
-- sleep 0.1
-- let $_pos= query_get_value("SHOW MASTER STATUS", Position, 1)
=== 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:22:30 +0000
+++ b/mysql-test/include/sync_slave_io_with_master.inc 2010-12-20 14:57:35 +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-11-17 12:21:45 +0000
+++ b/mysql-test/include/wait_for_binlog_event.inc 2010-12-20 14:57:35 +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 ($_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:22:30 +0000
+++ b/mysql-test/include/wait_for_slave_param.inc 2010-12-20 14:57:35 +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
No bundle (reason: revision is a merge).
| Thread |
|---|
| • bzr commit into mysql-trunk-mtr branch (bjorn.munch:3453) | Bjorn Munch | 20 Dec |