List:Commits« Previous MessageNext Message »
From:dlenev Date:September 29 2006 6:55am
Subject:bk commit into 5.0 tree (dlenev:1.2267)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of dlenev. When dlenev 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@stripped, 2006-09-29 10:55:03+04:00, dlenev@stripped +7 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0
  into  mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge
  MERGE: 1.2258.1.30

  BitKeeper/etc/collapsed@stripped, 2006-09-29 10:43:39+04:00, dlenev@stripped +1 -1
    auto-union
    MERGE: 1.4.1.1

  mysql-test/mysql-test-run.pl@stripped, 2006-09-29 10:43:44+04:00, dlenev@stripped +0 -0
    Auto merged
    MERGE: 1.112.1.3

  mysql-test/r/sp.result@stripped, 2006-09-29 10:55:01+04:00, dlenev@stripped +16 -17
    Manual merge.
    MERGE: 1.211.1.2

  mysql-test/t/sp.test@stripped, 2006-09-29 10:55:01+04:00, dlenev@stripped +49 -34
    Manual merge.
    MERGE: 1.199.1.2

  sql/mysql_priv.h@stripped, 2006-09-29 10:43:44+04:00, dlenev@stripped +0 -0
    Auto merged
    MERGE: 1.409.1.1

  sql/sp.cc@stripped, 2006-09-29 10:43:44+04:00, dlenev@stripped +0 -0
    Auto merged
    MERGE: 1.117.1.1

  sql/sql_acl.cc@stripped, 2006-09-29 10:43:44+04:00, dlenev@stripped +0 -0
    Auto merged
    MERGE: 1.208.1.2

# 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:	dlenev
# Host:	mockturtle.local
# Root:	/home/dlenev/src/mysql-5.0-rt-merge/RESYNC

--- 1.411/sql/mysql_priv.h	2006-09-29 10:55:08 +04:00
+++ 1.412/sql/mysql_priv.h	2006-09-29 10:55:08 +04:00
@@ -1228,7 +1228,6 @@
 extern bool opt_disable_networking, opt_skip_show_db;
 extern my_bool opt_character_set_client_handshake;
 extern bool volatile abort_loop, shutdown_in_progress, grant_option;
-extern bool mysql_proc_table_exists;
 extern uint volatile thread_count, thread_running, global_read_lock;
 extern my_bool opt_sql_bin_update, opt_safe_user_create, opt_no_mix_types;
 extern my_bool opt_safe_show_db, opt_local_infile;

--- 1.209/sql/sql_acl.cc	2006-09-29 10:55:08 +04:00
+++ 1.210/sql/sql_acl.cc	2006-09-29 10:55:08 +04:00
@@ -54,7 +54,7 @@
 }
 
 #define IP_ADDR_STRLEN (3+1+3+1+3+1+3)
-#define ACL_KEY_LENGTH (IP_ADDR_STRLEN+1+NAME_BYTE_LEN+1+USERNAME_BYTE_LENGTH+1)
+#define ACL_KEY_LENGTH (IP_ADDR_STRLEN+1+NAME_LEN+1+USERNAME_LENGTH+1)
 
 static DYNAMIC_ARRAY acl_hosts,acl_users,acl_dbs;
 static MEM_ROOT mem, memex;
@@ -197,7 +197,7 @@
   READ_RECORD read_record_info;
   my_bool return_val= 1;
   bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
-  char tmp_name[NAME_BYTE_LEN+1];
+  char tmp_name[NAME_LEN+1];
   int password_length;
   DBUG_ENTER("acl_load");
 
