mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #49761 mysqltest.test does not have any tests for send/reap
Added them NB the 6th case is adapted to Bug no. 49269, gives wrong output without it
This commit is contained in:
@ -523,6 +523,26 @@ a D
|
|||||||
1 1
|
1 1
|
||||||
1 4
|
1 4
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1 ( f1 char(10));
|
||||||
|
insert into t1 values ("Abcd");
|
||||||
|
select * from t1;
|
||||||
|
f1
|
||||||
|
Abcd
|
||||||
|
select * from t2;;
|
||||||
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||||
|
select * from t1;
|
||||||
|
f1
|
||||||
|
Abcd
|
||||||
|
select * from t1;;
|
||||||
|
Result coming up
|
||||||
|
f1
|
||||||
|
Abcd
|
||||||
|
select * from t1;;
|
||||||
|
f1
|
||||||
|
Abcd
|
||||||
|
mysqltest: At line 2: Cannot run query on connection between send and reap
|
||||||
|
select * from t1;;
|
||||||
|
drop table t1;
|
||||||
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
|
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
|
||||||
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
|
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
|
||||||
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
|
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
|
||||||
|
@ -1605,6 +1605,57 @@ insert into t1 values (2,4);
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Tests of send
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
create table t1 ( f1 char(10));
|
||||||
|
insert into t1 values ("Abcd");
|
||||||
|
|
||||||
|
# 1. Basic test
|
||||||
|
|
||||||
|
send select * from t1;
|
||||||
|
reap;
|
||||||
|
|
||||||
|
# 2. Test with error
|
||||||
|
|
||||||
|
--send select * from t2;
|
||||||
|
--error ER_NO_SUCH_TABLE
|
||||||
|
--reap
|
||||||
|
|
||||||
|
# 3. test send of next stmt
|
||||||
|
|
||||||
|
--send
|
||||||
|
select * from t1;
|
||||||
|
--reap
|
||||||
|
|
||||||
|
# 4. Non-query stmt betwen send and reap allowed
|
||||||
|
|
||||||
|
--send select * from t1;
|
||||||
|
--sleep 0.05
|
||||||
|
--echo Result coming up
|
||||||
|
--reap
|
||||||
|
|
||||||
|
# 5. Test of send_eval
|
||||||
|
|
||||||
|
--let $my_stmt= select * from t1;
|
||||||
|
--send_eval $my_stmt
|
||||||
|
--reap
|
||||||
|
|
||||||
|
# 6. Test that mysqltest does not allow query stmt between send and reap
|
||||||
|
# Untestable directly as it causes mysqltest to fail
|
||||||
|
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.in
|
||||||
|
--send select * from t1;
|
||||||
|
select 1;
|
||||||
|
--reap
|
||||||
|
EOF
|
||||||
|
--error 1
|
||||||
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# test for remove_file
|
# test for remove_file
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user