List:Internals« Previous MessageNext Message »
From:pem Date:October 21 2005 12:54pm
Subject:bk commit into 5.0 tree (pem:1.2020) BUG#13729
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.2020 05/10/21 12:17:14 pem@stripped +3 -0
  Fixed BUG#13729: Stored procedures: packet error after exception handled
    Don't clear the SERVER_MORE_RESULTS_EXISTS flag in
    protocol.cc:write_eof_packet() when executing a stored routine.
    (It's set by sql_update() in this case.)

  sql/protocol.cc
    1.110 05/10/21 12:17:00 pem@stripped +2 -1
    Don't clear the SERVER_MORE_RESULTS_EXISTS flag in write_eof_packet()
    when executing a stored routine. (It's set by sql_update() in this case.)

  mysql-test/t/sp.test
    1.160 05/10/21 12:17:00 pem@stripped +27 -0
    New test case for BUG#13729.

  mysql-test/r/sp.result
    1.166 05/10/21 12:17:00 pem@stripped +18 -0
    New test case for BUG#13729.

# 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:	/usr/home/pem/bug13729/mysql-5.0

--- 1.109/sql/protocol.cc	2005-10-17 15:07:23 +02:00
+++ 1.110/sql/protocol.cc	2005-10-21 12:17:00 +02:00
@@ -403,8 +403,9 @@
       The following test should never be true, but it's better to do it
       because if 'is_fatal_error' is set the server is not going to execute
       other queries (see the if test in dispatch_command / COM_QUERY)
+      However, when in a stored routine, don't reset it.
     */
-    if (thd->is_fatal_error)
+    if (thd->is_fatal_error && !thd->spcont)
       thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
     int2store(buff+3, thd->server_status);
     VOID(my_net_write(net, (char*) buff, 5));

--- 1.165/mysql-test/r/sp.result	2005-10-17 17:08:51 +02:00
+++ 1.166/mysql-test/r/sp.result	2005-10-21 12:17:00 +02:00
@@ -3504,4 +3504,22 @@
 drop procedure bug7049_6|
 drop function bug7049_1|
 drop function bug7049_2|
+drop procedure if exists bug13729|
+drop table if exists t3|
+create table t3 (s1 int, primary key (s1))|
+insert into t3 values (1),(2)|
+create procedure bug13729()
+begin
+declare continue handler for sqlexception select 55;
+update t3 set s1 = 1;
+end|
+call bug13729()|
+55
+55
+select * from t3|
+s1
+1
+2
+drop procedure bug13729|
+drop table t3|
 drop table t1,t2;

--- 1.159/mysql-test/t/sp.test	2005-10-17 17:08:55 +02:00
+++ 1.160/mysql-test/t/sp.test	2005-10-21 12:17:00 +02:00
@@ -4391,6 +4391,33 @@
 
 
 #
+# BUG#13729: Stored procedures: packet error after exception handled
+#
+--disable_warnings
+drop procedure if exists bug13729|
+drop table if exists t3|
+--enable_warnings
+
+create table t3 (s1 int, primary key (s1))|
+
+insert into t3 values (1),(2)|
+
+create procedure bug13729()
+begin
+  declare continue handler for sqlexception select 55;
+
+  update t3 set s1 = 1;
+end|
+
+call bug13729()|
+# Used to cause Packets out of order
+select * from t3|
+
+drop procedure bug13729|
+drop table t3|
+
+
+#
 # BUG#NNNN: New bug synopsis
 #
 #--disable_warnings
Thread
bk commit into 5.0 tree (pem:1.2020) BUG#13729pem21 Oct