@@ -2263,7 +2263,7 @@
 				      const char *user, const char *tname,
 				      bool exact)
 {
-  char helping [NAME_BYTE_LEN*2+USERNAME_BYTE_LENGTH+3];
+  char helping [NAME_LEN*2+USERNAME_LENGTH+3];
   uint len;
   GRANT_NAME *grant_name,*found=0;
   HASH_SEARCH_STATE state;
@@ -3166,7 +3166,7 @@
 {
   List_iterator <LEX_USER> str_list (list);
   LEX_USER *Str, *tmp_Str;
-  char tmp_db[NAME_BYTE_LEN+1];
+  char tmp_db[NAME_LEN+1];
   bool create_new_users=0;
   TABLE_LIST tables[2];
   DBUG_ENTER("mysql_grant");
@@ -3230,7 +3230,7 @@
     {
       result= TRUE;
       continue;
-    }  
+    }
     if (replace_user_table(thd, tables[0].table, *Str,
                            (!db ? rights : 0), revoke_grant, create_new_users,
                            test(thd->variables.sql_mode &
@@ -3866,7 +3866,7 @@
 bool check_grant_db(THD *thd,const char *db)
 {
   Security_context *sctx= thd->security_ctx;
-  char helping [NAME_BYTE_LEN+USERNAME_BYTE_LENGTH+2];
+  char helping [NAME_LEN+USERNAME_LENGTH+2];
   uint len;
   bool error= 1;
 

--- 1.5/BitKeeper/etc/collapsed	2006-09-29 10:55:08 +04:00
+++ 1.6/BitKeeper/etc/collapsed	2006-09-29 10:55:08 +04:00
@@ -4,3 +4,4 @@
 44f33f3aj5KW5qweQeekY1LU0E9ZCg
 45001f7c3b2hhCXDKfUvzkX9TNe6VA
 45002051rHJfMEXAIMiAZV0clxvKSA
+4513d8e4Af4dQWuk13sArwofRgFDQw

--- 1.114/mysql-test/mysql-test-run.pl	2006-09-29 10:55:08 +04:00
+++ 1.115/mysql-test/mysql-test-run.pl	2006-09-29 10:55:08 +04:00
@@ -134,7 +134,6 @@
 our $glob_win32=                  0; # OS and native Win32 executables
 our $glob_win32_perl=             0; # ActiveState Win32 Perl
 our $glob_cygwin_perl=            0; # Cygwin Perl
-our $glob_cygwin_shell=           undef;
 our $glob_mysql_test_dir=         undef;
 our $glob_mysql_bench_dir=        undef;
 our $glob_hostname=               undef;
@@ -465,10 +464,7 @@
   {
     # Windows programs like 'mysqld' needs Windows paths
     $glob_mysql_test_dir= `cygpath -m "$glob_mysql_test_dir"`;
-    my $shell= $ENV{'SHELL'} || "/bin/bash";
-    $glob_cygwin_shell=   `cygpath -w "$shell"`; # The Windows path c:\...
     chomp($glob_mysql_test_dir);
-    chomp($glob_cygwin_shell);
   }
   $glob_basedir=         dirname($glob_mysql_test_dir);
   $glob_mysql_bench_dir= "$glob_basedir/mysql-bench"; # FIXME make configurable
@@ -1117,7 +1113,9 @@
     $path_ndb_tools_dir= mtr_path_exists("$glob_basedir/ndb/tools");
     $exe_ndb_mgm=        "$glob_basedir/ndb/src/mgmclient/ndb_mgm";
     $lib_udf_example=
-      mtr_file_exists("$glob_basedir/sql/.libs/udf_example.so");
+      mtr_file_exists("$glob_basedir/sql/.libs/udf_example.so",
+                      "$glob_basedir/sql/release/udf_example.dll",
+                      "$glob_basedir/sql/debug/udf_example.dll");
   }
   else
   {

--- 1.212/mysql-test/r/sp.result	2006-09-29 10:55:08 +04:00
+++ 1.213/mysql-test/r/sp.result	2006-09-29 10:55:08 +04:00
@@ -5394,6 +5394,21 @@
 bug21416		CREATE DEFINER=`root`@`localhost` PROCEDURE `bug21416`()
 show create procedure bug21416
 drop procedure bug21416|
+DROP PROCEDURE IF EXISTS bug21414|
+CREATE PROCEDURE bug21414() SELECT 1|
+FLUSH TABLES WITH READ LOCK|
+DROP PROCEDURE bug21414|
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+UNLOCK TABLES|
+The following should succeed.
+DROP PROCEDURE bug21414|
+set names utf8|
+drop database if exists това_е_дълго_име_за_база_данни_нали|
+create database това_е_дълго_име_за_база_данни_нали|
+INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')|
+call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
+ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+drop database това_е_дълго_име_за_база_данни_нали|
 CREATE TABLE t3 (
 Member_ID varchar(15) NOT NULL,
 PRIMARY KEY (Member_ID)
@@ -5430,8 +5445,6 @@
 ('666666', 'Enrolled', '2006-05-12', 'CHF' ),
 ('666666', 'Disenrolled', '2006-06-01', 'CAD' )|
 DROP FUNCTION IF EXISTS bug21493|
-Warnings:
-Note	1305	FUNCTION bug21493 does not exist
 CREATE FUNCTION bug21493(paramMember VARCHAR(15)) RETURNS varchar(45)
 BEGIN
 DECLARE tracks VARCHAR(45);
@@ -5457,4 +5470,5 @@
 CHF
 DROP FUNCTION bug21493|
 DROP TABLE t3,t4|
+End of 5.0 tests
 drop table t1,t2;

--- 1.200/mysql-test/t/sp.test	2006-09-29 10:55:08 +04:00
+++ 1.201/mysql-test/t/sp.test	2006-09-29 10:55:08 +04:00
@@ -1,13 +1,9 @@
 #
 # Basic stored PROCEDURE tests
 #
-# Please keep this file free of --error cases and other
-# things that will not run in a single debugged mysqld
-# process (e.g. master-slave things).
-#
 # Test cases for bugs are added at the end. See template there.
 #
-# Tests that require --error go into sp-error.test
+# Some tests that require --error go into sp-error.test
 # Tests that require inndb go into sp_trans.test
 # Tests that check privilege and security issues go to sp-security.test.
 # Tests that require multiple connections, except security/privilege tests,
@@ -6322,6 +6318,52 @@
 call bug21416()|
 drop procedure bug21416|
 
+
+#
+# BUG#21416: SP: Recursion level higher than zero needed for non-recursive call
+#
+--disable_warnings
+drop procedure if exists bug21416|
+--enable_warnings
+create procedure bug21416() show create procedure bug21416|
+call bug21416()|
+drop procedure bug21416|
+
+
+#
+# BUG#21414: SP: Procedure undroppable, to some extent
+#
+--disable_warnings
+DROP PROCEDURE IF EXISTS bug21414|
+--enable_warnings
+
+CREATE PROCEDURE bug21414() SELECT 1|
+
+FLUSH TABLES WITH READ LOCK|
+
+--error ER_CANT_UPDATE_WITH_READLOCK
+DROP PROCEDURE bug21414|
+
+UNLOCK TABLES|
+
+--echo The following should succeed.
+DROP PROCEDURE bug21414|
+
+
+#
+# BUG#21311: Possible stack overrun if SP has non-latin1 name
+#
+set names utf8|
+--disable_warnings
+drop database if exists това_е_дълго_име_за_база_данни_нали|
+--enable_warnings
+create database това_е_дълго_име_за_база_данни_нали|
+INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')|
+--error ER_SP_PROC_TABLE_CORRUPT
+call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
+drop database това_е_дълго_име_за_база_данни_нали|
+
+
 #
 # BUG#21493: Crash on the second call of a procedure containing
 #            a select statement that uses an IN aggregating subquery  
@@ -6367,9 +6409,9 @@
   ('666666', 'Enrolled', '2006-05-12', 'CHF' ),
   ('666666', 'Disenrolled', '2006-06-01', 'CAD' )|
 
-#--disable_warnings
+--disable_warnings
 DROP FUNCTION IF EXISTS bug21493|
-#--enable_warnings
+--enable_warnings
 
 CREATE FUNCTION bug21493(paramMember VARCHAR(15)) RETURNS varchar(45)
 BEGIN
@@ -6388,6 +6430,9 @@
 
 DROP FUNCTION bug21493|
 DROP TABLE t3,t4|
+
+--echo End of 5.0 tests
+
 
 #
 # BUG#NNNN: New bug synopsis

--- 1.119/sql/sp.cc	2006-09-29 10:55:08 +04:00
+++ 1.120/sql/sp.cc	2006-09-29 10:55:08 +04:00
@@ -385,16 +385,16 @@
 {
   LEX *old_lex= thd->lex, newlex;
   String defstr;
-  char old_db_buf[NAME_BYTE_LEN+1];
+  char old_db_buf[NAME_LEN+1];
   LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
   bool dbchanged;
   ulong old_sql_mode= thd->variables.sql_mode;
   ha_rows old_select_limit= thd->variables.select_limit;
   sp_rcontext *old_spcont= thd->spcont;
   
-  char definer_user_name_holder[USERNAME_BYTE_LENGTH + 1];
+  char definer_user_name_holder[USERNAME_LENGTH + 1];
   LEX_STRING_WITH_INIT definer_user_name(definer_user_name_holder,
-                                         USERNAME_BYTE_LENGTH);
+                                         USERNAME_LENGTH);
 
   char definer_host_name_holder[HOSTNAME_LENGTH + 1];
   LEX_STRING_WITH_INIT definer_host_name(definer_host_name_holder,
@@ -492,7 +492,7 @@
   int ret;
   TABLE *table;
   char definer[USER_HOST_BUFF_SIZE];
-  char old_db_buf[NAME_BYTE_LEN+1];
+  char old_db_buf[NAME_LEN+1];
   LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
   bool dbchanged;
   DBUG_ENTER("db_create_routine");
Thread
bk commit into 5.0 tree (dlenev:1.2267)dlenev29 Sep