Below is the list of changes that have just been committed into a local
4.1 repository of hf. When hf 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 12:37:24+05:00, holyfoot@stripped +6 -0
Merge mysql.com:/home/hf/work/mysql-4.1.clean
into mysql.com:/home/hf/work/mysql-4.1.21888
MERGE: 1.2522.1.30
mysql-test/r/ctype_utf8.result@stripped, 2006-09-29 12:37:21+05:00, holyfoot@stripped +0 -0
Auto merged
MERGE: 1.72.1.1
mysql-test/t/ctype_utf8.test@stripped, 2006-09-29 12:37:21+05:00, holyfoot@stripped +0 -0
Auto merged
MERGE: 1.74.1.1
sql/sql_acl.cc@stripped, 2006-09-29 12:37:21+05:00, holyfoot@stripped +0 -0
Auto merged
MERGE: 1.179.1.1
sql/sql_parse.cc@stripped, 2006-09-29 12:37:21+05:00, holyfoot@stripped +0 -0
Auto merged
MERGE: 1.486.1.1
sql/table.cc@stripped, 2006-09-29 12:37:21+05:00, holyfoot@stripped +0 -0
Auto merged
MERGE: 1.137.1.1
sql/unireg.cc@stripped, 2006-09-29 12:37:21+05:00, holyfoot@stripped +0 -0
Auto merged
MERGE: 1.49.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: holyfoot
# Host: deer.(none)
# Root: /home/hf/work/mysql-4.1.21888/RESYNC
--- 1.180/sql/sql_acl.cc 2006-09-29 12:37:29 +05:00
+++ 1.181/sql/sql_acl.cc 2006-09-29 12:37:29 +05:00
@@ -2644,11 +2644,7 @@ int mysql_grant(THD *thd, const char *db
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.488/sql/sql_parse.cc 2006-09-29 12:37:29 +05:00
+++ 1.489/sql/sql_parse.cc 2006-09-29 12:37:29 +05:00
@@ -146,7 +146,7 @@ static int get_or_create_user_conn(THD *
{
int return_val= 0;
uint temp_len, user_len;
- char temp_user[USERNAME_LENGTH+HOSTNAME_LENGTH+2];
+ char temp_user[USERNAME_BYTE_LENGTH+HOSTNAME_LENGTH+2];
struct user_conn *uc;
DBUG_ASSERT(user != 0);
@@ -640,7 +640,7 @@ static void reset_mqh(THD *thd, LEX_USER
{
USER_CONN *uc;
uint temp_len=lu->user.length+lu->host.length+2;
- char temp_user[USERNAME_LENGTH+HOSTNAME_LENGTH+2];
+ char temp_user[USERNAME_BYTE_LENGTH+HOSTNAME_LENGTH+2];
memcpy(temp_user,lu->user.str,lu->user.length);
memcpy(temp_user+lu->user.length+1,lu->host.str,lu->host.length);
@@ -1395,7 +1395,11 @@ bool dispatch_command(enum enum_server_c
{
char *db, *tbl_name;
uint db_len= *(uchar*) packet;
- if (db_len >= packet_length || db_len > NAME_LEN)
+ if (db_len >= packet_length ||
+ system_charset_info->cset->charpos(system_charset_info,
+ packet + 1,
+ packet + 1 + db_len,
+ USERNAME_LENGTH) < db_len)
{
send_error(thd, ER_UNKNOWN_COM_ERROR);
break;
@@ -1429,7 +1433,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);
--- 1.138/sql/table.cc 2006-09-29 12:37:29 +05:00
+++ 1.139/sql/table.cc 2006-09-29 12:37:29 +05:00
@@ -1427,7 +1427,7 @@ char *get_field(MEM_ROOT *mem, Field *fi
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;
@@ -1444,7 +1444,6 @@ bool check_db_name(char *name)
name+system_charset_info->mbmaxlen);
if (len)
{
- name_length++;
name += len;
continue;
}
@@ -1452,13 +1451,12 @@ bool check_db_name(char *name)
#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.50/sql/unireg.cc 2006-09-29 12:37:29 +05:00
+++ 1.51/sql/unireg.cc 2006-09-29 12:37:29 +05:00
@@ -190,13 +190,19 @@ bool mysql_create_frm(THD *thd, my_strin
goto err3;
{
- /* Unescape all UCS2 intervals: were escaped in pack_headers */
+ /*
+ Restore all UCS2 intervals.
+ HEX representation of them is not needed anymore.
+ */
List_iterator<create_field> it(create_fields);
create_field *field;
while ((field=it++))
{
- if (field->interval && field->charset->mbminlen > 1)
- unhex_type2(field->interval);
+ if (field->save_interval)
+ {
+ field->interval= field->save_interval;
+ field->save_interval= 0;
+ }
}
}
DBUG_RETURN(0);
@@ -452,18 +458,36 @@ static bool pack_header(uchar *forminfo,
reclength=(uint) (field->offset+ data_offset + length);
n_length+= (ulong) strlen(field->field_name)+1;
field->interval_id=0;
+ field->save_interval= 0;
if (field->interval)
{
uint old_int_count=int_count;
if (field->charset->mbminlen > 1)
{
- /* Escape UCS2 intervals using HEX notation */
+ /*
+ Escape UCS2 intervals using HEX notation to avoid
+ problems with delimiters between enum elements.
+ As the original representation is still needed in
+ the function make_empty_rec to create a record of
+ filled with default values it is saved in save_interval
+ The HEX representation is created from this copy.
+ */
+ field->save_interval= field->interval;
+ field->interval= (TYPELIB*) sql_alloc(sizeof(TYPELIB));
+ *field->interval= *field->save_interval;
+ field->interval->type_names=
+ (const char **) sql_alloc(sizeof(char*) *
+ (field->interval->count+1));
+ field->interval->type_names[field->interval->count]= 0;
+ field->interval->type_lengths=
+ (uint *) sql_alloc(sizeof(uint) * field->interval->count);
+
for (uint pos= 0; pos < field->interval->count; pos++)
{
char *dst;
- uint length= field->interval->type_lengths[pos], hex_length;
- const char *src= field->interval->type_names[pos];
+ uint length= field->save_interval->type_lengths[pos], hex_length;
+ const char *src= field->save_interval->type_names[pos];
const char *srcend= src + length;
hex_length= length * 2;
field->interval->type_lengths[pos]= hex_length;
@@ -730,7 +754,8 @@ static bool make_empty_rec(File file,enu
field->charset,
field->geom_type,
field->unireg_check,
- field->interval,
+ field->save_interval ? field->save_interval :
+ field->interval,
field->field_name,
&table);
--- 1.73/mysql-test/r/ctype_utf8.result 2006-09-29 12:37:29 +05:00
+++ 1.74/mysql-test/r/ctype_utf8.result 2006-09-29 12:37:29 +05:00
@@ -1415,15 +1415,3 @@ select a from t1 group by a;
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.75/mysql-test/t/ctype_utf8.test 2006-09-29 12:37:29 +05:00
+++ 1.76/mysql-test/t/ctype_utf8.test 2006-09-29 12:37:29 +05:00
@@ -1142,20 +1142,4 @@ explain select a from t1 group by a;
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
| Thread |
|---|
| • bk commit into 4.1 tree (holyfoot:1.2529) | holyfoot | 29 Sep |