summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqltest.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/mysqltest.test')
-rw-r--r--mysql-test/t/mysqltest.test97
1 files changed, 44 insertions, 53 deletions
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index b7007e1a519..0802c18ed6c 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -20,12 +20,10 @@ eval select $mysql_errno as "before_use_test" ;
select otto from (select 1 as otto) as t1;
# expectation = response
-!$0 select otto from (select 1 as otto) as t1;
--error 0
select otto from (select 1 as otto) as t1;
# expectation <> response
--- // !$1054 select otto from (select 1 as otto) as t1;
-- // --error 1054
-- // select otto from (select 1 as otto) as t1;
@@ -38,12 +36,10 @@ select otto from (select 1 as otto) as t1;
# ----------------------------------------------------------------------------
# expectation <> response
-#!$0 select friedrich from (select 1 as otto) as t1;
#--error 0
#select friedrich from (select 1 as otto) as t1;
# expectation = response
-!$1054 select friedrich from (select 1 as otto) as t1;
--error 1054
select friedrich from (select 1 as otto) as t1;
@@ -94,130 +90,130 @@ select friedrich from (select 1 as otto) as t1;
#
# The following test cases often initialize $mysql_errno to 1064 by
# a command with wrong syntax.
-# Example: !$1064 To prevent the abort after the error.
+# Example: --error 1064 To prevent the abort after the error.
# garbage ;
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
-# 1. check mysql_errno = 0 after successful statement
+# check mysql_errno = 0 after successful statement
# ----------------------------------------------------------------------------
select otto from (select 1 as otto) as t1;
eval select $mysql_errno as "after_successful_stmt_errno" ;
#----------------------------------------------------------------------------
-# 2. check mysql_errno = 1064 after statement with wrong syntax
+# check mysql_errno = 1064 after statement with wrong syntax
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
eval select $mysql_errno as "after_wrong_syntax_errno" ;
# ----------------------------------------------------------------------------
-# 3. check if let $my_var= 'abc' ; affects $mysql_errno
+# check if let $my_var= 'abc' ; affects $mysql_errno
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
let $my_var= 'abc' ;
eval select $mysql_errno as "after_let_var_equal_value" ;
# ----------------------------------------------------------------------------
-# 4. check if set @my_var= 'abc' ; affects $mysql_errno
+# check if set @my_var= 'abc' ; affects $mysql_errno
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
set @my_var= 'abc' ;
eval select $mysql_errno as "after_set_var_equal_value" ;
# ----------------------------------------------------------------------------
-# 5. check if the setting of --disable-warnings itself affects $mysql_errno
-# (May be --<whatever> modifies $mysql_errno.)
+# check if the setting of --disable-warnings itself affects $mysql_errno
+# (May be --<whatever> modifies $mysql_errno.)
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
--disable_warnings
eval select $mysql_errno as "after_disable_warnings_command" ;
# ----------------------------------------------------------------------------
-# 6. check if --disable-warnings + command with warning affects the errno
-# stored within $mysql_errno
-# (May be disabled warnings affect $mysql_errno.)
+# check if --disable-warnings + command with warning affects the errno
+# stored within $mysql_errno
+# (May be disabled warnings affect $mysql_errno.)
# ----------------------------------------------------------------------------
drop table if exists t1 ;
-!$1064
+--error 1064
garbage ;
drop table if exists t1 ;
eval select $mysql_errno as "after_disable_warnings" ;
--enable_warnings
# ----------------------------------------------------------------------------
-# 7. check if masked errors affect $mysql_errno
+# check if masked errors affect $mysql_errno
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
--error 1146
select 3 from t1 ;
eval select $mysql_errno as "after_minus_masked" ;
-!$1064
+--error 1064
garbage ;
-!$1146
+--error 1146
select 3 from t1 ;
eval select $mysql_errno as "after_!_masked" ;
# ----------------------------------------------------------------------------
-# 8. Will manipulations of $mysql_errno be possible and visible ?
+# Will manipulations of $mysql_errno be possible and visible ?
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
let $mysql_errno= -1;
eval select $mysql_errno as "after_let_errno_equal_value" ;
# ----------------------------------------------------------------------------
-# 9. How affect actions on prepared statements $mysql_errno ?
+# How affect actions on prepared statements $mysql_errno ?
# ----------------------------------------------------------------------------
# failing prepare
-!$1064
+--error 1064
garbage ;
-!$1146
+--error 1146
prepare stmt from "select 3 from t1" ;
eval select $mysql_errno as "after_failing_prepare" ;
create table t1 ( f1 char(10));
# successful prepare
-!$1064
+--error 1064
garbage ;
prepare stmt from "select 3 from t1" ;
eval select $mysql_errno as "after_successful_prepare" ;
# successful execute
-!$1064
+--error 1064
garbage ;
execute stmt;
eval select $mysql_errno as "after_successful_execute" ;
# failing execute (table dropped)
drop table t1;
-!$1064
+--error 1064
garbage ;
-!$1146
+--error 1146
execute stmt;
eval select $mysql_errno as "after_failing_execute" ;
# failing execute (unknown statement)
-!$1064
+--error 1064
garbage ;
-!$1243
+--error 1243
execute __stmt_;
eval select $mysql_errno as "after_failing_execute" ;
# successful deallocate
-!$1064
+--error 1064
garbage ;
deallocate prepare stmt;
eval select $mysql_errno as "after_successful_deallocate" ;
# failing deallocate ( statement handle does not exist )
-!$1064
+--error 1064
garbage ;
-!$1243
+--error 1243
deallocate prepare __stmt_;
eval select $mysql_errno as "after_failing_deallocate" ;
@@ -231,7 +227,7 @@ eval select $mysql_errno as "after_failing_deallocate" ;
# The default is "--enable_abort_on_error".
#
# "Maskings" are
-# !$<error number> and --error <error number>
+# --error <error number> and --error <error number>
# in the line before the failing statement.
#
# There are some additional test case for $mysql_errno
@@ -240,58 +236,53 @@ eval select $mysql_errno as "after_failing_deallocate" ;
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
-# 1. Switch the abort on error off and check the effect on $mysql_errno
+# Switch the abort on error off and check the effect on $mysql_errno
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
--disable_abort_on_error
eval select $mysql_errno as "after_--disable_abort_on_error" ;
# ----------------------------------------------------------------------------
-# 2. "unmasked" failing statement should not cause an abort
+# "unmasked" failing statement should not cause an abort
# ----------------------------------------------------------------------------
select 3 from t1 ;
# ----------------------------------------------------------------------------
-# 3. masked failing statements
+# masked failing statements
# ----------------------------------------------------------------------------
# expected error = response
--error 1146
select 3 from t1 ;
-!$1146
+--error 1146
select 3 from t1 ;
eval select $mysql_errno as "after_!errno_masked_error" ;
# expected error <> response
# --error 1000
# select 3 from t1 ;
-# !$1000
+# --error 1000
# select 3 from t1 ;
# ----------------------------------------------------------------------------
-# 4. Switch the abort on error on and check the effect on $mysql_errno
+# Switch the abort on error on and check the effect on $mysql_errno
# ----------------------------------------------------------------------------
-!$1064
+--error 1064
garbage ;
--enable_abort_on_error
eval select $mysql_errno as "after_--enable_abort_on_error" ;
# ----------------------------------------------------------------------------
-# 5. masked failing statements
+# masked failing statements
# ----------------------------------------------------------------------------
# expected error = response
--error 1146
select 3 from t1 ;
-!$1146
-select 3 from t1 ;
# ----------------------------------------------------------------------------
-# 6. check that the old default behaviour is not changed
+# check that the old default behaviour is not changed
# Please remove the '#' to get the abort on error
# ----------------------------------------------------------------------------
#--error 1064
#select 3 from t1 ;
#
-#!$1064
-#select 3 from t1 ;
-#
#select 3 from t1 ;