List:Commits« Previous MessageNext Message »
From:ramil Date:September 15 2006 11:15am
Subject:bk commit into 5.1 tree (ramil:1.2326)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ram. When ram 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-15 14:15:09+05:00, ramil@stripped +11 -0
  Merge rkalimullin@stripped:/home/bk/mysql-5.1
  into  mysql.com:/usr/home/ram/work/mysql-5.1-maint
  MERGE: 1.2313.2.3

  BitKeeper/etc/ignore@stripped, 2006-09-15 14:14:46+05:00, ramil@stripped +3 -3
    auto-union
    MERGE: 1.246.1.11

  mysql-test/mysql-test-run.pl@stripped, 2006-09-15 14:14:54+05:00, ramil@stripped
+0 -0
    Auto merged
    MERGE: 1.166.1.1

  sql/Makefile.am@stripped, 2006-09-15 14:14:54+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.145.1.11

  sql/mysqld.cc@stripped, 2006-09-15 14:14:54+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.564.1.19

  sql/sp_head.cc@stripped, 2006-09-15 14:14:55+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.232.1.4

  sql/sql_class.h@stripped, 2006-09-15 14:14:55+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.304.1.17

  sql/sql_lex.cc@stripped, 2006-09-15 14:14:55+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.190.1.13

  sql/sql_lex.h@stripped, 2006-09-15 14:14:55+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.234.1.13

  sql/sql_parse.cc@stripped, 2006-09-15 14:14:55+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.567.1.21

  sql/sql_yacc.yy@stripped, 2006-09-15 14:14:56+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.484.1.18

  sql/table.cc@stripped, 2006-09-15 14:14:56+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.243.1.1

# 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:	ramil
# Host:	myoffice.izhnet.ru
# Root:	/usr/home/ram/work/mysql-5.1-maint/RESYNC

--- 1.196/sql/sql_lex.cc	2006-09-15 14:15:34 +05:00
+++ 1.197/sql/sql_lex.cc	2006-09-15 14:15:34 +05:00
@@ -1533,10 +1533,10 @@ bool st_select_lex::setup_ref_array(THD 
   */
   Query_arena *arena= thd->stmt_arena;
   return (ref_pointer_array=
-          (Item **)arena->alloc(sizeof(Item*) *
-                                (item_list.elements +
-                                 select_n_having_items +
-                                 order_group_num)* 5)) == 0;
+          (Item **)arena->alloc(sizeof(Item*) * (n_child_sum_items +
+                                                 item_list.elements +
+                                                 select_n_having_items +
+                                                 order_group_num)*5)) == 0;
 }
 
 

--- 1.242/sql/sql_lex.h	2006-09-15 14:15:34 +05:00
+++ 1.243/sql/sql_lex.h	2006-09-15 14:15:34 +05:00
@@ -574,6 +574,12 @@ public:
   bool  braces;   	/* SELECT ... UNION (SELECT ... ) <- this braces */
   /* TRUE when having fix field called in processing of this SELECT */
   bool having_fix_field;
+
+  /* Number of Item_sum-derived objects in this SELECT */
+  uint n_sum_items;
+  /* Number of Item_sum-derived objects in children and descendant SELECTs */
+  uint n_child_sum_items;
+
   /* explicit LIMIT clause was used */
   bool explicit_limit;
   /*
@@ -666,7 +672,7 @@ public:
   bool test_limit();
 
   friend void lex_start(THD *thd, const uchar *buf, uint length);
-  st_select_lex() {}
+  st_select_lex() : n_sum_items(0), n_child_sum_items(0) {}
   void make_empty_select()
   {
     init_query();

--- 1.575/sql/sql_parse.cc	2006-09-15 14:15:34 +05:00
+++ 1.576/sql/sql_parse.cc	2006-09-15 14:15:34 +05:00
@@ -1047,8 +1047,8 @@ static int check_connection(THD *thd)
   char *passwd= strend(user)+1;
   uint user_len= passwd - user - 1;
   char *db= passwd;
-  char db_buff[NAME_LEN+1];                     // buffer to store db in utf8
-  char user_buff[USERNAME_LENGTH+1];		// buffer to store user in utf8
+  char db_buff[NAME_BYTE_LEN + 1];              // buffer to store db in utf8
+  char user_buff[USERNAME_BYTE_LENGTH + 1];	// buffer to store user in utf8
   uint dummy_errors;
 
   /*
@@ -1724,7 +1724,7 @@ bool dispatch_command(enum enum_server_c
       password.  New clients send the size (1 byte) + string (not null
       terminated, so also '\0' for empty string).
     */
