List:Internals« Previous MessageNext Message »
From:antony Date:March 9 2005 2:15am
Subject:bk commit into 5.0 tree (acurtis:1.1821)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of acurtis. When acurtis 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.1821 05/03/09 01:15:42 acurtis@stripped +3 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0
  into pcgem.rdg.cyberkinetica.com:/var/db/bk/work-acurtis/bug3788.4

  sql/sql_parse.cc
    1.415 05/03/09 01:15:38 acurtis@stripped +0 -0
    Auto merged

  mysql-test/t/sp.test
    1.111 05/03/09 01:15:37 acurtis@stripped +0 -0
    Auto merged

  mysql-test/r/sp.result
    1.118 05/03/09 01:15:36 acurtis@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:	acurtis
# Host:	pcgem.rdg.cyberkinetica.com
# Root:	/var/db/bk/work-acurtis/bug3788.4/RESYNC

--- 1.414/sql/sql_parse.cc	2005-03-08 18:53:01 +00:00
+++ 1.415/sql/sql_parse.cc	2005-03-09 01:15:38 +00:00
@@ -3191,7 +3191,7 @@
       Don't allow this within a transaction because we want to use
       re-generate table
     */
-    if (thd->locked_tables || thd->active_transaction())
+    if ((thd->locked_tables && !lex->sphead) ||
thd->active_transaction())
     {
       my_message(ER_LOCK_OR_ACTIVE_TRANSACTION,
                  ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));

--- 1.117/mysql-test/r/sp.result	2005-03-08 22:08:56 +00:00
+++ 1.118/mysql-test/r/sp.result	2005-03-09 01:15:36 +00:00
@@ -962,7 +962,7 @@
   return 42|
 show create function chistics|
 Function	sql_mode	Create Function
-chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int
+chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int(11)
     DETERMINISTIC
     SQL SECURITY INVOKER
     COMMENT 'Characteristics procedure test'
@@ -975,7 +975,7 @@
 comment 'Characteristics function test'|
 show create function chistics|
 Function	sql_mode	Create Function
-chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int
+chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int(11)
     NO SQL
     DETERMINISTIC
     SQL SECURITY INVOKER
@@ -2026,11 +2026,11 @@
 insert into "t1" values ('foo', 1)
 show create function bug2564_3|
 Function	sql_mode	Create Function
-bug2564_3		CREATE FUNCTION `test`.`bug2564_3`(x int, y int) RETURNS int
+bug2564_3		CREATE FUNCTION `test`.`bug2564_3`(x int, y int) RETURNS int(11)
 return x || y
 show create function bug2564_4|
 Function	sql_mode	Create Function
-bug2564_4	REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI	CREATE
FUNCTION "test"."bug2564_4"(x int, y int) RETURNS int
+bug2564_4	REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI	CREATE
FUNCTION "test"."bug2564_4"(x int, y int) RETURNS int(11)
 return x || y
 drop procedure bug2564_1|
 drop procedure bug2564_2|
@@ -2094,6 +2094,28 @@
 drop procedure bug4579_1|
 drop procedure bug4579_2|
 drop table t3|
+drop table if exists t3|
+drop procedure if exists bug2773|
+create function bug2773() returns int return null|
+create table t3 as select bug2773()|
+show create table t3|
+Table	Create Table
+t3	CREATE TABLE `t3` (
+  `bug2773()` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t3|
+drop function bug2773|
+drop procedure if exists bug3788|
+create function bug3788() returns date return cast("2005-03-04" as date)|
+select bug3788()|
+bug3788()
+2005-03-04
+drop function bug3788|
+create function bug3788() returns binary(5) return 5|
+select bug3788()|
+bug3788()
+5
+drop function bug3788|
 drop table if exists t3|
 create table t3 (f1 int, f2 int, f3 int)|
 insert into t3 values (1,1,1)|

--- 1.110/mysql-test/t/sp.test	2005-03-08 18:52:56 +00:00
+++ 1.111/mysql-test/t/sp.test	2005-03-09 01:15:37 +00:00
@@ -3305,7 +3305,7 @@
 call bug7992()|
 drop procedure bug7992|
 drop table t3|
-
+delimiter ;|
 
 #
 # BUG#8849: problem with insert statement with table alias's
@@ -3313,6 +3313,7 @@
 # Rolling back changes to AND/OR structure of ON and WHERE clauses  in SP
 # 
 
+delimiter |;
 create table t3 (
   lpitnumber int(11) default null,
   lrecordtype int(11) default null
@@ -3388,3 +3389,29 @@
 # practical, or create table t3, t3 etc temporarily (and drop them).
 delimiter ;|
 drop table t1,t2;
+
+#
+# BUG#8850
+#
+--disable_warnings
+drop procedure if exists sp1;
+--enable_warnings
+delimiter |;
+create table t1 (a int) engine=innodb|
+create procedure sp1 ()
+begin
+  truncate table t1; insert t1 values (1); rollback;
+end
+|
+delimiter ;|
+set autocommit=0;
+insert t1 values (2);
+--error 1192
+call sp1();
+commit;
+set autocommit=1;
+select * from t1;
+call sp1();
+select * from t1;
+drop table t1;
+drop procedure sp1;
Thread
bk commit into 5.0 tree (acurtis:1.1821)antony9 Mar