MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:January 6 2010 8:48am
Subject:bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2872) Bug#49761
View as plain text  
#At file:///home/bm136801/my/case-51/ based on revid:bjorn.munch@stripped

 2872 Bjorn Munch	2010-01-06
      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

    modified:
      mysql-test/r/mysqltest.result
      mysql-test/t/mysqltest.test
=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2010-01-06 08:42:21 +0000
+++ b/mysql-test/r/mysqltest.result	2010-01-06 08:47:25 +0000
@@ -523,6 +523,26 @@ a	D
 1	1
 1	4
 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 'write_file'
 mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2010-01-06 08:42:21 +0000
+++ b/mysql-test/t/mysqltest.test	2010-01-06 08:47:25 +0000
@@ -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
 # ----------------------------------------------------------------------------
 


Attachment: [text/bzr-bundle] bzr/bjorn.munch@sun.com-20100106084725-i8e7rlejmytt6vfj.bundle
Thread
bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2872) Bug#49761Bjorn Munch6 Jan