List:Internals« Previous MessageNext Message »
From:pem Date:September 7 2005 10:25am
Subject:bk commit into 5.0 tree (pem:1.1973)
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.1973 05/09/07 09:53:06 pem@stripped +3 -0
  Merge mysql.com:/usr/local/bk/mysql-5.0
  into  mysql.com:/home/pem/work/mysql-5.0

  sql/item_func.cc
    1.250 05/09/07 09:52:58 pem@stripped +0 -0
    Auto merged

  mysql-test/t/sp-error.test
    1.86 05/09/07 09:52:57 pem@stripped +0 -0
    Auto merged

  mysql-test/r/sp-error.result
    1.82 05/09/07 09:52:57 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:	mysql.comhem.se
# Root:	/home/pem/work/mysql-5.0/RESYNC

--- 1.249/sql/item_func.cc	2005-09-06 16:35:53 +02:00
+++ 1.250/sql/item_func.cc	2005-09-07 09:52:58 +02:00
@@ -1874,6 +1874,11 @@
   used_tables_cache|= RAND_TABLE_BIT;
   if (arg_count)
   {					// Only use argument once in query
+    if (!args[0]->const_during_execution())
+    {
+      my_error(ER_WRONG_ARGUMENTS, MYF(0), "RAND");
+      return TRUE;
+    }
     /*
       Allocate rand structure once: we must use thd->stmt_arena
       to create rand in proper mem_root if it's a prepared statement or

--- 1.81/mysql-test/r/sp-error.result	2005-09-06 16:35:52 +02:00
+++ 1.82/mysql-test/r/sp-error.result	2005-09-07 09:52:57 +02:00
@@ -805,3 +805,10 @@
 Warning	1417	A routine failed and has neither NO SQL nor READS SQL DATA in its
declaration and binary logging is enabled; if non-transactional tables were updated, the
binary log will miss their changes
 deallocate prepare stmt;
 drop function bug11834_2;
+DROP FUNCTION IF EXISTS bug12953|
+CREATE FUNCTION bug12953() RETURNS INT
+BEGIN
+OPTIMIZE TABLE t1;
+RETURN 1;
+END|
+ERROR 0A000: OPTIMIZE TABLE is not allowed in stored procedures

--- 1.85/mysql-test/t/sp-error.test	2005-09-06 16:35:53 +02:00
+++ 1.86/mysql-test/t/sp-error.test	2005-09-07 09:52:57 +02:00
@@ -1093,6 +1093,21 @@
 execute stmt;
 deallocate prepare stmt;
 drop function bug11834_2;
+
+#
+# Bug#12953 "Stored procedures: crash if OPTIMIZE TABLE in function"
+#
+delimiter |;
+--disable_warnings
+DROP FUNCTION IF EXISTS bug12953|
+--enable_warnings
+--error ER_SP_BADSTATEMENT
+CREATE FUNCTION bug12953() RETURNS INT
+BEGIN
+  OPTIMIZE TABLE t1;
+  RETURN 1;
+END|
+
 #
 # BUG#NNNN: New bug synopsis
 #
@@ -1100,5 +1115,3 @@
 #drop procedure if exists bugNNNN|
 #--enable_warnings
 #create procedure bugNNNN...
-
-
Thread
bk commit into 5.0 tree (pem:1.1973)pem7 Sep