MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:gluh Date:September 27 2006 12:49pm
Subject:bk commit into 4.1 tree (gluh:1.2551) BUG#21432
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of gluh. When gluh 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-27 17:49:16+05:00, gluh@stripped +7 -0
  Patch for bug#21432 is reverted

  include/mysql_com.h@stripped, 2006-09-27 17:49:12+05:00, gluh@stripped +0 -3
    Patch for bug#21432 is reverted

  mysql-test/r/ctype_utf8.result@stripped, 2006-09-27 17:49:12+05:00, gluh@stripped +0 -12
    Patch for bug#21432 is reverted

  mysql-test/t/ctype_utf8.test@stripped, 2006-09-27 17:49:12+05:00, gluh@stripped +0 -16
    Patch for bug#21432 is reverted

  sql-common/client.c@stripped, 2006-09-27 17:49:13+05:00, gluh@stripped +3 -3
    Patch for bug#21432 is reverted

  sql/sql_acl.cc@stripped, 2006-09-27 17:49:13+05:00, gluh@stripped +1 -5
    Patch for bug#21432 is reverted

  sql/sql_parse.cc@stripped, 2006-09-27 17:49:13+05:00, gluh@stripped +2 -2
    Patch for bug#21432 is reverted

  sql/table.cc@stripped, 2006-09-27 17:49:13+05:00, gluh@stripped +2 -4
    Patch for bug#21432 is reverted

# 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:	gluh
# Host:	gluh.(none)
# Root:	/home/gluh/MySQL/Merge/4.1

--- 1.108/include/mysql_com.h	2006-09-27 17:49:23 +05:00
+++ 1.109/include/mysql_com.h	2006-09-27 17:49:23 +05:00
@@ -26,9 +26,6 @@
 #define USERNAME_LENGTH 16
 #define SERVER_VERSION_LENGTH 60
 #define SQLSTATE_LENGTH 5
-#define SYSTEM_CHARSET_MBMAXLEN 3
-#define NAME_BYTE_LEN   NAME_LEN*SYSTEM_CHARSET_MBMAXLEN
-#define USERNAME_BYTE_LENGTH USERNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN
 
 #define LOCAL_HOST	"localhost"
 #define LOCAL_HOST_NAMEDPIPE "."

--- 1.179/sql/sql_acl.cc	2006-09-27 17:49:23 +05:00
+++ 1.180/sql/sql_acl.cc	2006-09-27 17:49:23 +05:00
@@ -2640,11 +2640,7 @@
   while ((Str = str_list++))
   {
     if (Str->host.length > HOSTNAME_LENGTH ||
-	system_charset_info->cset->charpos(system_charset_info,
-                                           Str->user.str,
-                                           Str->user.str +
-                                           Str->user.length,
-                                           USERNAME_LENGTH) < Str->user.length)
+	Str->user.length > USERNAME_LENGTH)
     {
       my_error(ER_GRANT_WRONG_HOST_OR_USER,MYF(0));
       result= -1;

--- 1.487/sql/sql_parse.cc	2006-09-27 17:49:23 +05:00
+++ 1.488/sql/sql_parse.cc	2006-09-27 17:49:23 +05:00
@@ -902,8 +902,8 @@
   char *user= end;
   char *passwd= strend(user)+1;
   char *db= passwd;
-  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
+  char db_buff[NAME_LEN + 1];           // buffer to store db in utf8
+  char user_buff[USERNAME_LENGTH + 1];	// buffer to store user in utf8
   uint dummy_errors;
 
   /*

--- 1.137/sql/table.cc	2006-09-27 17:49:23 +05:00
+++ 1.138/sql/table.cc	2006-09-27 17:49:23 +05:00
@@ -1413,7 +1413,7 @@
 
 bool check_db_name(char *name)
 {
-  uint name_length= 0;  // name length in symbols
+  char *start= name;
   /* Used to catch empty names and names with end space */
   bool last_char_is_space= TRUE;
 
@@ -1430,7 +1430,6 @@
 		name+system_charset_info->mbmaxlen);
       if (len)
       {
-        name_length++;
         name += len;
         continue;
       }
@@ -1438,13 +1437,12 @@
 #else
     last_char_is_space= *name==' ';
 #endif
-    name_length++;
     if (*name == '/' || *name == '\\' || *name == FN_LIBCHAR ||
 	*name == FN_EXTCHAR)
       return 1;
     name++;
   }
-  return (last_char_is_space || name_length > NAME_LEN);
+  return last_char_is_space || (uint) (name - start) > NAME_LEN;
 }
 
 

--- 1.72/mysql-test/r/ctype_utf8.result	2006-09-27 17:49:23 +05:00
+++ 1.73/mysql-test/r/ctype_utf8.result	2006-09-27 17:49:23 +05:00
@@ -1340,15 +1340,3 @@
 a
 e
 drop table t1;
-set names utf8;
-grant select on test.* to юзер_юзер@localhost;
-user()
-юзер_юзер@localhost
-revoke all on test.* from юзер_юзер@localhost;
-drop user юзер_юзер@localhost;
-create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-database()
-имя_базы_в_кодировке_утф8_длиной_больше_чем_45
-drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;

--- 1.74/mysql-test/t/ctype_utf8.test	2006-09-27 17:49:23 +05:00
+++ 1.75/mysql-test/t/ctype_utf8.test	2006-09-27 17:49:23 +05:00
@@ -1072,20 +1072,4 @@
 select a from t1 group by a;
 drop table t1;
 
-#
-# Bug#20393: User name truncation in mysql client
-# Bug#21432: Database/Table name limited to 64 bytes, not chars, problems with multi-byte
-#
-set names utf8;
-#create user юзер_юзер@localhost;
-grant select on test.* to юзер_юзер@localhost;
---exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()"
-revoke all on test.* from юзер_юзер@localhost;
-drop user юзер_юзер@localhost;
-
-create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
-
 # End of 4.1 tests

--- 1.92/sql-common/client.c	2006-09-27 17:49:23 +05:00
+++ 1.93/sql-common/client.c	2006-09-27 17:49:23 +05:00
@@ -1618,7 +1618,7 @@
 		       const char *passwd, const char *db,
 		       uint port, const char *unix_socket,ulong client_flag)
 {
-  char		buff[NAME_BYTE_LEN+USERNAME_BYTE_LENGTH+100];
+  char		buff[NAME_LEN+USERNAME_LENGTH+100];
   char		*end,*host_info;
   my_socket	sock;
   in_addr_t	ip_addr;
@@ -2063,7 +2063,7 @@
 		     mysql->server_status, client_flag));
   /* This needs to be changed as it's not useful with big packets */
   if (user && user[0])
-    strmake(end,user,USERNAME_BYTE_LENGTH);          /* Max user name */
+    strmake(end,user,USERNAME_LENGTH);          /* Max user name */
   else
     read_user_name((char*) end);
 
@@ -2093,7 +2093,7 @@
   /* Add database if needed */
   if (db && (mysql->server_capabilities & CLIENT_CONNECT_WITH_DB))
   {
-    end= strmake(end, db, NAME_BYTE_LEN) + 1;
+    end= strmake(end, db, NAME_LEN) + 1;
     mysql->db= my_strdup(db,MYF(MY_WME));
     db= 0;
   }
Thread
bk commit into 4.1 tree (gluh:1.2551) BUG#21432gluh27 Sep