List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:May 10 2006 9:40am
Subject:bk commit into 5.0 tree (anozdrin:1.2120)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of alik. When alik 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.2120 06/05/10 13:40:54 anozdrin@stripped +3 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
  into  mysql.com:/mnt/raid/MySQL/devel/5.0-bug18587

  sql/item_func.cc
    1.282 06/05/10 13:40:49 anozdrin@stripped +0 -0
    Auto merged

  mysql-test/t/sp.test
    1.186 06/05/10 13:40:49 anozdrin@stripped +0 -0
    Auto merged

  mysql-test/r/sp.result
    1.198 06/05/10 13:40:49 anozdrin@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:	anozdrin
# Host:	station.home
# Root:	/mnt/raid/MySQL/devel/5.0-bug18587/RESYNC

--- 1.281/sql/item_func.cc	2006-04-21 15:21:25 +04:00
+++ 1.282/sql/item_func.cc	2006-05-10 13:40:49 +04:00
@@ -4558,12 +4558,6 @@
   sys_var *var;
   LEX_STRING *base_name, *component_name;
 
-  if (component.str == 0 &&
-      !my_strcasecmp(system_charset_info, name.str, "VERSION"))
-    return new Item_string(NULL, server_version,
-			   (uint) strlen(server_version),
-			   system_charset_info, DERIVATION_SYSCONST);
-
   if (component.str)
   {
     base_name= &component;

--- 1.197/mysql-test/r/sp.result	2006-04-21 15:21:25 +04:00
+++ 1.198/mysql-test/r/sp.result	2006-05-10 13:40:49 +04:00
@@ -4848,6 +4848,23 @@
 b	3
 a	1
 delete from t1|
+drop function if exists bug15728|
+drop table if exists t3|
+create table t3 (
+id int not null auto_increment,
+primary key (id)
+)|
+create function bug15728() returns int(11)
+return last_insert_id()|
+insert into t3 values (0)|
+select last_insert_id()|
+last_insert_id()
+1
+select bug15728()|
+bug15728()
+1
+drop function bug15728|
+drop table t3|
 drop procedure if exists bug18787|
 create procedure bug18787()
 begin

--- 1.185/mysql-test/t/sp.test	2006-04-21 15:21:25 +04:00
+++ 1.186/mysql-test/t/sp.test	2006-05-10 13:40:49 +04:00
@@ -5699,6 +5699,31 @@
 
 
 #
+# BUG#15728: LAST_INSERT_ID function inside a stored function returns 0
+#
+# The solution is not to reset last_insert_id on enter to sub-statement.
+#
+--disable_warnings
+drop function if exists bug15728|
+drop table if exists t3|
+--enable_warnings
+
+create table t3 (
+  id int not null auto_increment,
+  primary key (id)
+)|
+create function bug15728() returns int(11)
+  return last_insert_id()|
+
+insert into t3 values (0)|
+select last_insert_id()|
+select bug15728()|
+
+drop function bug15728|
+drop table t3|
+
+
+#
 # BUG#18787: Server crashed when calling a stored procedure containing
 #            a misnamed function
 #
Thread
bk commit into 5.0 tree (anozdrin:1.2120)Alexander Nozdrin10 May