Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b7e61a3a
Commit
b7e61a3a
authored
Dec 20, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
Some if simplifications in tests
parents
209df51c
63728717
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
33 additions
and
36 deletions
+33
-36
mysql-test/extra/rpl_tests/rpl_stop_slave.test
mysql-test/extra/rpl_tests/rpl_stop_slave.test
+1
-1
mysql-test/include/check_ftwrl_compatible.inc
mysql-test/include/check_ftwrl_compatible.inc
+4
-4
mysql-test/include/check_ftwrl_incompatible.inc
mysql-test/include/check_ftwrl_incompatible.inc
+7
-7
mysql-test/include/check_slave_param.inc
mysql-test/include/check_slave_param.inc
+1
-1
mysql-test/include/diff_tables.inc
mysql-test/include/diff_tables.inc
+1
-1
mysql-test/include/rpl_change_topology.inc
mysql-test/include/rpl_change_topology.inc
+3
-6
mysql-test/include/rpl_connect.inc
mysql-test/include/rpl_connect.inc
+1
-1
mysql-test/include/rpl_diff.inc
mysql-test/include/rpl_diff.inc
+1
-1
mysql-test/include/rpl_end.inc
mysql-test/include/rpl_end.inc
+1
-1
mysql-test/include/rpl_init.inc
mysql-test/include/rpl_init.inc
+4
-4
mysql-test/include/show_slave_status.inc
mysql-test/include/show_slave_status.inc
+2
-2
mysql-test/include/sync_slave_io_with_master.inc
mysql-test/include/sync_slave_io_with_master.inc
+1
-1
mysql-test/include/wait_for_binlog_event.inc
mysql-test/include/wait_for_binlog_event.inc
+1
-1
mysql-test/include/wait_for_slave_param.inc
mysql-test/include/wait_for_slave_param.inc
+2
-2
mysql-test/include/write_var_to_file.inc
mysql-test/include/write_var_to_file.inc
+2
-2
mysql-test/suite/innodb/t/innodb_bug42419.test
mysql-test/suite/innodb/t/innodb_bug42419.test
+1
-1
No files found.
mysql-test/extra/rpl_tests/rpl_stop_slave.test
View file @
b7e61a3a
...
...
@@ -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
...
...
mysql-test/include/check_ftwrl_compatible.inc
View file @
b7e61a3a
...
...
@@ -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
;
}
...
...
mysql-test/include/check_ftwrl_incompatible.inc
View file @
b7e61a3a
...
...
@@ -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
;
}
...
...
mysql-test/include/check_slave_param.inc
View file @
b7e61a3a
...
...
@@ -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
...
...
mysql-test/include/diff_tables.inc
View file @
b7e61a3a
...
...
@@ -81,7 +81,7 @@ if (`SELECT LOCATE(',', '$diff_tables') = 0`)
# 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)`
...
...
mysql-test/include/rpl_change_topology.inc
View file @
b7e61a3a
...
...
@@ -111,11 +111,11 @@ if (`SELECT '$rpl_topology' = '' OR '$rpl_server_count' = ''`)
--
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
}
...
...
mysql-test/include/rpl_connect.inc
View file @
b7e61a3a
...
...
@@ -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
}
...
...
mysql-test/include/rpl_diff.inc
View file @
b7e61a3a
...
...
@@ -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
}
...
...
mysql-test/include/rpl_end.inc
View file @
b7e61a3a
...
...
@@ -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
}
...
...
mysql-test/include/rpl_init.inc
View file @
b7e61a3a
...
...
@@ -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
}
...
...
mysql-test/include/show_slave_status.inc
View file @
b7e61a3a
...
...
@@ -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))`
...
...
mysql-test/include/sync_slave_io_with_master.inc
View file @
b7e61a3a
...
...
@@ -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
}
...
...
mysql-test/include/wait_for_binlog_event.inc
View file @
b7e61a3a
...
...
@@ -24,7 +24,7 @@ while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`)
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
;
...
...
mysql-test/include/wait_for_slave_param.inc
View file @
b7e61a3a
...
...
@@ -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
...
...
mysql-test/include/write_var_to_file.inc
View file @
b7e61a3a
...
...
@@ -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
...
...
mysql-test/suite/innodb/t/innodb_bug42419.test
View file @
b7e61a3a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment