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
ef4458af
Commit
ef4458af
authored
Nov 17, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: many if/while expresissons simplified after 57276
parent
49ce7daa
Changes
53
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
211 additions
and
182 deletions
+211
-182
mysql-test/extra/binlog_tests/binlog_truncate.test
mysql-test/extra/binlog_tests/binlog_truncate.test
+3
-3
mysql-test/extra/binlog_tests/blackhole.test
mysql-test/extra/binlog_tests/blackhole.test
+1
-1
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
+1
-1
mysql-test/extra/rpl_tests/create_recursive_construct.inc
mysql-test/extra/rpl_tests/create_recursive_construct.inc
+20
-13
mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
+12
-12
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
+1
-1
mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
+57
-57
mysql-test/extra/rpl_tests/rpl_insert_delayed.test
mysql-test/extra/rpl_tests/rpl_insert_delayed.test
+1
-1
mysql-test/extra/rpl_tests/rpl_not_null.test
mysql-test/extra/rpl_tests/rpl_not_null.test
+7
-7
mysql-test/include/check_slave_is_running.inc
mysql-test/include/check_slave_is_running.inc
+9
-1
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/have_example_plugin.inc
mysql-test/include/have_example_plugin.inc
+1
-1
mysql-test/include/have_semisync_plugin.inc
mysql-test/include/have_semisync_plugin.inc
+1
-1
mysql-test/include/have_simple_parser.inc
mysql-test/include/have_simple_parser.inc
+1
-1
mysql-test/include/have_udf.inc
mysql-test/include/have_udf.inc
+1
-1
mysql-test/include/mysql_upgrade_preparation.inc
mysql-test/include/mysql_upgrade_preparation.inc
+1
-1
mysql-test/include/no_valgrind_without_big.inc
mysql-test/include/no_valgrind_without_big.inc
+5
-4
mysql-test/include/not_parallel.inc
mysql-test/include/not_parallel.inc
+1
-1
mysql-test/include/rpl_diff_tables.inc
mysql-test/include/rpl_diff_tables.inc
+3
-3
mysql-test/include/setup_fake_relay_log.inc
mysql-test/include/setup_fake_relay_log.inc
+8
-1
mysql-test/include/show_rpl_debug_info.inc
mysql-test/include/show_rpl_debug_info.inc
+2
-2
mysql-test/include/truncate_file.inc
mysql-test/include/truncate_file.inc
+1
-1
mysql-test/include/wait_for_slave_io_to_stop.inc
mysql-test/include/wait_for_slave_io_to_stop.inc
+1
-1
mysql-test/include/wait_for_slave_sql_error.inc
mysql-test/include/wait_for_slave_sql_error.inc
+1
-1
mysql-test/include/wait_for_slave_sql_to_stop.inc
mysql-test/include/wait_for_slave_sql_to_stop.inc
+1
-1
mysql-test/include/wait_for_slave_to_stop.inc
mysql-test/include/wait_for_slave_to_stop.inc
+1
-1
mysql-test/include/wait_show_condition.inc
mysql-test/include/wait_show_condition.inc
+12
-6
mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test
...test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test
+3
-3
mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
+1
-1
mysql-test/suite/binlog/t/binlog_unsafe.test
mysql-test/suite/binlog/t/binlog_unsafe.test
+13
-13
mysql-test/suite/federated/federated_bug_25714.test
mysql-test/suite/federated/federated_bug_25714.test
+1
-1
mysql-test/suite/perfschema_stress/t/modify.test
mysql-test/suite/perfschema_stress/t/modify.test
+1
-1
mysql-test/suite/perfschema_stress/t/setup.test
mysql-test/suite/perfschema_stress/t/setup.test
+2
-2
mysql-test/suite/perfschema_stress/t/work.test
mysql-test/suite/perfschema_stress/t/work.test
+1
-1
mysql-test/suite/rpl/t/rpl_change_master.test
mysql-test/suite/rpl/t/rpl_change_master.test
+2
-2
mysql-test/suite/rpl/t/rpl_concurrency_error.test
mysql-test/suite/rpl/t/rpl_concurrency_error.test
+8
-8
mysql-test/suite/rpl/t/rpl_heartbeat.test
mysql-test/suite/rpl/t/rpl_heartbeat.test
+1
-1
mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
+2
-2
mysql-test/suite/rpl/t/rpl_semi_sync.test
mysql-test/suite/rpl/t/rpl_semi_sync.test
+2
-2
mysql-test/suite/rpl/t/rpl_semi_sync_event.test
mysql-test/suite/rpl/t/rpl_semi_sync_event.test
+2
-2
mysql-test/suite/rpl/t/rpl_slow_query_log.test
mysql-test/suite/rpl/t/rpl_slow_query_log.test
+4
-4
mysql-test/suite/rpl/t/rpl_ssl.test
mysql-test/suite/rpl/t/rpl_ssl.test
+1
-1
mysql-test/suite/sys_vars/t/slow_launch_time_func.test
mysql-test/suite/sys_vars/t/slow_launch_time_func.test
+1
-1
mysql-test/t/change_user.test
mysql-test/t/change_user.test
+1
-1
mysql-test/t/execution_constants.test
mysql-test/t/execution_constants.test
+1
-1
mysql-test/t/fix_priv_tables.test
mysql-test/t/fix_priv_tables.test
+1
-1
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+3
-3
mysql-test/t/named_pipe.test
mysql-test/t/named_pipe.test
+1
-1
mysql-test/t/shm.test
mysql-test/t/shm.test
+1
-1
mysql-test/t/system_mysql_db_fix40123.test
mysql-test/t/system_mysql_db_fix40123.test
+1
-1
mysql-test/t/system_mysql_db_fix50030.test
mysql-test/t/system_mysql_db_fix50030.test
+1
-1
mysql-test/t/system_mysql_db_fix50117.test
mysql-test/t/system_mysql_db_fix50117.test
+1
-1
No files found.
mysql-test/extra/binlog_tests/binlog_truncate.test
View file @
ef4458af
...
@@ -12,13 +12,13 @@ eval CREATE TABLE t1 (a INT) ENGINE=$engine;
...
@@ -12,13 +12,13 @@ eval CREATE TABLE t1 (a INT) ENGINE=$engine;
eval
CREATE
TABLE
t2
(
a
INT
)
ENGINE
=
$engine
;
eval
CREATE
TABLE
t2
(
a
INT
)
ENGINE
=
$engine
;
INSERT
INTO
t2
VALUES
(
1
),(
2
),(
3
);
INSERT
INTO
t2
VALUES
(
1
),(
2
),(
3
);
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
if
(
`select length('$before_truncate') > 0`
)
{
if
(
$before_truncate
)
{
eval
$before_truncate
;
eval
$before_truncate
;
}
}
--
echo
****
Truncate
of
empty
table
shall
be
logged
--
echo
****
Truncate
of
empty
table
shall
be
logged
TRUNCATE
TABLE
t1
;
TRUNCATE
TABLE
t1
;
if
(
`select length('$before_truncate') > 0`
)
{
if
(
$before_truncate
)
{
eval
$before_truncate
;
eval
$before_truncate
;
}
}
TRUNCATE
TABLE
t2
;
TRUNCATE
TABLE
t2
;
...
@@ -35,7 +35,7 @@ eval CREATE TABLE t2 (a INT) ENGINE=$engine;
...
@@ -35,7 +35,7 @@ eval CREATE TABLE t2 (a INT) ENGINE=$engine;
INSERT
INTO
t1
VALUES
(
1
),(
2
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
if
(
`select length('$before_truncate') > 0`
)
{
if
(
$before_truncate
)
{
eval
$before_truncate
;
eval
$before_truncate
;
}
}
...
...
mysql-test/extra/binlog_tests/blackhole.test
View file @
ef4458af
...
@@ -173,7 +173,7 @@ insert into t1 values(2);
...
@@ -173,7 +173,7 @@ insert into t1 values(2);
rollback
;
rollback
;
let
$master_log_pos_2
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
);
let
$master_log_pos_2
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
);
if
(
`SELECT $master_log_pos_2 <> $master_log_pos_1`
)
if
(
$master_log_pos_2
!=
$master_log_pos_1
)
{
{
echo
$master_log_pos_1
$master_log_pos_2
;
echo
$master_log_pos_1
$master_log_pos_2
;
die
Rollbacked
transaction
has
been
binlogged
;
die
Rollbacked
transaction
has
been
binlogged
;
...
...
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
View file @
ef4458af
...
@@ -319,7 +319,7 @@ if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
...
@@ -319,7 +319,7 @@ if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
{
{
--
let
$binlog_rollback
=
query_get_value
(
SHOW
BINLOG
EVENTS
,
Pos
,
7
)
--
let
$binlog_rollback
=
query_get_value
(
SHOW
BINLOG
EVENTS
,
Pos
,
7
)
--
let
$binlog_query
=
query_get_value
(
SHOW
BINLOG
EVENTS
,
Info
,
7
)
--
let
$binlog_query
=
query_get_value
(
SHOW
BINLOG
EVENTS
,
Info
,
7
)
if
(
`SELECT 'ROLLBACK' != '$binlog_query'`
)
{
if
(
$binlog_query
!=
ROLLBACK
)
{
--
echo
Wrong
query
from
SHOW
BINLOG
EVENTS
.
Expected
ROLLBACK
,
got
'$binlog_query'
--
echo
Wrong
query
from
SHOW
BINLOG
EVENTS
.
Expected
ROLLBACK
,
got
'$binlog_query'
--
source
include
/
show_rpl_debug_info
.
inc
--
source
include
/
show_rpl_debug_info
.
inc
--
die
Wrong
value
for
slave
parameter
--
die
Wrong
value
for
slave
parameter
...
...
mysql-test/extra/rpl_tests/create_recursive_construct.inc
View file @
ef4458af
...
@@ -167,7 +167,9 @@
...
@@ -167,7 +167,9 @@
--
let
$CRC_create
=
--
let
$CRC_create
=
######## func_retval ########
######## func_retval ########
if
(
`SELECT $CRC_ARG_type = 0 AND '$CRC_ARG_value' != ''`
)
{
# if inside if in lieu of AND operand
if
(
$CRC_ARG_type
==
0
)
{
if
(
$CRC_ARG_value
)
{
# It will be safe to call this function and discard the return
# It will be safe to call this function and discard the return
# value, but it will be unsafe to use return value (e.g., in
# value, but it will be unsafe to use return value (e.g., in
# INSERT...SELECT).
# INSERT...SELECT).
...
@@ -180,10 +182,11 @@ if (`SELECT $CRC_ARG_type = 0 AND '$CRC_ARG_value' != ''`) {
...
@@ -180,10 +182,11 @@ if (`SELECT $CRC_ARG_type = 0 AND '$CRC_ARG_value' != ''`) {
--
let
$CRC_RET_drop
=
DROP
FUNCTION
$
CRC_name
--
let
$CRC_RET_drop
=
DROP
FUNCTION
$
CRC_name
--
let
$CRC_RET_is_toplevel
=
0
--
let
$CRC_RET_is_toplevel
=
0
--
let
$CRC_RET_desc
=
function
$
CRC_name
returning
value
from
$CRC_ARG_desc
--
let
$CRC_RET_desc
=
function
$
CRC_name
returning
value
from
$CRC_ARG_desc
}
}
}
######## func_sidef ########
######## func_sidef ########
if
(
`SELECT $CRC_ARG_type = 1`
)
{
if
(
$CRC_ARG_type
==
1
)
{
# It will be unsafe to call func even if you discard return value.
# It will be unsafe to call func even if you discard return value.
--
let
$CRC_name
=
func_sidef_
$CRC_ARG_level
--
let
$CRC_name
=
func_sidef_
$CRC_ARG_level
--
let
$CRC_create
=
CREATE
FUNCTION
$
CRC_name
()
RETURNS
VARCHAR
(
100
)
BEGIN
INSERT
INTO
ta
$CRC_ARG_level
VALUES
(
47
);
$CRC_ARG_stmt_sidef
;
RETURN
0
;
END
--
let
$CRC_create
=
CREATE
FUNCTION
$
CRC_name
()
RETURNS
VARCHAR
(
100
)
BEGIN
INSERT
INTO
ta
$CRC_ARG_level
VALUES
(
47
);
$CRC_ARG_stmt_sidef
;
RETURN
0
;
END
...
@@ -197,7 +200,7 @@ if (`SELECT $CRC_ARG_type = 1`) {
...
@@ -197,7 +200,7 @@ if (`SELECT $CRC_ARG_type = 1`) {
}
}
######## proc ########
######## proc ########
if
(
`SELECT $CRC_ARG_type = 2`
)
{
if
(
$CRC_ARG_type
==
2
)
{
# It will be unsafe to call this procedure.
# It will be unsafe to call this procedure.
--
let
$CRC_name
=
proc_
$CRC_ARG_level
--
let
$CRC_name
=
proc_
$CRC_ARG_level
--
let
$CRC_create
=
CREATE
PROCEDURE
$CRC_name
()
BEGIN
$CRC_ARG_stmt_sidef
;
INSERT
INTO
ta
$CRC_ARG_level
VALUES
(
47
);
END
--
let
$CRC_create
=
CREATE
PROCEDURE
$CRC_name
()
BEGIN
$CRC_ARG_stmt_sidef
;
INSERT
INTO
ta
$CRC_ARG_level
VALUES
(
47
);
END
...
@@ -211,7 +214,7 @@ if (`SELECT $CRC_ARG_type = 2`) {
...
@@ -211,7 +214,7 @@ if (`SELECT $CRC_ARG_type = 2`) {
}
}
######## trig ########
######## trig ########
if
(
`SELECT $CRC_ARG_type = 3`
)
{
if
(
$CRC_ARG_type
==
3
)
{
# It will be unsafe to invoke this trigger.
# It will be unsafe to invoke this trigger.
--
let
$CRC_name
=
trig_
$CRC_ARG_level
--
let
$CRC_name
=
trig_
$CRC_ARG_level
--
let
$CRC_create
=
CREATE
TRIGGER
$CRC_name
BEFORE
INSERT
ON
trigger_table_
$CRC_ARG_level
FOR
EACH
ROW
BEGIN
INSERT
INTO
ta
$CRC_ARG_level
VALUES
(
47
);
$CRC_ARG_stmt_sidef
;
END
--
let
$CRC_create
=
CREATE
TRIGGER
$CRC_name
BEFORE
INSERT
ON
trigger_table_
$CRC_ARG_level
FOR
EACH
ROW
BEGIN
INSERT
INTO
ta
$CRC_ARG_level
VALUES
(
47
);
$CRC_ARG_stmt_sidef
;
END
...
@@ -225,7 +228,8 @@ if (`SELECT $CRC_ARG_type = 3`) {
...
@@ -225,7 +228,8 @@ if (`SELECT $CRC_ARG_type = 3`) {
}
}
######## view_retval ########
######## view_retval ########
if
(
`SELECT $CRC_ARG_type = 4 AND '$CRC_ARG_sel_retval' != ''`
)
{
if
(
$CRC_ARG_type
==
4
)
{
if
(
$CRC_ARG_sel_retval
)
{
# It will be safe to select from this view if you discard the result
# It will be safe to select from this view if you discard the result
# set, but unsafe to use result set (e.g., in INSERT..SELECT).
# set, but unsafe to use result set (e.g., in INSERT..SELECT).
--
let
$CRC_name
=
view_retval_
$CRC_ARG_level
--
let
$CRC_name
=
view_retval_
$CRC_ARG_level
...
@@ -237,10 +241,12 @@ if (`SELECT $CRC_ARG_type = 4 AND '$CRC_ARG_sel_retval' != ''`) {
...
@@ -237,10 +241,12 @@ if (`SELECT $CRC_ARG_type = 4 AND '$CRC_ARG_sel_retval' != ''`) {
--
let
$CRC_RET_drop
=
DROP
VIEW
$CRC_name
--
let
$CRC_RET_drop
=
DROP
VIEW
$CRC_name
--
let
$CRC_RET_is_toplevel
=
0
--
let
$CRC_RET_is_toplevel
=
0
--
let
$CRC_RET_desc
=
view
$CRC_name
returning
value
from
$CRC_ARG_desc
--
let
$CRC_RET_desc
=
view
$CRC_name
returning
value
from
$CRC_ARG_desc
}
}
}
######## view_sidef ########
######## view_sidef ########
if
(
`SELECT $CRC_ARG_type = 5 AND '$CRC_ARG_sel_sidef' != ''`
)
{
if
(
$CRC_ARG_type
==
5
)
{
if
(
$CRC_ARG_sel_sidef
)
{
# It will be unsafe to select from this view, even if you discard
# It will be unsafe to select from this view, even if you discard
# the return value.
# the return value.
--
let
$CRC_name
=
view_sidef_
$CRC_ARG_level
--
let
$CRC_name
=
view_sidef_
$CRC_ARG_level
...
@@ -252,10 +258,11 @@ if (`SELECT $CRC_ARG_type = 5 AND '$CRC_ARG_sel_sidef' != ''`) {
...
@@ -252,10 +258,11 @@ if (`SELECT $CRC_ARG_type = 5 AND '$CRC_ARG_sel_sidef' != ''`) {
--
let
$CRC_RET_drop
=
DROP
VIEW
$CRC_name
--
let
$CRC_RET_drop
=
DROP
VIEW
$CRC_name
--
let
$CRC_RET_is_toplevel
=
0
--
let
$CRC_RET_is_toplevel
=
0
--
let
$CRC_RET_desc
=
view
$CRC_name
invoking
$CRC_ARG_desc
--
let
$CRC_RET_desc
=
view
$CRC_name
invoking
$CRC_ARG_desc
}
}
}
######## prep ########
######## prep ########
if
(
`SELECT $CRC_ARG_type = 6`
)
{
if
(
$CRC_ARG_type
==
6
)
{
# It will be unsafe to execute this prepared statement
# It will be unsafe to execute this prepared statement
--
let
$CRC_name
=
prep_
$CRC_ARG_level
--
let
$CRC_name
=
prep_
$CRC_ARG_level
--
let
$CRC_create
=
PREPARE
$CRC_name
FROM
"
$CRC_ARG_stmt_sidef
"
--
let
$CRC_create
=
PREPARE
$CRC_name
FROM
"
$CRC_ARG_stmt_sidef
"
...
@@ -269,7 +276,7 @@ if (`SELECT $CRC_ARG_type = 6`) {
...
@@ -269,7 +276,7 @@ if (`SELECT $CRC_ARG_type = 6`) {
}
}
######## no recursive construct: just return the given statement ########
######## no recursive construct: just return the given statement ########
if
(
`SELECT $CRC_ARG_type = 7`
)
{
if
(
$CRC_ARG_type
==
7
)
{
# CRC_ARG_type=7 is a special case. We just set $CRC_RET_x =
# CRC_ARG_type=7 is a special case. We just set $CRC_RET_x =
# $CRC_ARG_x. This way, the $CRC_ARG_stmt gets executed directly
# $CRC_ARG_x. This way, the $CRC_ARG_stmt gets executed directly
# (below). In binlog_unsafe.test, it is used to invoke the unsafe
# (below). In binlog_unsafe.test, it is used to invoke the unsafe
...
@@ -295,7 +302,7 @@ if ($CRC_RET_stmt_sidef) {
...
@@ -295,7 +302,7 @@ if ($CRC_RET_stmt_sidef) {
--
echo
*
binlog_format
=
STATEMENT
:
expect
$CRC_ARG_expected_number_of_warnings
warnings
.
--
echo
*
binlog_format
=
STATEMENT
:
expect
$CRC_ARG_expected_number_of_warnings
warnings
.
--
eval
$CRC_RET_stmt_sidef
--
eval
$CRC_RET_stmt_sidef
--
let
$n_warnings
=
`SHOW COUNT(*) WARNINGS`
--
let
$n_warnings
=
`SHOW COUNT(*) WARNINGS`
if
(
`SELECT '$n_warnings' != '$CRC_ARG_expected_number_of_warnings'`
)
{
if
(
$n_warnings
!=
$CRC_ARG_expected_number_of_warnings
)
{
--
echo
********
Failure
!
Expected
$CRC_ARG_expected_number_of_warnings
warnings
,
got
$n_warnings
warnings
.
********
--
echo
********
Failure
!
Expected
$CRC_ARG_expected_number_of_warnings
warnings
,
got
$n_warnings
warnings
.
********
SHOW
WARNINGS
;
SHOW
WARNINGS
;
SHOW
BINLOG
EVENTS
;
SHOW
BINLOG
EVENTS
;
...
@@ -312,14 +319,14 @@ if ($CRC_RET_stmt_sidef) {
...
@@ -312,14 +319,14 @@ if ($CRC_RET_stmt_sidef) {
RESET
MASTER
;
RESET
MASTER
;
--
eval
$CRC_RET_stmt_sidef
--
eval
$CRC_RET_stmt_sidef
--
let
$n_warnings
=
`SHOW COUNT(*) WARNINGS`
--
let
$n_warnings
=
`SHOW COUNT(*) WARNINGS`
if
(
`SELECT '$n_warnings' != '0'`
)
{
if
(
$n_warnings
)
{
--
echo
********
Failure
!
Expected
0
warnings
,
got
$n_warnings
warnings
.
********
--
echo
********
Failure
!
Expected
0
warnings
,
got
$n_warnings
warnings
.
********
SHOW
WARNINGS
;
SHOW
WARNINGS
;
SHOW
BINLOG
EVENTS
;
SHOW
BINLOG
EVENTS
;
--
die
Wrong
number
of
warnings
.
--
die
Wrong
number
of
warnings
.
}
}
--
let
$binlog_event
=
query_get_value
(
SHOW
BINLOG
EVENTS
,
Event_type
,
2
)
--
let
$binlog_event
=
query_get_value
(
SHOW
BINLOG
EVENTS
,
Event_type
,
2
)
if
(
`SELECT '$binlog_event' != 'No such row'`
)
{
if
(
$binlog_event
!=
No
such
row
)
{
--
enable_query_log
--
enable_query_log
--
echo
********
Failure
!
Something
was
written
to
the
binlog
despite
SQL_LOG_BIN
=
0
********
--
echo
********
Failure
!
Something
was
written
to
the
binlog
despite
SQL_LOG_BIN
=
0
********
SHOW
BINLOG
EVENTS
;
SHOW
BINLOG
EVENTS
;
...
@@ -332,7 +339,7 @@ if ($CRC_RET_stmt_sidef) {
...
@@ -332,7 +339,7 @@ if ($CRC_RET_stmt_sidef) {
RESET
MASTER
;
RESET
MASTER
;
--
eval
$CRC_RET_stmt_sidef
--
eval
$CRC_RET_stmt_sidef
--
let
$n_warnings
=
`SHOW COUNT(*) WARNINGS`
--
let
$n_warnings
=
`SHOW COUNT(*) WARNINGS`
if
(
`SELECT '$n_warnings' != '0'`
)
{
if
(
$n_warnings
)
{
--
echo
********
Failure
!
Expected
0
warnings
,
got
$n_warnings
warnings
.
********
--
echo
********
Failure
!
Expected
0
warnings
,
got
$n_warnings
warnings
.
********
SHOW
WARNINGS
;
SHOW
WARNINGS
;
SHOW
BINLOG
EVENTS
;
SHOW
BINLOG
EVENTS
;
...
@@ -375,7 +382,7 @@ if ($CRC_RET_sel_retval) {
...
@@ -375,7 +382,7 @@ if ($CRC_RET_sel_retval) {
# fail. When the bug is fixed, we should execute the following.
# fail. When the bug is fixed, we should execute the following.
#--let $n_warnings= `SHOW COUNT(*) WARNINGS`
#--let $n_warnings= `SHOW COUNT(*) WARNINGS`
#if (
`SELECT '$n_warnings' != '0'`
) {
#if (
$n_warnings
) {
# --enable_query_log
# --enable_query_log
# --echo Failure! Expected 0 warnings, got $n_warnings warnings.
# --echo Failure! Expected 0 warnings, got $n_warnings warnings.
# SHOW WARNINGS;
# SHOW WARNINGS;
...
...
mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
View file @
ef4458af
...
@@ -35,7 +35,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
...
@@ -35,7 +35,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
# when a command ends.
# when a command ends.
#
#
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
nt_tmp_
$n
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
nt_tmp_
$n
--
eval
CREATE
TEMPORARY
TABLE
nt_tmp_
$n
(
id
INT
)
ENGINE
=
MyIsam
--
eval
CREATE
TEMPORARY
TABLE
nt_tmp_
$n
(
id
INT
)
ENGINE
=
MyIsam
...
@@ -62,7 +62,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
...
@@ -62,7 +62,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
# when a command ends.
# when a command ends.
#
#
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
tt_tmp_
$n
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
tt_tmp_
$n
--
eval
CREATE
TEMPORARY
TABLE
tt_tmp_
$n
(
id
INT
)
ENGINE
=
Innodb
--
eval
CREATE
TEMPORARY
TABLE
tt_tmp_
$n
(
id
INT
)
ENGINE
=
Innodb
...
@@ -89,7 +89,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
...
@@ -89,7 +89,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
# when a command ends.
# when a command ends.
#
#
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TABLE
IF
EXISTS
nt_
$n
--
eval
DROP
TABLE
IF
EXISTS
nt_
$n
--
eval
CREATE
TABLE
nt_
$n
(
id
INT
)
ENGINE
=
MyIsam
--
eval
CREATE
TABLE
nt_
$n
(
id
INT
)
ENGINE
=
MyIsam
...
@@ -116,7 +116,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
...
@@ -116,7 +116,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
# when a command ends.
# when a command ends.
#
#
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TABLE
IF
EXISTS
tt_
$n
--
eval
DROP
TABLE
IF
EXISTS
tt_
$n
--
eval
CREATE
TABLE
tt_
$n
(
id
INT
)
ENGINE
=
Innodb
--
eval
CREATE
TABLE
tt_
$n
(
id
INT
)
ENGINE
=
Innodb
...
@@ -163,14 +163,14 @@ if (`SELECT HEX(@commands) = HEX('clean')`)
...
@@ -163,14 +163,14 @@ if (`SELECT HEX(@commands) = HEX('clean')`)
DROP
TABLE
IF
EXISTS
nt_xx_1
;
DROP
TABLE
IF
EXISTS
nt_xx_1
;
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TABLE
IF
EXISTS
nt_
$n
--
eval
DROP
TABLE
IF
EXISTS
nt_
$n
--
dec
$n
--
dec
$n
}
}
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TABLE
IF
EXISTS
tt_
$n
--
eval
DROP
TABLE
IF
EXISTS
tt_
$n
--
dec
$n
--
dec
$n
...
@@ -634,11 +634,11 @@ while (`SELECT HEX(@commands) != HEX('')`)
...
@@ -634,11 +634,11 @@ while (`SELECT HEX(@commands) != HEX('')`)
{
{
--
let
$dropped_temp
=
$table
--
let
$dropped_temp
=
$table
}
}
if
(
`SELECT $n = 1`
)
if
(
$n
==
1
)
{
{
--
let
$table_1
=
$table
--
let
$table_1
=
$table
}
}
if
(
`SELECT $n = 2`
)
if
(
$n
==
2
)
{
{
--
let
$table_2
=
$table
--
let
$table_2
=
$table
}
}
...
@@ -886,7 +886,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
...
@@ -886,7 +886,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
--
let
$available_n_temp
=
--
let
$available_n_temp
=
--
let
$dropped_n_temp
=
--
let
$dropped_n_temp
=
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
nt_tmp_
$n
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
nt_tmp_
$n
--
eval
CREATE
TEMPORARY
TABLE
nt_tmp_
$n
(
id
INT
)
ENGINE
=
MyIsam
--
eval
CREATE
TEMPORARY
TABLE
nt_tmp_
$n
(
id
INT
)
ENGINE
=
MyIsam
...
@@ -905,7 +905,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
...
@@ -905,7 +905,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
--
let
$available_t_temp
=
--
let
$available_t_temp
=
--
let
$dropped_t_temp
=
--
let
$dropped_t_temp
=
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
tt_tmp_
$n
--
eval
DROP
TEMPORARY
TABLE
IF
EXISTS
tt_tmp_
$n
--
eval
CREATE
TEMPORARY
TABLE
tt_tmp_
$n
(
id
INT
)
ENGINE
=
Innodb
--
eval
CREATE
TEMPORARY
TABLE
tt_tmp_
$n
(
id
INT
)
ENGINE
=
Innodb
...
@@ -924,7 +924,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
...
@@ -924,7 +924,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
--
let
$available_t
=
--
let
$available_t
=
--
let
$dropped_t
=
--
let
$dropped_t
=
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TABLE
IF
EXISTS
tt_
$n
--
eval
DROP
TABLE
IF
EXISTS
tt_
$n
--
eval
CREATE
TABLE
tt_
$n
(
id
INT
)
ENGINE
=
Innodb
--
eval
CREATE
TABLE
tt_
$n
(
id
INT
)
ENGINE
=
Innodb
...
@@ -943,7 +943,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
...
@@ -943,7 +943,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
--
let
$available_n
=
--
let
$available_n
=
--
let
$dropped_n
=
--
let
$dropped_n
=
--
let
$n
=
$tot_table
--
let
$n
=
$tot_table
while
(
`SELECT $n != 0`
)
while
(
$n
)
{
{
--
eval
DROP
TABLE
IF
EXISTS
nt_
$n
--
eval
DROP
TABLE
IF
EXISTS
nt_
$n
--
eval
CREATE
TABLE
nt_
$n
(
id
INT
)
ENGINE
=
MyIsam
--
eval
CREATE
TABLE
nt_
$n
(
id
INT
)
ENGINE
=
MyIsam
...
...
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
View file @
ef4458af
...
@@ -406,7 +406,7 @@ sync_slave_with_master;
...
@@ -406,7 +406,7 @@ sync_slave_with_master;
# Error reaction is up to sql_mode of the slave sql (bug#38173)
# Error reaction is up to sql_mode of the slave sql (bug#38173)
#--echo *** Create t9 on slave ***
#--echo *** Create t9 on slave ***
# Please, check BUG#47741 to see why you are not testing NDB.
# Please, check BUG#47741 to see why you are not testing NDB.
if
(
`SELECT $engine_type != 'NDB'`
)
if
(
$engine_type
!=
NDB
)
{
{
STOP
SLAVE
;
STOP
SLAVE
;
RESET
SLAVE
;
RESET
SLAVE
;
...
...
mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
View file @
ef4458af
...
@@ -33,7 +33,7 @@ INSERT INTO tt_2(ddl_case) VALUES(0);
...
@@ -33,7 +33,7 @@ INSERT INTO tt_2(ddl_case) VALUES(0);
--
echo
#########################################################################
--
echo
#########################################################################
SET
AUTOCOMMIT
=
0
;
SET
AUTOCOMMIT
=
0
;
let
$ddl_cases
=
41
;
let
$ddl_cases
=
41
;
while
(
`SELECT $ddl_cases >= 1`
)
while
(
$ddl_cases
>=
1
)
{
{
--
echo
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
>>
<<
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
--
echo
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
>>
<<
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
b
-
let
$in_temporary
=
"no"
;
let
$in_temporary
=
"no"
;
...
@@ -76,7 +76,7 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -76,7 +76,7 @@ while (`SELECT $ddl_cases >= 1`)
# 6: ROW EVENT
# 6: ROW EVENT
# 7: COMMIT
# 7: COMMIT
#
#
if
(
`select '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
7
;
let
$commit_event_row_number
=
7
;
}
}
...
@@ -84,10 +84,10 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -84,10 +84,10 @@ while (`SELECT $ddl_cases >= 1`)
let
$first_binlog_position
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
let
$first_binlog_position
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
--
enable_query_log
--
enable_query_log
eval
INSERT
INTO
tt_1
(
ddl_case
)
VALUES
(
$ddl_cases
);
eval
INSERT
INTO
tt_1
(
ddl_case
)
VALUES
(
$ddl_cases
);
if
(
`SELECT $ddl_cases = 41`
)
if
(
$ddl_cases
==
41
)
{
{
let
$cmd
=
LOAD
INDEX
INTO
CACHE
nt_1
IGNORE
LEAVES
;
let
$cmd
=
LOAD
INDEX
INTO
CACHE
nt_1
IGNORE
LEAVES
;
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
# This seems to be related to epochs.
# This seems to be related to epochs.
# We need to check this against an updated version or avoid it.
# We need to check this against an updated version or avoid it.
...
@@ -95,7 +95,7 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -95,7 +95,7 @@ while (`SELECT $ddl_cases >= 1`)
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 40`
)
if
(
$ddl_cases
==
40
)
{
{
let
$cmd
=
LOAD
INDEX
INTO
CACHE
tt_1
,
tt_2
IGNORE
LEAVES
;
let
$cmd
=
LOAD
INDEX
INTO
CACHE
tt_1
,
tt_2
IGNORE
LEAVES
;
#
#
...
@@ -109,16 +109,16 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -109,16 +109,16 @@ while (`SELECT $ddl_cases >= 1`)
# 5: ROW EVENT
# 5: ROW EVENT
# 6: COMMIT
# 6: COMMIT
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 39`
)
if
(
$ddl_cases
==
39
)
{
{
let
$cmd
=
ANALYZE
TABLE
nt_1
;
let
$cmd
=
ANALYZE
TABLE
nt_1
;
}
}
if
(
`SELECT $ddl_cases = 38`
)
if
(
$ddl_cases
==
38
)
{
{
let
$cmd
=
CHECK
TABLE
nt_1
;
let
$cmd
=
CHECK
TABLE
nt_1
;
#
#
...
@@ -132,20 +132,20 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -132,20 +132,20 @@ while (`SELECT $ddl_cases >= 1`)
# 5: ROW EVENT
# 5: ROW EVENT
# 6: COMMIT
# 6: COMMIT
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 37`
)
if
(
$ddl_cases
==
37
)
{
{
let
$cmd
=
OPTIMIZE
TABLE
nt_1
;
let
$cmd
=
OPTIMIZE
TABLE
nt_1
;
}
}
if
(
`SELECT $ddl_cases = 36`
)
if
(
$ddl_cases
==
36
)
{
{
let
$cmd
=
REPAIR
TABLE
nt_1
;
let
$cmd
=
REPAIR
TABLE
nt_1
;
}
}
if
(
`SELECT $ddl_cases = 35`
)
if
(
$ddl_cases
==
35
)
{
{
let
$cmd
=
LOCK
TABLES
tt_1
WRITE
;
let
$cmd
=
LOCK
TABLES
tt_1
WRITE
;
#
#
...
@@ -159,12 +159,12 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -159,12 +159,12 @@ while (`SELECT $ddl_cases >= 1`)
# 5: ROW EVENT
# 5: ROW EVENT
# 6: COMMIT
# 6: COMMIT
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 34`
)
if
(
$ddl_cases
==
34
)
{
{
let
$cmd
=
UNLOCK
TABLES
;
let
$cmd
=
UNLOCK
TABLES
;
#
#
...
@@ -178,20 +178,20 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -178,20 +178,20 @@ while (`SELECT $ddl_cases >= 1`)
# 5: ROW EVENT
# 5: ROW EVENT
# 6: COMMIT
# 6: COMMIT
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 33`
)
if
(
$ddl_cases
==
33
)
{
{
let
$cmd
=
CREATE
USER
'user'
@
'localhost'
;
let
$cmd
=
CREATE
USER
'user'
@
'localhost'
;
}
}
if
(
`SELECT $ddl_cases = 32`
)
if
(
$ddl_cases
==
32
)
{
{
let
$cmd
=
GRANT
ALL
ON
*.*
TO
'user'
@
'localhost'
;
let
$cmd
=
GRANT
ALL
ON
*.*
TO
'user'
@
'localhost'
;
}
}
if
(
`SELECT $ddl_cases = 31`
)
if
(
$ddl_cases
==
31
)
{
{
let
$cmd
=
SET
PASSWORD
FOR
'user'
@
'localhost'
=
PASSWORD
(
'newpass'
);
let
$cmd
=
SET
PASSWORD
FOR
'user'
@
'localhost'
=
PASSWORD
(
'newpass'
);
#
#
...
@@ -231,35 +231,35 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -231,35 +231,35 @@ while (`SELECT $ddl_cases >= 1`)
let
$commit_event_row_number
=
7
;
let
$commit_event_row_number
=
7
;
}
}
}
}
if
(
`SELECT $ddl_cases = 30`
)
if
(
$ddl_cases
==
30
)
{
{
let
$cmd
=
REVOKE
ALL
PRIVILEGES
,
GRANT
OPTION
FROM
'user'
@
'localhost'
;
let
$cmd
=
REVOKE
ALL
PRIVILEGES
,
GRANT
OPTION
FROM
'user'
@
'localhost'
;
}
}
if
(
`SELECT $ddl_cases = 29`
)
if
(
$ddl_cases
==
29
)
{
{
let
$cmd
=
RENAME
USER
'user'
@
'localhost'
TO
'user_new'
@
'localhost'
;
let
$cmd
=
RENAME
USER
'user'
@
'localhost'
TO
'user_new'
@
'localhost'
;
}
}
if
(
`SELECT $ddl_cases = 28`
)
if
(
$ddl_cases
==
28
)
{
{
let
$cmd
=
DROP
USER
'user_new'
@
'localhost'
;
let
$cmd
=
DROP
USER
'user_new'
@
'localhost'
;
}
}
if
(
`SELECT $ddl_cases = 27`
)
if
(
$ddl_cases
==
27
)
{
{
let
$cmd
=
CREATE
EVENT
evt
ON
SCHEDULE
AT
CURRENT_TIMESTAMP
+
INTERVAL
1
HOUR
DO
SELECT
*
FROM
tt_1
;
let
$cmd
=
CREATE
EVENT
evt
ON
SCHEDULE
AT
CURRENT_TIMESTAMP
+
INTERVAL
1
HOUR
DO
SELECT
*
FROM
tt_1
;
}
}
if
(
`SELECT $ddl_cases = 26`
)
if
(
$ddl_cases
==
26
)
{
{
let
$cmd
=
ALTER
EVENT
evt
COMMENT
'evt'
;
let
$cmd
=
ALTER
EVENT
evt
COMMENT
'evt'
;
}
}
if
(
`SELECT $ddl_cases = 25`
)
if
(
$ddl_cases
==
25
)
{
{
let
$cmd
=
DROP
EVENT
evt
;
let
$cmd
=
DROP
EVENT
evt
;
}
}
if
(
`SELECT $ddl_cases = 24`
)
if
(
$ddl_cases
==
24
)
{
{
let
$cmd
=
CREATE
TRIGGER
tr
AFTER
INSERT
ON
tt_1
FOR
EACH
ROW
UPDATE
tt_2
SET
ddl_case
=
ddl_case
WHERE
ddl_case
=
NEW
.
ddl_case
;
let
$cmd
=
CREATE
TRIGGER
tr
AFTER
INSERT
ON
tt_1
FOR
EACH
ROW
UPDATE
tt_2
SET
ddl_case
=
ddl_case
WHERE
ddl_case
=
NEW
.
ddl_case
;
}
}
if
(
`SELECT $ddl_cases = 23`
)
if
(
$ddl_cases
==
23
)
{
{
let
$cmd
=
DROP
TRIGGER
tr
;
let
$cmd
=
DROP
TRIGGER
tr
;
#
#
...
@@ -277,43 +277,43 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -277,43 +277,43 @@ while (`SELECT $ddl_cases >= 1`)
let
$commit_event_row_number
=
5
;
let
$commit_event_row_number
=
5
;
}
}
}
}
if
(
`SELECT $ddl_cases = 22`
)
if
(
$ddl_cases
==
22
)
{
{
let
$cmd
=
CREATE
FUNCTION
fc
()
RETURNS
VARCHAR
(
64
)
RETURN
"fc"
;
let
$cmd
=
CREATE
FUNCTION
fc
()
RETURNS
VARCHAR
(
64
)
RETURN
"fc"
;
}
}
if
(
`SELECT $ddl_cases = 21`
)
if
(
$ddl_cases
==
21
)
{
{
let
$cmd
=
ALTER
FUNCTION
fc
COMMENT
'fc'
;
let
$cmd
=
ALTER
FUNCTION
fc
COMMENT
'fc'
;
}
}
if
(
`SELECT $ddl_cases = 20`
)
if
(
$ddl_cases
==
20
)
{
{
let
$cmd
=
DROP
FUNCTION
fc
;
let
$cmd
=
DROP
FUNCTION
fc
;
}
}
if
(
`SELECT $ddl_cases = 19`
)
if
(
$ddl_cases
==
19
)
{
{
let
$cmd
=
CREATE
PROCEDURE
pc
()
UPDATE
tt_2
SET
ddl_case
=
ddl_case
WHERE
ddl_case
=
NEW
.
ddl_case
;
let
$cmd
=
CREATE
PROCEDURE
pc
()
UPDATE
tt_2
SET
ddl_case
=
ddl_case
WHERE
ddl_case
=
NEW
.
ddl_case
;
}
}
if
(
`SELECT $ddl_cases = 18`
)
if
(
$ddl_cases
==
18
)
{
{
let
$cmd
=
ALTER
PROCEDURE
pc
COMMENT
'pc'
;
let
$cmd
=
ALTER
PROCEDURE
pc
COMMENT
'pc'
;
}
}
if
(
`SELECT $ddl_cases = 17`
)
if
(
$ddl_cases
==
17
)
{
{
let
$cmd
=
DROP
PROCEDURE
pc
;
let
$cmd
=
DROP
PROCEDURE
pc
;
}
}
if
(
`SELECT $ddl_cases = 16`
)
if
(
$ddl_cases
==
16
)
{
{
let
$cmd
=
CREATE
VIEW
v
AS
SELECT
*
FROM
tt_1
;
let
$cmd
=
CREATE
VIEW
v
AS
SELECT
*
FROM
tt_1
;
}
}
if
(
`SELECT $ddl_cases = 15`
)
if
(
$ddl_cases
==
15
)
{
{
let
$cmd
=
ALTER
VIEW
v
AS
SELECT
*
FROM
tt_1
;
let
$cmd
=
ALTER
VIEW
v
AS
SELECT
*
FROM
tt_1
;
}
}
if
(
`SELECT $ddl_cases = 14`
)
if
(
$ddl_cases
==
14
)
{
{
let
$cmd
=
DROP
VIEW
v
;
let
$cmd
=
DROP
VIEW
v
;
}
}
if
(
`SELECT $ddl_cases = 13`
)
if
(
$ddl_cases
==
13
)
{
{
let
$cmd
=
CREATE
INDEX
ix
ON
tt_1
(
ddl_case
);
let
$cmd
=
CREATE
INDEX
ix
ON
tt_1
(
ddl_case
);
#
#
...
@@ -328,12 +328,12 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -328,12 +328,12 @@ while (`SELECT $ddl_cases >= 1`)
# 6: COMMIT
# 6: COMMIT
# 7: DDL EVENT which triggered the previous commmit.
# 7: DDL EVENT which triggered the previous commmit.
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 12`
)
if
(
$ddl_cases
==
12
)
{
{
let
$cmd
=
DROP
INDEX
ix
ON
tt_1
;
let
$cmd
=
DROP
INDEX
ix
ON
tt_1
;
#
#
...
@@ -348,12 +348,12 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -348,12 +348,12 @@ while (`SELECT $ddl_cases >= 1`)
# 6: COMMIT
# 6: COMMIT
# 7: DDL EVENT which triggered the previous commmit.
# 7: DDL EVENT which triggered the previous commmit.
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 11`
)
if
(
$ddl_cases
==
11
)
{
{
let
$cmd
=
CREATE
TEMPORARY
TABLE
tt_xx
(
a
int
);
let
$cmd
=
CREATE
TEMPORARY
TABLE
tt_xx
(
a
int
);
let
$in_temporary
=
"yes"
;
let
$in_temporary
=
"yes"
;
...
@@ -411,7 +411,7 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -411,7 +411,7 @@ while (`SELECT $ddl_cases >= 1`)
let
$commit_event_row_number
=
9
;
let
$commit_event_row_number
=
9
;
}
}
}
}
if
(
`SELECT $ddl_cases = 10`
)
if
(
$ddl_cases
==
10
)
{
{
let
$cmd
=
ALTER
TABLE
tt_xx
ADD
COLUMN
(
b
int
);
let
$cmd
=
ALTER
TABLE
tt_xx
ADD
COLUMN
(
b
int
);
#
#
...
@@ -438,12 +438,12 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -438,12 +438,12 @@ while (`SELECT $ddl_cases >= 1`)
# 5: ROW EVENT
# 5: ROW EVENT
# 6: COMMIT
# 6: COMMIT
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 9`
)
if
(
$ddl_cases
==
9
)
{
{
let
$cmd
=
ALTER
TABLE
tt_xx
RENAME
new_tt_xx
;
let
$cmd
=
ALTER
TABLE
tt_xx
RENAME
new_tt_xx
;
#
#
...
@@ -470,12 +470,12 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -470,12 +470,12 @@ while (`SELECT $ddl_cases >= 1`)
# 5: ROW EVENT
# 5: ROW EVENT
# 6: COMMIT
# 6: COMMIT
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 8`
)
if
(
$ddl_cases
==
8
)
{
{
let
$cmd
=
DROP
TEMPORARY
TABLE
IF
EXISTS
new_tt_xx
;
let
$cmd
=
DROP
TEMPORARY
TABLE
IF
EXISTS
new_tt_xx
;
let
$in_temporary
=
"yes"
;
let
$in_temporary
=
"yes"
;
...
@@ -528,7 +528,7 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -528,7 +528,7 @@ while (`SELECT $ddl_cases >= 1`)
# 8: ROW EVENT
# 8: ROW EVENT
# 9: COMMIT
# 9: COMMIT
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
9
;
let
$commit_event_row_number
=
9
;
}
}
...
@@ -551,27 +551,27 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -551,27 +551,27 @@ while (`SELECT $ddl_cases >= 1`)
let
$commit_event_row_number
=
9
;
let
$commit_event_row_number
=
9
;
}
}
}
}
if
(
`SELECT $ddl_cases = 7`
)
if
(
$ddl_cases
==
7
)
{
{
let
$cmd
=
CREATE
TABLE
tt_xx
(
a
int
);
let
$cmd
=
CREATE
TABLE
tt_xx
(
a
int
);
}
}
if
(
`SELECT $ddl_cases = 6`
)
if
(
$ddl_cases
==
6
)
{
{
let
$cmd
=
ALTER
TABLE
tt_xx
ADD
COLUMN
(
b
int
);
let
$cmd
=
ALTER
TABLE
tt_xx
ADD
COLUMN
(
b
int
);
}
}
if
(
`SELECT $ddl_cases = 5`
)
if
(
$ddl_cases
==
5
)
{
{
let
$cmd
=
RENAME
TABLE
tt_xx
TO
new_tt_xx
;
let
$cmd
=
RENAME
TABLE
tt_xx
TO
new_tt_xx
;
}
}
if
(
`SELECT $ddl_cases = 4`
)
if
(
$ddl_cases
==
4
)
{
{
let
$cmd
=
TRUNCATE
TABLE
new_tt_xx
;
let
$cmd
=
TRUNCATE
TABLE
new_tt_xx
;
}
}
if
(
`SELECT $ddl_cases = 3`
)
if
(
$ddl_cases
==
3
)
{
{
let
$cmd
=
DROP
TABLE
IF
EXISTS
tt_xx
,
new_tt_xx
;
let
$cmd
=
DROP
TABLE
IF
EXISTS
tt_xx
,
new_tt_xx
;
}
}
if
(
`SELECT $ddl_cases = 2`
)
if
(
$ddl_cases
==
2
)
{
{
let
$cmd
=
CREATE
DATABASE
db
;
let
$cmd
=
CREATE
DATABASE
db
;
#
#
...
@@ -586,12 +586,12 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -586,12 +586,12 @@ while (`SELECT $ddl_cases >= 1`)
# 6: COMMIT
# 6: COMMIT
# 7: DDL EVENT which triggered the previous commmit.
# 7: DDL EVENT which triggered the previous commmit.
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
}
}
if
(
`SELECT $ddl_cases = 1`
)
if
(
$ddl_cases
==
1
)
{
{
let
$cmd
=
DROP
DATABASE
IF
EXISTS
db
;
let
$cmd
=
DROP
DATABASE
IF
EXISTS
db
;
#
#
...
@@ -606,7 +606,7 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -606,7 +606,7 @@ while (`SELECT $ddl_cases >= 1`)
# 6: COMMIT
# 6: COMMIT
# 7: DDL EVENT which triggered the previous commmit.
# 7: DDL EVENT which triggered the previous commmit.
#
#
if
(
`SELECT '$engine' = 'NDB'`
)
if
(
$engine
==
NDB
)
{
{
let
$commit_event_row_number
=
6
;
let
$commit_event_row_number
=
6
;
}
}
...
@@ -618,14 +618,14 @@ while (`SELECT $ddl_cases >= 1`)
...
@@ -618,14 +618,14 @@ while (`SELECT $ddl_cases >= 1`)
# commit. The flag in_temporary is used to avoid aborting the test in such
# commit. The flag in_temporary is used to avoid aborting the test in such
# cases. Thus we force the commit.
# cases. Thus we force the commit.
#
#
if
(
`SELECT $in_temporary = "yes"`
)
if
(
$in_temporary
==
"yes"
)
{
{
--
eval
COMMIT
--
eval
COMMIT
}
}
let
$event_commit
=
query_get_value
(
"SHOW BINLOG EVENTS FROM
$first_binlog_position
"
,
Info
,
$commit_event_row_number
);
let
$event_commit
=
query_get_value
(
"SHOW BINLOG EVENTS FROM
$first_binlog_position
"
,
Info
,
$commit_event_row_number
);
if
(
`SELECT SUBSTRING("$event_commit",1,6) != "COMMIT"`
)
if
(
`SELECT SUBSTRING("$event_commit",1,6) != "COMMIT"`
)
{
{
if
(
`SELECT $ok = "yes"`
)
if
(
$ok
==
"yes"
)
{
{
--
echo
it
*
does
not
*
commit
the
current
transaction
.
--
echo
it
*
does
not
*
commit
the
current
transaction
.
--
echo
$cmd
--
echo
$cmd
...
...
mysql-test/extra/rpl_tests/rpl_insert_delayed.test
View file @
ef4458af
...
@@ -121,7 +121,7 @@ if (`SELECT @@global.binlog_format = 'STATEMENT'`)
...
@@ -121,7 +121,7 @@ if (`SELECT @@global.binlog_format = 'STATEMENT'`)
# The second INSERT DELAYED statement is the 5 item if two INSERT DELAYED are
# The second INSERT DELAYED statement is the 5 item if two INSERT DELAYED are
# handled separately
# handled separately
if
(
`SELECT '$stmt' = 'COMMIT'`
)
if
(
$stmt
==
COMMIT
)
{
{
--
let
$stmt
=
query_get_value
(
SHOW
BINLOG
EVENTS
IN
'$binlog_file'
FROM
$_start
,
Info
,
5
)
--
let
$stmt
=
query_get_value
(
SHOW
BINLOG
EVENTS
IN
'$binlog_file'
FROM
$_start
,
Info
,
5
)
}
}
...
...
mysql-test/extra/rpl_tests/rpl_not_null.test
View file @
ef4458af
...
@@ -177,7 +177,7 @@ sync_slave_with_master;
...
@@ -177,7 +177,7 @@ sync_slave_with_master;
#--source include/wait_for_slave_to_start.inc
#--source include/wait_for_slave_to_start.inc
#
#
#let $y=0;
#let $y=0;
#while (
`select $y < 6`
)
#while (
$y < 6
)
#{
#{
# connection master;
# connection master;
#
#
...
@@ -202,21 +202,21 @@ sync_slave_with_master;
...
@@ -202,21 +202,21 @@ sync_slave_with_master;
# `c` INT DEFAULT 500,
# `c` INT DEFAULT 500,
# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1;
# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1;
#
#
# if (
`select $y=0`
)
# if (
$y==0
)
# {
# {
# --echo ************* EXECUTION WITH INSERTS *************
# --echo ************* EXECUTION WITH INSERTS *************
# connection master;
# connection master;
# INSERT INTO t1(a) VALUES (1);
# INSERT INTO t1(a) VALUES (1);
# }
# }
#
#
# if (
`select $y=1`
)
# if (
$y==1
)
# {
# {
# --echo ************* EXECUTION WITH INSERTS *************
# --echo ************* EXECUTION WITH INSERTS *************
# connection master;
# connection master;
# INSERT INTO t1(a, b) VALUES (1, NULL);
# INSERT INTO t1(a, b) VALUES (1, NULL);
# }
# }
#
#
# if (
`select $y=2`
)
# if (
$y==2
)
# {
# {
# --echo ************* EXECUTION WITH UPDATES *************
# --echo ************* EXECUTION WITH UPDATES *************
# connection master;
# connection master;
...
@@ -225,14 +225,14 @@ sync_slave_with_master;
...
@@ -225,14 +225,14 @@ sync_slave_with_master;
# UPDATE t3 SET b = NULL where a= 1;
# UPDATE t3 SET b = NULL where a= 1;
# }
# }
#
#
# if (
`select $y=3`
)
# if (
$y==3
)
# {
# {
# --echo ************* EXECUTION WITH INSERTS/REPLACES *************
# --echo ************* EXECUTION WITH INSERTS/REPLACES *************
# connection master;
# connection master;
# REPLACE INTO t3(a, b) VALUES (1, null);
# REPLACE INTO t3(a, b) VALUES (1, null);
# }
# }
#
#
# if (
`select $y=4`
)
# if (
$y==4
)
# {
# {
# --echo ************* EXECUTION WITH UPDATES/REPLACES *************
# --echo ************* EXECUTION WITH UPDATES/REPLACES *************
# connection master;
# connection master;
...
@@ -240,7 +240,7 @@ sync_slave_with_master;
...
@@ -240,7 +240,7 @@ sync_slave_with_master;
# REPLACE INTO t3(a, b) VALUES (1, null);
# REPLACE INTO t3(a, b) VALUES (1, null);
# }
# }
#
#
# if (
`select $y=5`
)
# if (
$y==5
)
# {
# {
# --echo ************* EXECUTION WITH MULTI-ROW INSERTS *************
# --echo ************* EXECUTION WITH MULTI-ROW INSERTS *************
# connection master;
# connection master;
...
...
mysql-test/include/check_slave_is_running.inc
View file @
ef4458af
...
@@ -8,10 +8,18 @@
...
@@ -8,10 +8,18 @@
--
echo
Checking
that
both
slave
threads
are
running
.
--
echo
Checking
that
both
slave
threads
are
running
.
--
let
$running
=
1
--
let
$slave_sql_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_SQL_Running
,
1
)
--
let
$slave_sql_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_SQL_Running
,
1
)
--
let
$slave_io_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_IO_Running
,
1
)
--
let
$slave_io_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_IO_Running
,
1
)
if
(
`SELECT '$slave_sql_running' != 'Yes' OR '$slave_io_running' != 'Yes'`
)
{
if
(
$slave_sql_running
!=
Yes
)
{
--
let
$running
=
0
}
if
(
$slave_io_running
!=
Yes
)
{
--
let
$running
=
0
}
if
(
!
$running
)
{
--
echo
Slave
not
running
:
Slave_SQL_Running
=
$slave_sql_running
Slave_IO_Running
=
$slave_io_running
--
echo
Slave
not
running
:
Slave_SQL_Running
=
$slave_sql_running
Slave_IO_Running
=
$slave_io_running
--
source
include
/
show_rpl_debug_info
.
inc
--
source
include
/
show_rpl_debug_info
.
inc
--
die
Expected
slave
to
be
running
,
but
it
was
not
running
.
--
die
Expected
slave
to
be
running
,
but
it
was
not
running
.
...
...
mysql-test/include/check_slave_param.inc
View file @
ef4458af
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# --source include/check_slave_param.inc
# --source include/check_slave_param.inc
--
let
$_param_value
=
query_get_value
(
SHOW
SLAVE
STATUS
,
$slave_param
,
1
)
--
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
)
{
--
echo
Wrong
value
for
$slave_param
.
Expected
'$slave_param_value'
,
got
'$_param_value'
--
echo
Wrong
value
for
$slave_param
.
Expected
'$slave_param_value'
,
got
'$_param_value'
--
source
include
/
show_rpl_debug_info
.
inc
--
source
include
/
show_rpl_debug_info
.
inc
--
die
Wrong
value
for
slave
parameter
--
die
Wrong
value
for
slave
parameter
...
...
mysql-test/include/diff_tables.inc
View file @
ef4458af
...
@@ -69,7 +69,7 @@ while ($_diff_i) {
...
@@ -69,7 +69,7 @@ while ($_diff_i) {
# and connect the appropriate server.
# and connect the appropriate server.
let
$_pos
=
`SELECT LOCATE(':', '$_diff_table')`
;
let
$_pos
=
`SELECT LOCATE(':', '$_diff_table')`
;
let
$_diff_conn
=
`SELECT SUBSTR('$_diff_table', 1, $_pos-1)`
;
let
$_diff_conn
=
`SELECT SUBSTR('$_diff_table', 1, $_pos-1)`
;
if
(
`SELECT 'XX$_diff_conn' <> 'XX'`
)
{
if
(
$_diff_conn
)
{
let
$_diff_table
=
`SELECT SUBSTR('$_diff_table', $_pos+1)`
;
let
$_diff_table
=
`SELECT SUBSTR('$_diff_table', $_pos+1)`
;
connection
$_diff_conn
;
connection
$_diff_conn
;
}
}
...
...
mysql-test/include/have_example_plugin.inc
View file @
ef4458af
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
#
# Check if the variable EXAMPLE_PLUGIN is set
# Check if the variable EXAMPLE_PLUGIN is set
#
#
if
(
`SELECT LENGTH('$EXAMPLE_PLUGIN') = 0`
)
{
if
(
!
$EXAMPLE_PLUGIN
)
{
--
skip
Example
plugin
requires
the
environment
variable
\
$EXAMPLE_PLUGIN
to
be
set
(
normally
done
by
mtr
)
--
skip
Example
plugin
requires
the
environment
variable
\
$EXAMPLE_PLUGIN
to
be
set
(
normally
done
by
mtr
)
}
}
...
...
mysql-test/include/have_semisync_plugin.inc
View file @
ef4458af
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
#
# Check if the variable SEMISYNC_MASTER_PLUGIN is set
# Check if the variable SEMISYNC_MASTER_PLUGIN is set
#
#
if
(
`select LENGTH('$SEMISYNC_MASTER_PLUGIN') = 0`
)
if
(
!
$SEMISYNC_MASTER_PLUGIN
)
{
{
skip
Need
semisync
plugins
;
skip
Need
semisync
plugins
;
}
}
...
...
mysql-test/include/have_simple_parser.inc
View file @
ef4458af
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
#
# Check if the variable SIMPLE_PARSER is set
# Check if the variable SIMPLE_PARSER is set
#
#
if
(
`SELECT LENGTH('$SIMPLE_PARSER') = 0`
)
{
if
(
!
$SIMPLE_PARSER
)
{
--
skip
simple
parser
requires
the
environment
variable
\
$SIMPLE_PARSER
to
be
set
(
normally
done
by
mtr
)
--
skip
simple
parser
requires
the
environment
variable
\
$SIMPLE_PARSER
to
be
set
(
normally
done
by
mtr
)
}
}
...
...
mysql-test/include/have_udf.inc
View file @
ef4458af
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
...
@@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
#
# Check if the variable UDF_EXAMPLE_LIB is set
# Check if the variable UDF_EXAMPLE_LIB is set
#
#
if
(
`SELECT LENGTH('$UDF_EXAMPLE_LIB') = 0`
)
{
if
(
!
$UDF_EXAMPLE_LIB
)
{
--
skip
UDF
requires
the
environment
variable
\
$UDF_EXAMPLE_LIB
to
be
set
(
normally
done
by
mtr
)
--
skip
UDF
requires
the
environment
variable
\
$UDF_EXAMPLE_LIB
to
be
set
(
normally
done
by
mtr
)
}
}
...
...
mysql-test/include/mysql_upgrade_preparation.inc
View file @
ef4458af
...
@@ -17,7 +17,7 @@ select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
...
@@ -17,7 +17,7 @@ select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
# Therefore, truncate the log table in advance and issue a statement
# Therefore, truncate the log table in advance and issue a statement
# that should be logged.
# that should be logged.
#
#
if
(
`SELECT $VALGRIND_TEST`
)
if
(
$VALGRIND_TEST
)
{
{
--
disable_query_log
--
disable_query_log
--
disable_result_log
--
disable_result_log
...
...
mysql-test/include/no_valgrind_without_big.inc
View file @
ef4458af
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
# Therefore we require that the option "--big-test" is also set.
# Therefore we require that the option "--big-test" is also set.
#
#
if
(
`SELECT $VALGRIND_TEST <> 0 AND '$BIG_TEST' = ''`
)
if
(
$VALGRIND_TEST
)
{
{
if
(
!
$BIG_TEST
)
--
skip
Need
"--big-test"
when
running
with
Valgrind
{
--
skip
Need
"--big-test"
when
running
with
Valgrind
}
}
}
mysql-test/include/not_parallel.inc
View file @
ef4458af
if
(
`SELECT '$MTR_PARALLEL' > 1`
)
{
if
(
$MTR_PARALLEL
>
1
)
{
--
skip
test
requires
--
parallel
=
1
--
skip
test
requires
--
parallel
=
1
}
}
mysql-test/include/rpl_diff_tables.inc
View file @
ef4458af
...
@@ -8,13 +8,13 @@
...
@@ -8,13 +8,13 @@
# --source include/rpl_diff_tables.inc
# --source include/rpl_diff_tables.inc
# #############################################################################
# #############################################################################
if
(
`SELECT "XX$diff_table" = "XX"`
)
if
(
!
$diff_table
)
{
{
--
die
diff_table
is
null
.
--
die
diff_table
is
null
.
}
}
--
let
$_servers
=
master
,
slave
--
let
$_servers
=
master
,
slave
if
(
`SELECT "XX$diff_server_list" <> "XX"`
)
if
(
$diff_server_list
)
{
{
--
let
$_servers
=
$diff_server_list
--
let
$_servers
=
$diff_server_list
}
}
...
@@ -22,7 +22,7 @@ if (`SELECT "XX$diff_server_list" <> "XX"`)
...
@@ -22,7 +22,7 @@ if (`SELECT "XX$diff_server_list" <> "XX"`)
--
let
$_master
=
`SELECT SUBSTRING_INDEX('$_servers', ',', 1)`
--
let
$_master
=
`SELECT SUBSTRING_INDEX('$_servers', ',', 1)`
--
let
$_servers
=
`SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_master') + 2))`
--
let
$_servers
=
`SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_master') + 2))`
connection
$_master
;
connection
$_master
;
while
(
`SELECT "XX$_servers" <> "XX"`
)
while
(
$_servers
)
{
{
--
let
$_slave
=
`SELECT SUBSTRING_INDEX('$_servers', ',', 1)`
--
let
$_slave
=
`SELECT SUBSTRING_INDEX('$_servers', ',', 1)`
--
let
$_servers
=
`SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_slave') + 2))`
--
let
$_servers
=
`SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_slave') + 2))`
...
...
mysql-test/include/setup_fake_relay_log.inc
View file @
ef4458af
...
@@ -40,9 +40,16 @@ let $_fake_relay_log_printable= `SELECT REPLACE('$fake_relay_log', '$MYSQL_TEST_
...
@@ -40,9 +40,16 @@ let $_fake_relay_log_printable= `SELECT REPLACE('$fake_relay_log', '$MYSQL_TEST_
--
echo
Setting
up
fake
replication
from
$_fake_relay_log_printable
--
echo
Setting
up
fake
replication
from
$_fake_relay_log_printable
# Sanity check.
# Sanity check.
let
$running
=
0
;
let
$_sql_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_SQL_Running
,
1
);
let
$_sql_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_SQL_Running
,
1
);
let
$_io_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_IO_Running
,
1
);
let
$_io_running
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Slave_IO_Running
,
1
);
if
(
`SELECT "$_sql_running" = "Yes" OR "$_io_running" = "Yes"`
)
{
if
(
$_sql_running
==
Yes
)
{
let
$running
=
1
;
}
if
(
$_io_running
==
Yes
)
{
let
$running
=
1
;
}
if
(
$running
)
{
--
echo
Error
:
Slave
was
running
when
test
case
sourced
--
echo
Error
:
Slave
was
running
when
test
case
sourced
--
echo
include
/
setup_fake_replication
.
inc
--
echo
include
/
setup_fake_replication
.
inc
--
echo
Slave_IO_Running
=
$_io_running
;
Slave_SQL_Running
=
$_sql_running
--
echo
Slave_IO_Running
=
$_io_running
;
Slave_SQL_Running
=
$_sql_running
...
...
mysql-test/include/show_rpl_debug_info.inc
View file @
ef4458af
...
@@ -50,7 +50,7 @@ eval SHOW BINLOG EVENTS IN '$binlog_name';
...
@@ -50,7 +50,7 @@ eval SHOW BINLOG EVENTS IN '$binlog_name';
let
$_master_con
=
$master_connection
;
let
$_master_con
=
$master_connection
;
if
(
!
$_master_con
)
if
(
!
$_master_con
)
{
{
if
(
`SELECT '$_con' = 'slave'`
)
if
(
$_con
==
slave
)
{
{
let
$_master_con
=
master
;
let
$_master_con
=
master
;
}
}
...
@@ -80,7 +80,7 @@ if ($_master_con)
...
@@ -80,7 +80,7 @@ if ($_master_con)
--
echo
--
echo
--
echo
****
SHOW
BINLOG
EVENTS
on
$_master_con
****
--
echo
****
SHOW
BINLOG
EVENTS
on
$_master_con
****
eval
SHOW
BINLOG
EVENTS
IN
'$master_binlog_name_sql'
;
eval
SHOW
BINLOG
EVENTS
IN
'$master_binlog_name_sql'
;
if
(
`SELECT '$master_binlog_name_io' != '$master_binlog_name_sql'`
)
if
(
$master_binlog_name_io
!=
$master_binlog_name_sql
)
{
{
eval
SHOW
BINLOG
EVENTS
IN
'$master_binlog_name_io'
;
eval
SHOW
BINLOG
EVENTS
IN
'$master_binlog_name_io'
;
}
}
...
...
mysql-test/include/truncate_file.inc
View file @
ef4458af
# truncate a giving file, all contents of the file are be cleared
# truncate a giving file, all contents of the file are be cleared
if
(
`SELECT 'x$file' = 'x'`
)
if
(
!
$file
)
{
{
--
echo
Please
assign
a
file
name
to
$file
!!
--
echo
Please
assign
a
file
name
to
$file
!!
exit
;
exit
;
...
...
mysql-test/include/wait_for_slave_io_to_stop.inc
View file @
ef4458af
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
# STATUS will return an empty set.
# STATUS will return an empty set.
let
$_slave_io_running
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
1
);
let
$_slave_io_running
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
1
);
if
(
`SELECT '$_slave_io_running' != 'No such row'`
)
if
(
$_slave_io_running
!=
No
such
row
)
{
{
let
$slave_param
=
Slave_IO_Running
;
let
$slave_param
=
Slave_IO_Running
;
let
$slave_param_value
=
No
;
let
$slave_param_value
=
No
;
...
...
mysql-test/include/wait_for_slave_sql_error.inc
View file @
ef4458af
...
@@ -34,7 +34,7 @@ let $slave_error_message= Failed while waiting for slave to stop the SQL thread
...
@@ -34,7 +34,7 @@ let $slave_error_message= Failed while waiting for slave to stop the SQL thread
source
include
/
wait_for_slave_param
.
inc
;
source
include
/
wait_for_slave_param
.
inc
;
let
$_error
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_SQL_Errno
,
1
);
let
$_error
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_SQL_Errno
,
1
);
if
(
`SELECT '$_error' != '$slave_sql_errno'`
)
{
if
(
$_error
!=
$slave_sql_errno
)
{
--
echo
****
Slave
stopped
with
wrong
error
code
:
$_error
(
expected
$slave_sql_errno
)
****
--
echo
****
Slave
stopped
with
wrong
error
code
:
$_error
(
expected
$slave_sql_errno
)
****
source
include
/
show_rpl_debug_info
.
inc
;
source
include
/
show_rpl_debug_info
.
inc
;
--
echo
****
Slave
stopped
with
wrong
error
code
:
$_error
(
expected
$slave_sql_errno
)
****
--
echo
****
Slave
stopped
with
wrong
error
code
:
$_error
(
expected
$slave_sql_errno
)
****
...
...
mysql-test/include/wait_for_slave_sql_to_stop.inc
View file @
ef4458af
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
# STATUS will return an empty set.
# STATUS will return an empty set.
let
$_slave_io_running
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
1
);
let
$_slave_io_running
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
1
);
if
(
`SELECT '$_slave_io_running' != 'No such row'`
)
if
(
$_slave_io_running
!=
No
such
row
)
{
{
let
$slave_param
=
Slave_SQL_Running
;
let
$slave_param
=
Slave_SQL_Running
;
let
$slave_param_value
=
No
;
let
$slave_param_value
=
No
;
...
...
mysql-test/include/wait_for_slave_to_stop.inc
View file @
ef4458af
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
# STATUS will return an empty set.
# STATUS will return an empty set.
let
$_slave_io_running
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
1
);
let
$_slave_io_running
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
1
);
if
(
`SELECT '$_slave_io_running' != 'No such row'`
)
if
(
$_slave_io_running
!=
No
such
row
)
{
{
let
$slave_error_message
=
Failed
while
waiting
for
slave
to
stop
;
let
$slave_error_message
=
Failed
while
waiting
for
slave
to
stop
;
...
...
mysql-test/include/wait_show_condition.inc
View file @
ef4458af
...
@@ -50,7 +50,7 @@ inc $max_run_time;
...
@@ -50,7 +50,7 @@ inc $max_run_time;
let
$found
=
0
;
let
$found
=
0
;
let
$max_end_time
=
`SELECT UNIX_TIMESTAMP() + $max_run_time`
;
let
$max_end_time
=
`SELECT UNIX_TIMESTAMP() + $max_run_time`
;
if
(
`SELECT '$wait_for_all' != '1'`
)
if
(
$wait_for_all
!=
1
)
{
{
while
(
`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`
)
while
(
`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`
)
{
{
...
@@ -58,24 +58,27 @@ if (`SELECT '$wait_for_all' != '1'`)
...
@@ -58,24 +58,27 @@ if (`SELECT '$wait_for_all' != '1'`)
real_sleep
0.2
;
real_sleep
0.2
;
let
$rowno
=
1
;
let
$rowno
=
1
;
let
$process_result
=
1
;
let
$process_result
=
1
;
while
(
`SELECT $process_result = 1 AND $found = 0`
)
let
$do_loop
=
1
;
while
(
$do_loop
)
{
{
let
$field_value
=
query_get_value
(
$show_statement
,
$field
,
$rowno
);
let
$field_value
=
query_get_value
(
$show_statement
,
$field
,
$rowno
);
if
(
`SELECT '$field_value' $condition`
)
if
(
`SELECT '$field_value' $condition`
)
{
{
let
$found
=
1
;
let
$found
=
1
;
let
$do_loop
=
0
;
}
}
if
(
`SELECT '$field_value' = 'No such row'`
)
if
(
$field_value
==
No
such
row
)
{
{
# We are behind the last row of the result set.
# We are behind the last row of the result set.
let
$process_result
=
0
;
let
$process_result
=
0
;
let
$do_loop
=
0
;
}
}
inc
$rowno
;
inc
$rowno
;
}
}
}
}
}
}
if
(
`SELECT '$wait_for_all' = '1'`
)
if
(
$wait_for_all
==
1
)
{
{
while
(
`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`
)
while
(
`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`
)
{
{
...
@@ -83,16 +86,19 @@ if (`SELECT '$wait_for_all' = '1'`)
...
@@ -83,16 +86,19 @@ if (`SELECT '$wait_for_all' = '1'`)
real_sleep
0.2
;
real_sleep
0.2
;
let
$rowno
=
1
;
let
$rowno
=
1
;
let
$process_result
=
1
;
let
$process_result
=
1
;
while
(
`SELECT $process_result = 1 AND $found = 0`
)
let
$do_loop
=
1
;
while
(
$do_loop
)
{
{
let
$field_value
=
query_get_value
(
$show_statement
,
$field
,
$rowno
);
let
$field_value
=
query_get_value
(
$show_statement
,
$field
,
$rowno
);
if
(
`SELECT '$field_value' = 'No such row'`
)
if
(
$field_value
==
No
such
row
)
{
{
let
$found
=
1
;
let
$found
=
1
;
let
$do_loop
=
0
;
}
}
if
(
`SELECT $found = 0 AND NOT '$field_value' $condition`
)
if
(
`SELECT $found = 0 AND NOT '$field_value' $condition`
)
{
{
let
process_result
=
0
;
let
process_result
=
0
;
let
$do_loop
=
0
;
}
}
inc
$rowno
;
inc
$rowno
;
}
}
...
...
mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test
View file @
ef4458af
...
@@ -83,17 +83,17 @@ while($i)
...
@@ -83,17 +83,17 @@ while($i)
--
let
$flags
=--
database
=
b42941
--
let
$flags
=--
database
=
b42941
# construct CLI for mysqlbinlog
# construct CLI for mysqlbinlog
if
(
`SELECT $i=3`
)
if
(
$i
==
3
)
{
{
--
let
$flags
=
$flags
--
verbose
--
hexdump
--
let
$flags
=
$flags
--
verbose
--
hexdump
}
}
if
(
`SELECT $i=2`
)
if
(
$i
==
2
)
{
{
--
let
$flags
=
$flags
--
verbose
--
let
$flags
=
$flags
--
verbose
}
}
# if(
`SELECT $i=1`
)
# if(
$i==1
)
# {
# {
# do nothing $flags is already set as it should be
# do nothing $flags is already set as it should be
# }
# }
...
...
mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
View file @
ef4458af
...
@@ -116,7 +116,7 @@ DROP TABLE t1;
...
@@ -116,7 +116,7 @@ DROP TABLE t1;
SET
GLOBAL
log_warnings
=
@
old_log_warnings
;
SET
GLOBAL
log_warnings
=
@
old_log_warnings
;
let
$log_error_
=
`SELECT @@GLOBAL.log_error`
;
let
$log_error_
=
`SELECT @@GLOBAL.log_error`
;
if
(
!
`select LENGTH('$log_error_')`
)
if
(
!
$log_error_
)
{
{
# MySQL Server on windows is started with --console and thus
# MySQL Server on windows is started with --console and thus
# does not know the location of its .err log, use default location
# does not know the location of its .err log, use default location
...
...
mysql-test/suite/binlog/t/binlog_unsafe.test
View file @
ef4458af
...
@@ -141,11 +141,11 @@ END|
...
@@ -141,11 +141,11 @@ END|
# In each iteration of this loop, we select one method to make the
# In each iteration of this loop, we select one method to make the
# statement unsafe.
# statement unsafe.
--
let
$unsafe_type
=
0
--
let
$unsafe_type
=
0
while
(
`SELECT $unsafe_type < 9`
)
{
while
(
$unsafe_type
<
9
)
{
--
echo
--
echo
if
(
`SELECT $unsafe_type = 0`
)
{
if
(
$unsafe_type
==
0
)
{
--
echo
====
Testing
UUID
()
unsafeness
====
--
echo
====
Testing
UUID
()
unsafeness
====
--
let
$desc_0
=
unsafe
UUID
()
function
--
let
$desc_0
=
unsafe
UUID
()
function
--
let
$stmt_sidef_0
=
INSERT
INTO
t0
VALUES
(
UUID
())
--
let
$stmt_sidef_0
=
INSERT
INTO
t0
VALUES
(
UUID
())
...
@@ -155,7 +155,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -155,7 +155,7 @@ while (`SELECT $unsafe_type < 9`) {
--
let
$CRC_ARG_expected_number_of_warnings
=
1
--
let
$CRC_ARG_expected_number_of_warnings
=
1
}
}
if
(
`SELECT $unsafe_type = 1`
)
{
if
(
$unsafe_type
==
1
)
{
--
echo
====
Testing
@@
hostname
unsafeness
====
--
echo
====
Testing
@@
hostname
unsafeness
====
--
let
$desc_0
=
unsafe
@@
hostname
variable
--
let
$desc_0
=
unsafe
@@
hostname
variable
--
let
$stmt_sidef_0
=
INSERT
INTO
t0
VALUES
(
@@
hostname
)
--
let
$stmt_sidef_0
=
INSERT
INTO
t0
VALUES
(
@@
hostname
)
...
@@ -168,7 +168,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -168,7 +168,7 @@ while (`SELECT $unsafe_type < 9`) {
--
let
$CRC_ARG_expected_number_of_warnings
=
1
--
let
$CRC_ARG_expected_number_of_warnings
=
1
}
}
if
(
`SELECT $unsafe_type = 2`
)
{
if
(
$unsafe_type
==
2
)
{
--
echo
====
Testing
SELECT
...
LIMIT
unsafeness
====
--
echo
====
Testing
SELECT
...
LIMIT
unsafeness
====
--
let
$desc_0
=
unsafe
SELECT
...
LIMIT
statement
--
let
$desc_0
=
unsafe
SELECT
...
LIMIT
statement
--
let
$stmt_sidef_0
=
INSERT
INTO
t0
SELECT
*
FROM
data_table
LIMIT
1
--
let
$stmt_sidef_0
=
INSERT
INTO
t0
SELECT
*
FROM
data_table
LIMIT
1
...
@@ -178,7 +178,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -178,7 +178,7 @@ while (`SELECT $unsafe_type < 9`) {
--
let
$CRC_ARG_expected_number_of_warnings
=
1
--
let
$CRC_ARG_expected_number_of_warnings
=
1
}
}
if
(
`SELECT $unsafe_type = 3`
)
{
if
(
$unsafe_type
==
3
)
{
--
echo
====
Testing
INSERT
DELAYED
safeness
after
BUG
#54579 is fixed ====
--
echo
====
Testing
INSERT
DELAYED
safeness
after
BUG
#54579 is fixed ====
--
let
$desc_0
=
unsafe
INSERT
DELAYED
statement
--
let
$desc_0
=
unsafe
INSERT
DELAYED
statement
--
let
$stmt_sidef_0
=
INSERT
DELAYED
INTO
t0
VALUES
(
1
),
(
2
)
--
let
$stmt_sidef_0
=
INSERT
DELAYED
INTO
t0
VALUES
(
1
),
(
2
)
...
@@ -188,7 +188,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -188,7 +188,7 @@ while (`SELECT $unsafe_type < 9`) {
--
let
$CRC_ARG_expected_number_of_warnings
=
0
--
let
$CRC_ARG_expected_number_of_warnings
=
0
}
}
if
(
`SELECT $unsafe_type = 4`
)
{
if
(
$unsafe_type
==
4
)
{
--
echo
====
Testing
unsafeness
of
insert
of
two
autoinc
values
====
--
echo
====
Testing
unsafeness
of
insert
of
two
autoinc
values
====
--
let
$desc_0
=
unsafe
update
of
two
autoinc
columns
--
let
$desc_0
=
unsafe
update
of
two
autoinc
columns
--
let
$stmt_sidef_0
=
INSERT
INTO
double_autoinc_table
VALUES
(
NULL
)
--
let
$stmt_sidef_0
=
INSERT
INTO
double_autoinc_table
VALUES
(
NULL
)
...
@@ -198,7 +198,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -198,7 +198,7 @@ while (`SELECT $unsafe_type < 9`) {
--
let
$CRC_ARG_expected_number_of_warnings
=
1
--
let
$CRC_ARG_expected_number_of_warnings
=
1
}
}
if
(
`SELECT $unsafe_type = 5`
)
{
if
(
$unsafe_type
==
5
)
{
--
echo
====
Testing
unsafeness
of
UDF
's ====
--
echo
====
Testing
unsafeness
of
UDF
's ====
--let $desc_0= unsafe UDF
--let $desc_0= unsafe UDF
--let $stmt_sidef_0= INSERT INTO t0 VALUES (myfunc_int(10))
--let $stmt_sidef_0= INSERT INTO t0 VALUES (myfunc_int(10))
...
@@ -208,7 +208,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -208,7 +208,7 @@ while (`SELECT $unsafe_type < 9`) {
--let $CRC_ARG_expected_number_of_warnings= 1
--let $CRC_ARG_expected_number_of_warnings= 1
}
}
if (
`SELECT $unsafe_type = 6`
) {
if (
$unsafe_type == 6
) {
--echo ==== Testing unsafeness of access to mysql.general_log ====
--echo ==== Testing unsafeness of access to mysql.general_log ====
--let $desc_0= unsafe use of mysql.general_log
--let $desc_0= unsafe use of mysql.general_log
--let $stmt_sidef_0= INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log
--let $stmt_sidef_0= INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log
...
@@ -218,7 +218,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -218,7 +218,7 @@ while (`SELECT $unsafe_type < 9`) {
--let $CRC_ARG_expected_number_of_warnings= 1
--let $CRC_ARG_expected_number_of_warnings= 1
}
}
if (
`SELECT $unsafe_type = 7`
) {
if (
$unsafe_type == 7
) {
--echo ==== Testing a statement that is unsafe in many ways ====
--echo ==== Testing a statement that is unsafe in many ways ====
--let $desc_0= statement that is unsafe in many ways
--let $desc_0= statement that is unsafe in many ways
# Concatenate three unsafe values, and then concatenate NULL to
# Concatenate three unsafe values, and then concatenate NULL to
...
@@ -230,7 +230,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -230,7 +230,7 @@ while (`SELECT $unsafe_type < 9`) {
--let $CRC_ARG_expected_number_of_warnings= 6
--let $CRC_ARG_expected_number_of_warnings= 6
}
}
if (
`SELECT $unsafe_type = 8`
) {
if (
$unsafe_type == 8
) {
--echo ==== Testing a statement that is unsafe several times ====
--echo ==== Testing a statement that is unsafe several times ====
--let $desc_0= statement that is unsafe several times
--let $desc_0= statement that is unsafe several times
--let $stmt_sidef_0= INSERT INTO ta0 VALUES (multi_unsafe_func())
--let $stmt_sidef_0= INSERT INTO ta0 VALUES (multi_unsafe_func())
...
@@ -249,7 +249,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -249,7 +249,7 @@ while (`SELECT $unsafe_type < 9`) {
# construct. Instead, we just invoke the unsafe statement directly.
# construct. Instead, we just invoke the unsafe statement directly.
--
let
$call_type_1
=
0
--
let
$call_type_1
=
0
while
(
`SELECT $call_type_1 < 8`
)
{
while
(
$call_type_1
<
8
)
{
#--echo debug: level 1, types $call_type_1 -> $unsafe_type
#--echo debug: level 1, types $call_type_1 -> $unsafe_type
--
let
$CRC_ARG_level
=
1
--
let
$CRC_ARG_level
=
1
--
let
$CRC_ARG_type
=
$call_type_1
--
let
$CRC_ARG_type
=
$call_type_1
...
@@ -280,7 +280,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -280,7 +280,7 @@ while (`SELECT $unsafe_type < 9`) {
# construct.
# construct.
--
let
$call_type_2
=
0
--
let
$call_type_2
=
0
while
(
`SELECT $call_type_2 < 7`
)
{
while
(
$call_type_2
<
7
)
{
#--echo debug: level 2, types $call_type_2 -> $call_type_1 -> $unsafe_type
#--echo debug: level 2, types $call_type_2 -> $call_type_1 -> $unsafe_type
--
let
$CRC_ARG_level
=
2
--
let
$CRC_ARG_level
=
2
--
let
$CRC_ARG_type
=
$call_type_2
--
let
$CRC_ARG_type
=
$call_type_2
...
@@ -309,7 +309,7 @@ while (`SELECT $unsafe_type < 9`) {
...
@@ -309,7 +309,7 @@ while (`SELECT $unsafe_type < 9`) {
# construct.
# construct.
--
let
$call_type_3
=
0
--
let
$call_type_3
=
0
while
(
`SELECT $call_type_3 < 7`
)
{
while
(
$call_type_3
<
7
)
{
#--echo debug: level 3, types $call_type_2 -> $call_type_2 -> $call_type_1 -> $unsafe_type
#--echo debug: level 3, types $call_type_2 -> $call_type_2 -> $call_type_1 -> $unsafe_type
--
let
$CRC_ARG_level
=
3
--
let
$CRC_ARG_level
=
3
--
let
$CRC_ARG_type
=
$call_type_3
--
let
$CRC_ARG_type
=
$call_type_3
...
...
mysql-test/suite/federated/federated_bug_25714.test
View file @
ef4458af
# Check that path to the specific test program has been setup
# Check that path to the specific test program has been setup
if
(
`select LENGTH("$MYSQL_BUG25714") = 0`
)
if
(
!
$MYSQL_BUG25714
)
{
{
skip
Need
bug25714
test
program
;
skip
Need
bug25714
test
program
;
}
}
...
...
mysql-test/suite/perfschema_stress/t/modify.test
View file @
ef4458af
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
let
$have_table
=
`SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
let
$have_table
=
`SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`
;
WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`
;
if
(
`SELECT ($have_table = 0)`
)
{
if
(
!
$have_table
)
{
--
source
suite
/
perfschema_stress
/
t
/
setup
.
test
--
source
suite
/
perfschema_stress
/
t
/
setup
.
test
}
}
...
...
mysql-test/suite/perfschema_stress/t/setup.test
View file @
ef4458af
...
@@ -23,10 +23,10 @@ if (`SELECT VERSION() LIKE '%embedded%'`)
...
@@ -23,10 +23,10 @@ if (`SELECT VERSION() LIKE '%embedded%'`)
--
disable_query_log
--
disable_query_log
--
disable_result_log
--
disable_result_log
if
(
`SELECT LENGTH('$engine_type') = 0`
)
{
if
(
!
$engine_type
)
{
let
$engine_type
=
$default_engine_type
;
let
$engine_type
=
$default_engine_type
;
}
}
if
(
`SELECT '$engine_type' = 'Falcon'`
)
{
if
(
$engine_type
==
Falcon
)
{
--
source
include
/
have_falcon
.
inc
--
source
include
/
have_falcon
.
inc
}
}
...
...
mysql-test/suite/perfschema_stress/t/work.test
View file @
ef4458af
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
let
$have_table
=
`SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
let
$have_table
=
`SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`
;
WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`
;
if
(
`SELECT ($have_table = 0)`
)
{
if
(
!
$have_table
)
{
--
source
suite
/
perfschema_stress
/
t
/
setup
.
test
--
source
suite
/
perfschema_stress
/
t
/
setup
.
test
}
}
...
...
mysql-test/suite/rpl/t/rpl_change_master.test
View file @
ef4458af
...
@@ -23,7 +23,7 @@ source include/stop_slave.inc;
...
@@ -23,7 +23,7 @@ source include/stop_slave.inc;
let
$read_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Read_Master_Log_Pos
,
1
);
let
$read_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Read_Master_Log_Pos
,
1
);
let
$exec_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Exec_Master_Log_Pos
,
1
);
let
$exec_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Exec_Master_Log_Pos
,
1
);
if
(
`SELECT $read_pos = $exec_pos`
)
if
(
$read_pos
==
$exec_pos
)
{
{
source
include
/
show_rpl_debug_info
.
inc
;
source
include
/
show_rpl_debug_info
.
inc
;
echo
'Read_Master_Log_Pos: $read_pos'
==
'Exec_Master_Log_Pos: $exec_pos'
;
echo
'Read_Master_Log_Pos: $read_pos'
==
'Exec_Master_Log_Pos: $exec_pos'
;
...
@@ -32,7 +32,7 @@ if (`SELECT $read_pos = $exec_pos`)
...
@@ -32,7 +32,7 @@ if (`SELECT $read_pos = $exec_pos`)
change
master
to
master_user
=
'root'
;
change
master
to
master_user
=
'root'
;
let
$read_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Read_Master_Log_Pos
,
1
);
let
$read_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Read_Master_Log_Pos
,
1
);
let
$exec_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Exec_Master_Log_Pos
,
1
);
let
$exec_pos
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Exec_Master_Log_Pos
,
1
);
if
(
`SELECT $read_pos <> $exec_pos`
)
if
(
$read_pos
!=
$exec_pos
)
{
{
source
include
/
show_rpl_debug_info
.
inc
;
source
include
/
show_rpl_debug_info
.
inc
;
echo
'Read_Master_Log_Pos: $read_pos'
<>
'Exec_Master_Log_Pos: $exec_pos'
;
echo
'Read_Master_Log_Pos: $read_pos'
<>
'Exec_Master_Log_Pos: $exec_pos'
;
...
...
mysql-test/suite/rpl/t/rpl_concurrency_error.test
View file @
ef4458af
...
@@ -53,24 +53,24 @@ while ($type)
...
@@ -53,24 +53,24 @@ while ($type)
{
{
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
connection
conn1
;
connection
conn1
;
if
(
`select $type = 2`
)
if
(
$type
==
2
)
{
{
SET
AUTOCOMMIT
=
1
;
SET
AUTOCOMMIT
=
1
;
BEGIN
;
BEGIN
;
}
}
if
(
`select $type = 1`
)
if
(
$type
==
1
)
{
{
SET
AUTOCOMMIT
=
0
;
SET
AUTOCOMMIT
=
0
;
}
}
eval
UPDATE
t
SET
f
=
'yellow $type'
WHERE
i
=
3
;
eval
UPDATE
t
SET
f
=
'yellow $type'
WHERE
i
=
3
;
connection
conn2
;
connection
conn2
;
if
(
`select $type = 2`
)
if
(
$type
==
2
)
{
{
SET
AUTOCOMMIT
=
1
;
SET
AUTOCOMMIT
=
1
;
BEGIN
;
BEGIN
;
}
}
if
(
`select $type = 1`
)
if
(
$type
==
1
)
{
{
SET
AUTOCOMMIT
=
0
;
SET
AUTOCOMMIT
=
0
;
}
}
...
@@ -88,24 +88,24 @@ while ($type)
...
@@ -88,24 +88,24 @@ while ($type)
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
let
$binlog_start
=
query_get_value
(
"SHOW MASTER STATUS"
,
Position
,
1
);
connection
conn1
;
connection
conn1
;
if
(
`select $type = 2`
)
if
(
$type
==
2
)
{
{
SET
AUTOCOMMIT
=
1
;
SET
AUTOCOMMIT
=
1
;
BEGIN
;
BEGIN
;
}
}
if
(
`select $type = 1`
)
if
(
$type
==
1
)
{
{
SET
AUTOCOMMIT
=
0
;
SET
AUTOCOMMIT
=
0
;
}
}
eval
UPDATE
t
SET
f
=
'gray $type'
WHERE
i
=
3
;
eval
UPDATE
t
SET
f
=
'gray $type'
WHERE
i
=
3
;
connection
conn2
;
connection
conn2
;
if
(
`select $type = 2`
)
if
(
$type
==
2
)
{
{
SET
AUTOCOMMIT
=
1
;
SET
AUTOCOMMIT
=
1
;
BEGIN
;
BEGIN
;
}
}
if
(
`select $type = 1`
)
if
(
$type
==
1
)
{
{
SET
AUTOCOMMIT
=
0
;
SET
AUTOCOMMIT
=
0
;
}
}
...
...
mysql-test/suite/rpl/t/rpl_heartbeat.test
View file @
ef4458af
...
@@ -142,7 +142,7 @@ source include/check_slave_param.inc;
...
@@ -142,7 +142,7 @@ source include/check_slave_param.inc;
let
$slave_wait_param_counter
=
300
;
let
$slave_wait_param_counter
=
300
;
let
$slave_value
=
query_get_value
(
"SHOW STATUS like 'Slave_received_heartbeats'"
,
Value
,
1
);
let
$slave_value
=
query_get_value
(
"SHOW STATUS like 'Slave_received_heartbeats'"
,
Value
,
1
);
# Checking the fact that at least one heartbeat is received
# Checking the fact that at least one heartbeat is received
while
(
`select $slave_value = 0`
)
while
(
!
$slave_value
)
{
{
dec
$slave_wait_param_counter
;
dec
$slave_wait_param_counter
;
if
(
!
$slave_wait_param_counter
)
if
(
!
$slave_wait_param_counter
)
...
...
mysql-test/suite/rpl/t/rpl_mysql_upgrade.test
View file @
ef4458af
...
@@ -30,7 +30,7 @@ sync_slave_with_master;
...
@@ -30,7 +30,7 @@ sync_slave_with_master;
connection
master
;
connection
master
;
let
$after_position
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
);
let
$after_position
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
);
if
(
`SELECT '$before_position'='$after_position'`
)
if
(
$before_position
==
$after_position
)
{
{
echo
Master
position
is
not
changed
;
echo
Master
position
is
not
changed
;
}
}
...
@@ -48,7 +48,7 @@ connection master;
...
@@ -48,7 +48,7 @@ connection master;
let
$after_file
=
query_get_value
(
SHOW
MASTER
STATUS
,
File
,
1
);
let
$after_file
=
query_get_value
(
SHOW
MASTER
STATUS
,
File
,
1
);
let
$after_position
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
);
let
$after_position
=
query_get_value
(
SHOW
MASTER
STATUS
,
Position
,
1
);
if
(
!
`SELECT '$before_position'='$after_position'`
)
if
(
$before_position
!=
$after_position
)
{
{
echo
Master
position
has
been
changed
;
echo
Master
position
has
been
changed
;
}
}
...
...
mysql-test/suite/rpl/t/rpl_semi_sync.test
View file @
ef4458af
...
@@ -58,7 +58,7 @@ echo [ on master ];
...
@@ -58,7 +58,7 @@ echo [ on master ];
disable_query_log
;
disable_query_log
;
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_master_enabled'
,
Value
,
1
);
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_master_enabled'
,
Value
,
1
);
if
(
`select '$value' = 'No such row'`
)
if
(
$value
==
No
such
row
)
{
{
set
sql_log_bin
=
0
;
set
sql_log_bin
=
0
;
eval
INSTALL
PLUGIN
rpl_semi_sync_master
SONAME
'$SEMISYNC_MASTER_PLUGIN'
;
eval
INSTALL
PLUGIN
rpl_semi_sync_master
SONAME
'$SEMISYNC_MASTER_PLUGIN'
;
...
@@ -123,7 +123,7 @@ echo [ on slave ];
...
@@ -123,7 +123,7 @@ echo [ on slave ];
disable_query_log
;
disable_query_log
;
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_slave_enabled'
,
Value
,
1
);
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_slave_enabled'
,
Value
,
1
);
if
(
`select '$value' = 'No such row'`
)
if
(
$value
==
No
such
row
)
{
{
set
sql_log_bin
=
0
;
set
sql_log_bin
=
0
;
eval
INSTALL
PLUGIN
rpl_semi_sync_slave
SONAME
'$SEMISYNC_SLAVE_PLUGIN'
;
eval
INSTALL
PLUGIN
rpl_semi_sync_slave
SONAME
'$SEMISYNC_SLAVE_PLUGIN'
;
...
...
mysql-test/suite/rpl/t/rpl_semi_sync_event.test
View file @
ef4458af
...
@@ -20,7 +20,7 @@ enable_query_log;
...
@@ -20,7 +20,7 @@ enable_query_log;
connection
master
;
connection
master
;
disable_query_log
;
disable_query_log
;
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_master_enabled'
,
Value
,
1
);
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_master_enabled'
,
Value
,
1
);
if
(
`select '$value' = 'No such row'`
)
if
(
$value
==
No
such
row
)
{
{
set
sql_log_bin
=
0
;
set
sql_log_bin
=
0
;
eval
INSTALL
PLUGIN
rpl_semi_sync_master
SONAME
'$SEMISYNC_MASTER_PLUGIN'
;
eval
INSTALL
PLUGIN
rpl_semi_sync_master
SONAME
'$SEMISYNC_MASTER_PLUGIN'
;
...
@@ -34,7 +34,7 @@ source include/stop_slave.inc;
...
@@ -34,7 +34,7 @@ source include/stop_slave.inc;
disable_query_log
;
disable_query_log
;
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_slave_enabled'
,
Value
,
1
);
let
$value
=
query_get_value
(
show
variables
like
'rpl_semi_sync_slave_enabled'
,
Value
,
1
);
if
(
`select '$value' = 'No such row'`
)
if
(
$value
==
No
such
row
)
{
{
set
sql_log_bin
=
0
;
set
sql_log_bin
=
0
;
eval
INSTALL
PLUGIN
rpl_semi_sync_slave
SONAME
'$SEMISYNC_SLAVE_PLUGIN'
;
eval
INSTALL
PLUGIN
rpl_semi_sync_slave
SONAME
'$SEMISYNC_SLAVE_PLUGIN'
;
...
...
mysql-test/suite/rpl/t/rpl_slow_query_log.test
View file @
ef4458af
...
@@ -233,7 +233,7 @@ let $master_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text
...
@@ -233,7 +233,7 @@ let $master_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text
--
sync_slave_with_master
--
sync_slave_with_master
let
$slave_slow_query
=
`SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`
;
let
$slave_slow_query
=
`SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`
;
if
(
`SELECT $master_slow_query != $slave_slow_query`
)
if
(
$master_slow_query
!=
$slave_slow_query
)
{
{
--
connection
master
--
connection
master
--
echo
***********************************************
--
echo
***********************************************
...
@@ -250,7 +250,7 @@ if (`SELECT $master_slow_query != $slave_slow_query`)
...
@@ -250,7 +250,7 @@ if (`SELECT $master_slow_query != $slave_slow_query`)
--
die
"Assertion failed! Master and slave slow log contents differ. Bailing out!"
--
die
"Assertion failed! Master and slave slow log contents differ. Bailing out!"
}
}
if
(
`SELECT $master_slow_query = $slave_slow_query`
)
if
(
$master_slow_query
==
$slave_slow_query
)
{
{
--
echo
### Assertion is good. Both Master and Slave exhibit the
--
echo
### Assertion is good. Both Master and Slave exhibit the
--
echo
### same number of queries in slow log: $master_slow_query
--
echo
### same number of queries in slow log: $master_slow_query
...
@@ -276,7 +276,7 @@ let $master_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text
...
@@ -276,7 +276,7 @@ let $master_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text
--
sync_slave_with_master
--
sync_slave_with_master
let
$slave_slow_query
=
`SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`
;
let
$slave_slow_query
=
`SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`
;
if
(
`SELECT $master_slow_query != $slave_slow_query`
)
if
(
$master_slow_query
!=
$slave_slow_query
)
{
{
--
connection
master
--
connection
master
--
echo
***********************************************
--
echo
***********************************************
...
@@ -293,7 +293,7 @@ if (`SELECT $master_slow_query != $slave_slow_query`)
...
@@ -293,7 +293,7 @@ if (`SELECT $master_slow_query != $slave_slow_query`)
--
die
"Assertion failed! Master and slave slow log contents differ. Bailing out!"
--
die
"Assertion failed! Master and slave slow log contents differ. Bailing out!"
}
}
if
(
`SELECT $master_slow_query = $slave_slow_query`
)
if
(
$master_slow_query
==
$slave_slow_query
)
{
{
--
echo
### Assertion is good. Both Master and Slave exhibit the
--
echo
### Assertion is good. Both Master and Slave exhibit the
--
echo
### same number of queries in slow log: $master_slow_query
--
echo
### same number of queries in slow log: $master_slow_query
...
...
mysql-test/suite/rpl/t/rpl_ssl.test
View file @
ef4458af
...
@@ -75,7 +75,7 @@ source include/check_slave_is_running.inc;
...
@@ -75,7 +75,7 @@ source include/check_slave_is_running.inc;
let
$slave_count
=
`select count(*) from t1`
;
let
$slave_count
=
`select count(*) from t1`
;
if
(
`select $slave_count != $master_count`
)
if
(
$slave_count
!=
$master_count
)
{
{
echo
master
and
slave
differed
in
number
of
rows
;
echo
master
and
slave
differed
in
number
of
rows
;
echo
master
:
$master_count
;
echo
master
:
$master_count
;
...
...
mysql-test/suite/sys_vars/t/slow_launch_time_func.test
View file @
ef4458af
...
@@ -84,7 +84,7 @@ let $value_before=
...
@@ -84,7 +84,7 @@ let $value_before=
CONNECT
(
conn2
,
localhost
,
root
,,);
CONNECT
(
conn2
,
localhost
,
root
,,);
let
$value_after
=
let
$value_after
=
query_get_value
(
show
status
like
'slow_launch_threads'
,
Value
,
1
);
query_get_value
(
show
status
like
'slow_launch_threads'
,
Value
,
1
);
if
(
!
`SELECT $value_after = $value_before`
)
if
(
$value_after
!=
$value_before
)
{
{
--
echo
ERROR
:
Subtest
FN_DYNVARS_124_02
failed
--
echo
ERROR
:
Subtest
FN_DYNVARS_124_02
failed
--
echo
A
new
connect
must
not
be
counted
as
'slow_launch_thread'
if
--
echo
A
new
connect
must
not
be
counted
as
'slow_launch_thread'
if
...
...
mysql-test/t/change_user.test
View file @
ef4458af
...
@@ -117,7 +117,7 @@ let $before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_select',Value,1);
...
@@ -117,7 +117,7 @@ let $before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_select',Value,1);
let
$after
=
query_get_value
(
SHOW
GLOBAL
STATUS
LIKE
'com_select'
,
Value
,
1
);
let
$after
=
query_get_value
(
SHOW
GLOBAL
STATUS
LIKE
'com_select'
,
Value
,
1
);
if
(
`select $after != $before`
){
if
(
$after
!=
$before
){
SHOW
GLOBAL
STATUS
LIKE
'com_select'
;
SHOW
GLOBAL
STATUS
LIKE
'com_select'
;
die
The
value
of
com_select
changed
during
change_user
;
die
The
value
of
com_select
changed
during
change_user
;
}
}
...
...
mysql-test/t/execution_constants.test
View file @
ef4458af
...
@@ -49,7 +49,7 @@ while ($i)
...
@@ -49,7 +49,7 @@ while ($i)
let
$i
=
1
//
let
$i
=
1
//
# Check that mysql_errno is 1436
# Check that mysql_errno is 1436
if
(
`select $mysql_errno != 1436`
)
if
(
$mysql_errno
!=
1436
)
{
{
die
Wrong
error
triggered
,
expected
1436
but
got
$mysql_errno
//
die
Wrong
error
triggered
,
expected
1436
but
got
$mysql_errno
//
}
}
...
...
mysql-test/t/fix_priv_tables.test
View file @
ef4458af
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
# to the location of mysql_fix_privilege_tables.sql
if
(
`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`
)
if
(
!
$MYSQL_FIX_PRIVILEGE_TABLES
)
{
{
skip
Test
need
MYSQL_FIX_PRIVILEGE_TABLES
;
skip
Test
need
MYSQL_FIX_PRIVILEGE_TABLES
;
}
}
...
...
mysql-test/t/mysqltest.test
View file @
ef4458af
...
@@ -2612,15 +2612,15 @@ let $count= 0;
...
@@ -2612,15 +2612,15 @@ let $count= 0;
while
(
$run
)
while
(
$run
)
{
{
let
$Field
=
query_get_value
(
$show_statement
,
Field
,
$rowno
);
let
$Field
=
query_get_value
(
$show_statement
,
Field
,
$rowno
);
if
(
`SELECT '$Field' = 'No such row'`
)
if
(
$Field
==
No
such
row
)
{
{
let
$run
=
0
;
let
$run
=
0
;
}
}
if
(
`SELECT '$Field' <> 'No such row'`
)
if
(
$Field
!=
No
such
row
)
{
{
let
$Type
=
query_get_value
(
$show_statement
,
Type
,
$rowno
);
let
$Type
=
query_get_value
(
$show_statement
,
Type
,
$rowno
);
let
$Null
=
query_get_value
(
$show_statement
,
Null
,
$rowno
);
let
$Null
=
query_get_value
(
$show_statement
,
Null
,
$rowno
);
if
(
`SELECT '$Null' = 'YES'`
)
if
(
$Null
==
YES
)
{
{
inc
$count
;
inc
$count
;
}
}
...
...
mysql-test/t/named_pipe.test
View file @
ef4458af
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# Only run this test if named pipe is avaliable
# Only run this test if named pipe is avaliable
let
$nmp
=
query_get_value
(
"SHOW VARIABLES LIKE 'named_pipe'"
,
Value
,
1
);
let
$nmp
=
query_get_value
(
"SHOW VARIABLES LIKE 'named_pipe'"
,
Value
,
1
);
if
(
`SELECT '$nmp' != 'ON'`
){
if
(
$nmp
!=
ON
){
skip
No
named
pipe
support
;
skip
No
named
pipe
support
;
}
}
...
...
mysql-test/t/shm.test
View file @
ef4458af
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# Only run this test if shared memory is avaliable
# Only run this test if shared memory is avaliable
let
$shm
=
query_get_value
(
"SHOW VARIABLES LIKE 'shared_memory'"
,
Value
,
1
);
let
$shm
=
query_get_value
(
"SHOW VARIABLES LIKE 'shared_memory'"
,
Value
,
1
);
if
(
`SELECT '$shm' != 'ON'`
){
if
(
$shm
!=
ON
){
skip
No
shm
support
;
skip
No
shm
support
;
}
}
let
$shm_name
=
query_get_value
(
"SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'"
,
Value
,
1
);
let
$shm_name
=
query_get_value
(
"SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'"
,
Value
,
1
);
...
...
mysql-test/t/system_mysql_db_fix40123.test
View file @
ef4458af
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
# to the location of mysql_fix_privilege_tables.sql
if
(
`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`
)
if
(
!
$MYSQL_FIX_PRIVILEGE_TABLES
)
{
{
skip
Test
need
MYSQL_FIX_PRIVILEGE_TABLES
;
skip
Test
need
MYSQL_FIX_PRIVILEGE_TABLES
;
}
}
...
...
mysql-test/t/system_mysql_db_fix50030.test
View file @
ef4458af
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
# to the location of mysql_fix_privilege_tables.sql
if
(
`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`
)
if
(
!
$MYSQL_FIX_PRIVILEGE_TABLES
)
{
{
skip
Test
needs
MYSQL_FIX_PRIVILEGE_TABLES
;
skip
Test
needs
MYSQL_FIX_PRIVILEGE_TABLES
;
}
}
...
...
mysql-test/t/system_mysql_db_fix50117.test
View file @
ef4458af
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
# to the location of mysql_fix_privilege_tables.sql
# to the location of mysql_fix_privilege_tables.sql
if
(
`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`
)
if
(
!
$MYSQL_FIX_PRIVILEGE_TABLES
)
{
{
skip
Test
needs
MYSQL_FIX_PRIVILEGE_TABLES
;
skip
Test
needs
MYSQL_FIX_PRIVILEGE_TABLES
;
}
}
...
...
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