summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqltest.test
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2010-01-06 09:47:25 +0100
committerBjorn Munch <Bjorn.Munch@sun.com>2010-01-06 09:47:25 +0100
commit04a5dcb136c17e471cbb647c2f45d23682adfea2 (patch)
treed0c96697011f0461b1bcaf7c46d59b39d150005c /mysql-test/t/mysqltest.test
parent08c8863ec41b1168d69f4d78db9bc0606e36f2ad (diff)
downloadmariadb-git-04a5dcb136c17e471cbb647c2f45d23682adfea2.tar.gz
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
Diffstat (limited to 'mysql-test/t/mysqltest.test')
-rw-r--r--mysql-test/t/mysqltest.test51
1 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index ce9b31eb30f..45fc0715312 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1606,6 +1606,57 @@ select * from 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
# ----------------------------------------------------------------------------