List:Commits« Previous MessageNext Message »
From:pem Date:April 18 2006 11:20am
Subject:bk commit into 5.0 tree (pem:1.2156)
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.2156 06/04/18 11:20:18 pem@stripped +3 -0
  Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
  into  mysql.com:/extern/mysql/5.0/bug18787/mysql-5.0-runtime

  sql/item_func.cc
    1.279 06/04/18 11:20:12 pem@stripped +0 -0
    Auto merged

  mysql-test/t/sp.test
    1.183 06/04/18 11:20:12 pem@stripped +0 -0
    Auto merged

  mysql-test/r/sp.result
    1.195 06/04/18 11:20:12 pem@stripped +0 -0
    Auto merged

# 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:	pem.mysql.com
# Root:	/extern/mysql/5.0/bug18787/mysql-5.0-runtime/RESYNC

--- 1.278/sql/item_func.cc	2006-04-18 11:16:35 +02:00
+++ 1.279/sql/item_func.cc	2006-04-18 11:20:12 +02:00
@@ -559,6 +559,31 @@
 }
 
 
+void Item_func_connection_id::fix_length_and_dec()
+{
+  Item_int_func::fix_length_and_dec();
+  max_length= 10;
+}
+
+
+bool Item_func_connection_id::fix_fields(THD *thd, Item **ref)
+{
+  if (Item_int_func::fix_fields(thd, ref))
+    return TRUE;
+
+  /*
+    To replicate CONNECTION_ID() properly we should use
+    pseudo_thread_id on slave, which contains the value of thread_id
+    on master.
+  */
+  value= ((thd->slave_thread) ?
+          thd->variables.pseudo_thread_id :
+          thd->thread_id);
+
+  return FALSE;
+}
+
+
 /*
   Check arguments here to determine result's type for a numeric
   function of two arguments.

--- 1.194/mysql-test/r/sp.result	2006-04-06 12:18:57 +02:00
+++ 1.195/mysql-test/r/sp.result	2006-04-18 11:20:12 +02:00
@@ -4848,4 +4848,14 @@
 b	3
 a	1
 delete from t1|
+drop procedure if exists bug18787|
+create procedure bug18787()
+begin
+declare continue handler for sqlexception begin end;
+select no_such_function();
+end|
+call bug18787()|
+no_such_function()
+NULL
+drop procedure bug18787|
 drop table t1,t2;

--- 1.182/mysql-test/t/sp.test	2006-04-06 12:18:57 +02:00
+++ 1.183/mysql-test/t/sp.test	2006-04-18 11:20:12 +02:00
@@ -5699,6 +5699,24 @@
 
 
 #
+# BUG#18787: Server crashed when calling a stored procedure containing
+#            a misnamed function
+#
+--disable_warnings
+drop procedure if exists bug18787|
+--enable_warnings
+create procedure bug18787()
+begin
+  declare continue handler for sqlexception begin end;
+
+  select no_such_function();
+end|
+
+call bug18787()|
+drop procedure bug18787|
+
+
+#
 # BUG#NNNN: New bug synopsis
 #
 #--disable_warnings
Thread
bk commit into 5.0 tree (pem:1.2156)pem18 Apr