-    char db_buff[NAME_LEN+1];                 // buffer to store db in utf8
+    char db_buff[NAME_BYTE_LEN+1];               // buffer to store db in utf8
     char *db= passwd;
     uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
       *passwd++ : strlen(passwd);
@@ -7763,6 +7763,7 @@ LEX_USER *get_current_user(THD *thd, LEX
 
   SYNOPSIS
     check_string_length()
+      cs          string charset
       str         string to be checked
       err_msg     error message to be displayed if the string is too long
       max_length  max length
@@ -7772,13 +7773,13 @@ LEX_USER *get_current_user(THD *thd, LEX
     TRUE    the passed string is longer than max_length
 */
 
-bool check_string_length(LEX_STRING *str, const char *err_msg,
-                         uint max_length)
+bool check_string_length(CHARSET_INFO *cs, LEX_STRING *str,
+                         const char *err_msg, uint max_length)
 {
-  if (str->length <= max_length)
-    return FALSE;
+  if (cs->cset->charpos(cs, str->str, str->str + str->length,
+                        max_length) >= str->length)
+    return FALSE; 
 
   my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_length);
-
   return TRUE;
 }

--- 1.497/sql/sql_yacc.yy	2006-09-15 14:15:34 +05:00
+++ 1.498/sql/sql_yacc.yy	2006-09-15 14:15:34 +05:00
@@ -9224,7 +9224,8 @@ user:
 	  $$->host.str= (char *) "%";
 	  $$->host.length= 1;
 
-	  if (check_string_length(&$$->user, ER(ER_USERNAME), USERNAME_LENGTH))
+	  if (check_string_length(system_charset_info, &$$->user,
+                                  ER(ER_USERNAME), USERNAME_LENGTH))
 	    YYABORT;
 	}
 	| ident_or_text '@' ident_or_text
@@ -9234,9 +9235,10 @@ user:
 	      YYABORT;
 	    $$->user = $1; $$->host=$3;
 
-	    if (check_string_length(&$$->user, ER(ER_USERNAME), USERNAME_LENGTH) ||
-	        check_string_length(&$$->host, ER(ER_HOSTNAME),
-					       HOSTNAME_LENGTH))
+	    if (check_string_length(system_charset_info, &$$->user,
+                                    ER(ER_USERNAME), USERNAME_LENGTH) ||
+	        check_string_length(&my_charset_latin1, &$$->host,
+                                    ER(ER_HOSTNAME), HOSTNAME_LENGTH))
 	      YYABORT;
 	  }
 	| CURRENT_USER optional_braces
@@ -10714,8 +10716,10 @@ subselect_end:
 	{
 	  LEX *lex=Lex;
           lex->pop_context();
+          SELECT_LEX *child= lex->current_select;
 	  lex->current_select = lex->current_select->return_after_parsing();
           lex->nest_level--;
+          lex->current_select->n_child_sum_items += child->n_sum_items;
 	};
 
 /**************************************************************************

--- 1.244/sql/table.cc	2006-09-15 14:15:34 +05:00
+++ 1.245/sql/table.cc	2006-09-15 14:15:34 +05:00
@@ -2257,7 +2257,7 @@ char *get_field(MEM_ROOT *mem, Field *fi
 
 bool check_db_name(char *name)
 {
-  char *start=name;
+  uint name_length= 0;  // name length in symbols
   /* Used to catch empty names and names with end space */
   bool last_char_is_space= TRUE;
 
@@ -2277,13 +2277,15 @@ bool check_db_name(char *name)
         name += len;
         continue;
       }
