MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:pem Date:April 5 2005 2:07pm
Subject:bk commit into 5.0 tree (pem:1.1873) BUG#5907
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of pem. When pem 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.1873 05/04/05 15:49:10 pem@stripped +3 -0
  Additional fix for BUG#5907: Traditional mode: invalid value can be inserted via a stored procedure
  ... make the handler catch too.

  sql/sp_head.cc
    1.125 05/04/05 15:49:05 pem@stripped +5 -1
    Make handlers catch certain bad data exceptions in strict mode too.

  mysql-test/t/strict.test
    1.23 05/04/05 15:49:05 pem@stripped +0 -1
    Corrected test for BUG#5907.

  mysql-test/r/strict.result
    1.25 05/04/05 15:49:05 pem@stripped +2 -1
    Updated corrected result for BUG#5907.

# 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:	pem
# Host:	mysql.comhem.se
# Root:	/home/pem/work/mysql-5.0

--- 1.24/mysql-test/r/strict.result	Mon Apr  4 23:32:44 2005
+++ 1.25/mysql-test/r/strict.result	Tue Apr  5 15:49:05 2005
@@ -1180,7 +1180,8 @@
 create procedure t1 () begin declare exit handler for sqlexception
 select'a'; insert into t1 values (200); end;|
 call t1();
-ERROR 22003: Out of range value adjusted for column 'col1' at row 1
+a
+a
 select * from t1;
 col1
 drop procedure t1;

--- 1.22/mysql-test/t/strict.test	Mon Apr  4 23:32:44 2005
+++ 1.23/mysql-test/t/strict.test	Tue Apr  5 15:49:05 2005
@@ -1040,7 +1040,6 @@
 create procedure t1 () begin declare exit handler for sqlexception
 select'a'; insert into t1 values (200); end;|
 delimiter ;|
---error 1264
 call t1();
 select * from t1;
 drop procedure t1;

--- 1.124/sql/sp_head.cc	Wed Mar 30 17:43:44 2005
+++ 1.125/sql/sp_head.cc	Tue Apr  5 15:49:05 2005
@@ -561,7 +561,10 @@
     // Check if an exception has occurred and a handler has been found
     // Note: We havo to check even if ret==0, since warnings (and some
     //       errors don't return a non-zero value.
-    if (!thd->killed && ctx)
+    //       We also have to check even if thd->killed != 0, since some
+    //       errors return with this even when a handler has been found
+    //       (e.g. "bad data").
+    if (ctx)
     {
       uint hf;
 
@@ -579,6 +582,7 @@
 	ctx->clear_handler();
 	ctx->in_handler= TRUE;
         thd->clear_error();
+	thd->killed= THD::NOT_KILLED;
 	continue;
       }
     }
Thread
bk commit into 5.0 tree (pem:1.1873) BUG#5907pem5 Apr