MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:msvensson Date:December 2 2005 5:29pm
Subject:bk commit into 5.0 tree (msvensson:1.2035) BUG#11731
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2035 05/12/02 18:29:15 msvensson@neptunus.(none) +2 -0
  Bug #11731 mysqltest in multi-statement queries ignores errors in non-1st queries
   - Add tests to mysqltest.test
   - Problem no longer exists 

  mysql-test/t/mysqltest.test
    1.20 05/12/02 18:29:11 msvensson@neptunus.(none) +46 -0
    Add tests for bug#11731

  mysql-test/r/mysqltest.result
    1.16 05/12/02 18:29:11 msvensson@neptunus.(none) +22 -0
    Update result file for new tests

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/bug11731/my50-bug11731

--- 1.15/mysql-test/r/mysqltest.result	2005-10-12 13:58:56 +02:00
+++ 1.16/mysql-test/r/mysqltest.result	2005-12-02 18:29:11 +01:00
@@ -391,3 +391,25 @@
 --------------------------------------------------------------------------------
 this will be executed
 this will be executed
+mysqltest: At line 2: query 'create table t1 (a int primary key);
+insert into t1 values (1);
+select 'select-me';
+insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz 'error query'' at line 1
+drop table t1;
+drop table t1;
+create table t1 (a int primary key);
+insert into t1 values (1);
+select 'select-me';
+insertz error query||||
+select-me
+select-me
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1
+drop table t1;
+create table t1 (a int primary key);
+insert into t1 values (1);
+select 'select-me';
+insertz error query||||
+select-me
+select-me
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1
+drop table t1;

--- 1.19/mysql-test/t/mysqltest.test	2005-10-12 13:58:08 +02:00
+++ 1.20/mysql-test/t/mysqltest.test	2005-12-02 18:29:11 +01:00
@@ -945,3 +945,49 @@
 --enable_parsing
 select "this will be executed";
 --enable_query_log
+
+
+#
+# Bug #11731 mysqltest in multi-statement queries ignores errors in
+#            non-1st queries
+#
+
+# Failing multi statement query
+--exec echo "delimiter ||||;"                          > var/tmp/bug11731.sql
+--exec echo "create table t1 (a int primary key);"    >> var/tmp/bug11731.sql
+--exec echo "insert into t1 values (1);"              >> var/tmp/bug11731.sql
+--exec echo "select 'select-me';"                     >> var/tmp/bug11731.sql
+--exec echo "insertz 'error query'||||"               >> var/tmp/bug11731.sql
+--exec echo "delimiter ;||||"                         >> var/tmp/bug11731.sql
+
+--error 1
+--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1
+drop table t1;
+
+--error 1
+--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
+# The .out file should be empty, cat will fail!
+--error 1
+--exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
+drop table t1;
+
+
+# Using expected error
+--exec echo "delimiter ||||;"                          > var/tmp/bug11731.sql
+--exec echo "--error 1064"                            >> var/tmp/bug11731.sql
+--exec echo "create table t1 (a int primary key);"    >> var/tmp/bug11731.sql
+--exec echo "insert into t1 values (1);"              >> var/tmp/bug11731.sql
+--exec echo "select 'select-me';"                     >> var/tmp/bug11731.sql
+--exec echo "insertz "error query"||||"               >> var/tmp/bug11731.sql
+--exec echo "delimiter ;||||"                         >> var/tmp/bug11731.sql
+
+# These two should work since the error is expected
+--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql  2>&1
+drop table t1;
+
+--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
+--exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
+drop table t1;
+
+
+
Thread
bk commit into 5.0 tree (msvensson:1.2035) BUG#11731msvensson2 Dec