MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:msvensson Date:September 1 2005 7:34am
Subject:bk commit into 4.1 tree (msvensson:1.2331) BUG#12471
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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.2331 05/09/01 09:34:40 msvensson@neptunus.(none) +3 -0
  Bug #12471  	mysqltest, --error within loop affects wrong statement
   - Move clearing of expected errors

  mysql-test/t/mysqltest.test
    1.8 05/09/01 09:34:36 msvensson@neptunus.(none) +13 -0
    Add test for bug#12471

  mysql-test/r/mysqltest.result
    1.8 05/09/01 09:34:36 msvensson@neptunus.(none) +7 -0
    Update test results

  client/mysqltest.c
    1.174 05/09/01 09:34:36 msvensson@neptunus.(none) +10 -2
    Move clear of expected errors to the query loop so that the expected error is reset even when the query is retrieved from the q_lines cache.

# 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/bug11316/my41-bug11316

--- 1.7/mysql-test/r/mysqltest.result	2005-08-31 18:10:23 +02:00
+++ 1.8/mysql-test/r/mysqltest.result	2005-09-01 09:34:36 +02:00
@@ -341,3 +341,10 @@
 mysqltest: At line 1: Invalid integer argument "10!"
 mysqltest: At line 1: End of line junk detected: "!"
 mysqltest: At line 1: Invalid integer argument "a"
+failing_statement;
+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 'failing_statement' at line 1
+failing_statement;
+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 'failing_statement' at line 1
+SELECT 1 as a;
+a
+1

--- 1.7/mysql-test/t/mysqltest.test	2005-08-31 18:10:23 +02:00
+++ 1.8/mysql-test/t/mysqltest.test	2005-09-01 09:34:36 +02:00
@@ -775,4 +775,17 @@
 # new scripts and diagnose errors
 # ----------------------------------------------------------------------------
 
+# ----------------------------------------------------------------------------
+# Test bug#12386
+# ----------------------------------------------------------------------------
+let $num= 2;
+while ($num)
+{
+   --error 1064
+   failing_statement;
+
+   dec $num;
+}
+
+SELECT 1 as a;
 

--- 1.173/client/mysqltest.c	2005-08-31 18:10:23 +02:00
+++ 1.174/client/mysqltest.c	2005-09-01 09:34:36 +02:00
@@ -2385,8 +2385,6 @@
 	 sizeof(global_expected_errno));
   q->expected_errors= global_expected_errors;
   q->abort_on_error= (global_expected_errors == 0 && abort_on_error);
-  bzero((gptr) global_expected_errno, sizeof(global_expected_errno));
-  global_expected_errors=0;
   if (p[0] == '-' && p[1] == '-')
   {
     q->type= Q_COMMENT_WITH_COMMAND;
@@ -4001,6 +3999,16 @@
     }
     else
       check_eol_junk(q->last_argument);
+
+    if (q->type != Q_ERROR)
+    {
+      /*
+        As soon as any non "error" command has been executed,
+        the array with expected errors should be cleared
+      */
+      global_expected_errors= 0;
+      bzero((gptr) global_expected_errno, sizeof(global_expected_errno));
+    }
 
     parser.current_line += current_line_inc;
   }
Thread
bk commit into 4.1 tree (msvensson:1.2331) BUG#12471msvensson1 Sep