+    name_length++;
     }
 #else
     last_char_is_space= *name==' ';
 #endif
+    name_length++;
     name++;
   }
-  return last_char_is_space || (uint) (name - start) > NAME_LEN;
+  return last_char_is_space || name_length > NAME_LEN;
 }
 
 

--- 1.167/mysql-test/mysql-test-run.pl	2006-09-15 14:15:34 +05:00
+++ 1.168/mysql-test/mysql-test-run.pl	2006-09-15 14:15:34 +05:00
@@ -3788,6 +3788,11 @@ sub run_mysqltest ($) {
     mtr_add_arg($args, "--big-test");
   }
 
+  if ( $opt_valgrind )
+  {
+    mtr_add_arg($args, "--valgrind");
+  }
+
   if ( $opt_compress )
   {
     mtr_add_arg($args, "--compress");

--- 1.236/sql/sp_head.cc	2006-09-15 14:15:35 +05:00
+++ 1.237/sql/sp_head.cc	2006-09-15 14:15:35 +05:00
@@ -954,7 +954,7 @@ bool
 sp_head::execute(THD *thd)
 {
   DBUG_ENTER("sp_head::execute");
-  char old_db_buf[NAME_LEN+1];
+  char old_db_buf[NAME_BYTE_LEN+1];
   LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
   bool dbchanged;
   sp_rcontext *ctx;
@@ -1999,8 +1999,8 @@ sp_head::set_info(longlong created, long
 void
 sp_head::set_definer(const char *definer, uint definerlen)
 {
-  char user_name_holder[USERNAME_LENGTH + 1];
-  LEX_STRING user_name= { user_name_holder, USERNAME_LENGTH };
+  char user_name_holder[USERNAME_BYTE_LENGTH + 1];
+  LEX_STRING user_name= { user_name_holder, USERNAME_BYTE_LENGTH };
 
   char host_name_holder[HOSTNAME_LENGTH + 1];
   LEX_STRING host_name= { host_name_holder, HOSTNAME_LENGTH };

--- 1.251/BitKeeper/etc/ignore	2006-09-15 14:15:35 +05:00
+++ 1.252/BitKeeper/etc/ignore	2006-09-15 14:15:35 +05:00
@@ -5,6 +5,7 @@
 *.bb
 *.bbg
 *.bin
+*.cmake
 *.core
 *.d
 *.da
@@ -20,6 +21,7 @@
 *.map
 *.o
 *.obj
+*.old
 *.pch
 *.pdb
 *.reject
@@ -28,11 +30,21 @@
 *.so
 *.so.*
 *.spec
+*.user
+*.vcproj
+*/*.dir/*
 */*_pure_*warnings
 */.pure
+*/debug/*
+*/release/*
 *~
 .*.swp
+./CMakeCache.txt
+./MySql.ncb
+./MySql.sln
+./MySql.suo
 ./README.build-files
+./cmakecache.txt
 ./config.h
 ./copy_mysql_files.bat
 ./fix-project-files
@@ -68,6 +80,7 @@ BitKeeper/post-commit-manual
 BitKeeper/tmp/*
 BitKeeper/tmp/bkr3sAHD
 BitKeeper/tmp/gone
+CMakeFiles/*
 COPYING
 COPYING.LIB
 Docs/#manual.texi#
@@ -2767,6 +2780,7 @@ strings/ctype_autoconf.c
 strings/ctype_extra_sources.c
 strings/str_test
 strings/test_decimal
+support-files/*.ini
 support-files/MacOSX/Description.plist
 support-files/MacOSX/Info.plist
 support-files/MacOSX/ReadMe.txt
@@ -2898,5 +2912,8 @@ vio/test-sslserver
 vio/viotest-ssl
 vio/viotest-sslconnect.cpp
 vio/viotest.cpp
+win/configure.data
+win/vs71cache.txt
+win/vs8cache.txt
 zlib/*.ds?
 zlib/*.vcproj
Thread
bk commit into 5.1 tree (ramil:1.2326)ramil15 Sep