summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-11-02 20:13:27 +0200
committerunknown <monty@mysql.com>2004-11-02 20:13:27 +0200
commit505caa28796f0fe13a0a4eb004fe70a084d64c85 (patch)
treee98dace641bd58871866d0d787418defc800bc9f /mysql-test/t
parent3200d66f8544dad77dc7ba8448550f3a15fa8eac (diff)
downloadmariadb-git-505caa28796f0fe13a0a4eb004fe70a084d64c85.tar.gz
Remove usage of !$ from mysql-tests
Added protocol::flush() for easier embedded-server code Increase block allocation variables a bit as they where a bit too small for MySQL 4.1 Added option --silent to client_test client/mysqltest.c: Removed compiler warning Fixed identation & comments from earlier push Renamed variable 'disable_abort_on_error' to 'abort_on_error' Ensure that '$mysql_errno' also with --ps-protocol include/mysql_com.h: Removed special handling of net_flush for embedded server mysql-test/r/mysqltest.result: Remove usage of !$ in tests mysql-test/t/client_test.test: Use --silent mysql-test/t/comments.test: Remove usage of !$ in tests mysql-test/t/join_outer.test: Remove usage of !$ in tests mysql-test/t/key.test: Remove usage of !$ in tests mysql-test/t/mysqltest.test: Remove usage of !$ in tests mysql-test/t/show_check.test: Remove usage of !$ in tests mysql-test/t/temp_table.test: Remove usage of !$ in tests mysql-test/t/type_ranges.test: Remove usage of !$ in tests sql/mysqld.cc: Increase block allocation variables a bit as they where a bit too small for MySQL 4.1 sql/net_serv.cc: Remove special usage of net_flush in embedded server sql/protocol.cc: Added protocol::flush() for easier embedded-server code sql/protocol.h: Added protocol::flush() for easier embedded-server code sql/sql_prepare.cc: Added protocol::flush() for easier embedded-server code Remove one extra flush() for prepared statements sql/sql_show.cc: Added protocol::flush() for easier embedded-server code tests/client_test.c: Added option --silent
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/client_test.test2
-rw-r--r--mysql-test/t/comments.test3
-rw-r--r--mysql-test/t/join_outer.test15
-rw-r--r--mysql-test/t/key.test3
-rw-r--r--mysql-test/t/mysqltest.test97
-rw-r--r--mysql-test/t/show_check.test3
-rw-r--r--mysql-test/t/temp_table.test6
-rw-r--r--mysql-test/t/type_ranges.test3
8 files changed, 67 insertions, 65 deletions
diff --git a/mysql-test/t/client_test.test b/mysql-test/t/client_test.test
index b56e8038d9b..830c5f1b8a2 100644
--- a/mysql-test/t/client_test.test
+++ b/mysql-test/t/client_test.test
@@ -1,2 +1,2 @@
--disable_result_log
---exec $TESTS_BINDIR/client_test --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT
+--exec $TESTS_BINDIR/client_test --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent
diff --git a/mysql-test/t/comments.test b/mysql-test/t/comments.test
index 2fc6237907c..087df60f3f5 100644
--- a/mysql-test/t/comments.test
+++ b/mysql-test/t/comments.test
@@ -5,7 +5,8 @@
select 1+2/*hello*/+3;
select 1 /* long
multi line comment */;
-!$1065 ;
+--error 1065
+ ;
select 1 /*!32301 +1 */;
select 1 /*!52301 +1 */;
select 1--1;
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index 0c4c9614d88..bc96318ae2e 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -34,11 +34,14 @@ explain select t1.*,t2.* from t1 left join t2 on t1.a=t2.a where isnull(t2.a)=1;
select t1.*,t2.*,t3.a from t1 left join t2 on (t1.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
# The next query should rearange the left joins to get this to work
-!$1120 explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
-!$1120 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
+--error 1120
+explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
+--error 1120
+select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
# The next query should give an error in MySQL
-!$1120 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
+--error 1120
+select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
# Test of inner join
select t1.*,t2.* from t1 inner join t2 using (a);
@@ -94,7 +97,8 @@ WHERE t1.uniq_id = 4
ORDER BY t2.c_amount;
INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
-!$1062 INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
+--error 1062
+INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
INSERT INTO t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes');
#3rd select should show that one record is returned with null entries for the
@@ -288,7 +292,8 @@ insert into t3 values (1);
insert into t4 values (1,1);
insert into t5 values (1,1);
-!$1120 explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23;
+--error 1120
+explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23;
drop table t1,t2,t3,t4,t5;
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index 4be34cac30e..5ee2f68ab83 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -146,7 +146,8 @@ create table t1
);
INSERT INTO t1 VALUES (1, 1, 1, 1, 'a');
INSERT INTO t1 VALUES (1, 1, 1, 1, 'b');
-!$1062 INSERT INTO t1 VALUES (1, 1, 1, 1, 'a');
+--error 1062
+INSERT INTO t1 VALUES (1, 1, 1, 1, 'a');
drop table t1;
#
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 ;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 681127eab5e..efbe2e9371d 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -21,7 +21,8 @@ check table t1 changed;
check table t1 medium;
check table t1 extended;
show index from t1;
-!$1062 insert into t1 values (5,5,5);
+--error 1062
+insert into t1 values (5,5,5);
optimize table t1;
optimize table t1;
drop table t1;
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index 2181d3eb74c..74276c7668c 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -20,8 +20,10 @@ create TEMPORARY TABLE t2 engine=heap select * from t1;
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=heap;
# This should give errors
-!$1050 CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
-!$1050 ALTER TABLE t1 RENAME t2;
+--error 1050
+CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
+--error 1050
+ALTER TABLE t1 RENAME t2;
select * from t2;
alter table t2 add primary key (a,b);
diff --git a/mysql-test/t/type_ranges.test b/mysql-test/t/type_ranges.test
index 09b5867e7a8..572dc0af313 100644
--- a/mysql-test/t/type_ranges.test
+++ b/mysql-test/t/type_ranges.test
@@ -135,7 +135,8 @@ drop table t1,t2;
create table t1 (c int);
insert into t1 values(1),(2);
create table t2 select * from t1;
-!$1060 create table t3 select * from t1, t2; # Should give an error
+--error 1060
+create table t3 select * from t1, t2; # Should give an error
create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
show full columns from t3;
drop table t1,t2,t3;