Below is the list of changes that have just been committed into a local
5.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-28 14:09:31+05:00, gluh@gluh.(none) +21 -0
Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into mysql.com:/home/gluh/MySQL/Merge/5.1
MERGE: 1.1810.1697.165
include/mysql_com.h@stripped, 2006-09-28 13:48:53+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.100.1.11
mysql-test/r/ctype_utf8.result@stripped, 2006-09-28 13:48:53+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.85.1.13
mysql-test/r/func_time.result@stripped, 2006-09-28 13:48:53+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.47.1.22
mysql-test/r/query_cache.result@stripped, 2006-09-28 13:48:53+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.65.1.10
mysql-test/r/type_date.result@stripped, 2006-09-28 13:48:53+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.13.1.2
mysql-test/r/view.result@stripped, 2006-09-28 13:48:54+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.138.1.38
mysql-test/t/ctype_utf8.test@stripped, 2006-09-28 13:48:54+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.84.1.7
mysql-test/t/func_time.test@stripped, 2006-09-28 13:48:54+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.41.1.16
mysql-test/t/view.test@stripped, 2006-09-28 13:48:54+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.126.1.37
sql-common/client.c@stripped, 2006-09-28 13:48:56+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.83.1.18
sql/item_cmpfunc.cc@stripped, 2006-09-28 13:48:54+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.187.1.34
sql/mysql_priv.h@stripped, 2006-09-28 13:48:54+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.290.1.121
sql/slave.h@stripped, 2006-09-28 13:48:54+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.85.1.12
sql/sp.cc@stripped, 2006-09-28 14:09:25+05:00, gluh@gluh.(none) +2 -3
manual merge
MERGE: 1.82.1.36
sql/sp_head.cc@stripped, 2006-09-28 14:09:25+05:00, gluh@gluh.(none) +0 -1
manual merge
MERGE: 1.200.1.24
sql/sql_acl.cc@stripped, 2006-09-28 13:48:55+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.128.1.82
sql/sql_class.h@stripped, 2006-09-28 14:09:26+05:00, gluh@gluh.(none) +0 -1
manual merge
MERGE: 1.230.1.70
sql/sql_parse.cc@stripped, 2006-09-28 13:48:55+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.426.1.154
sql/sql_repl.h@stripped, 2006-09-28 13:48:56+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.37.1.2
sql/sql_yacc.yy@stripped, 2006-09-28 13:48:56+05:00, gluh@gluh.(none) +0 -0
Auto merged
MERGE: 1.371.1.119
sql/table.cc@stripped, 2006-09-28 14:09:26+05:00, gluh@gluh.(none) +0 -1
manual merge
MERGE: 1.160.1.73
# 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/5.1/RESYNC
--- 1.114/include/mysql_com.h 2006-09-28 14:09:48 +05:00
+++ 1.115/include/mysql_com.h 2006-09-28 14:09:48 +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
/*
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
@@ -36,7 +33,7 @@
MySQL standard format:
user_name_part@host_name_part\0
*/
-#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_BYTE_LENGTH + 2
+#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2
#define LOCAL_HOST "localhost"
#define LOCAL_HOST_NAMEDPIPE "."
--- 1.441/sql/mysql_priv.h 2006-09-28 14:09:48 +05:00
+++ 1.442/sql/mysql_priv.h 2006-09-28 14:09:48 +05:00
@@ -588,7 +588,7 @@
LEX_USER *create_default_definer(THD *thd);
LEX_USER *create_definer(THD *thd, LEX_STRING *user_name, LEX_STRING *host_name);
LEX_USER *get_current_user(THD *thd, LEX_USER *user);
-bool check_string_length(CHARSET_INFO *cs, LEX_STRING *str,
+bool check_string_length(LEX_STRING *str,
const char *err_msg, uint max_length);
enum enum_mysql_completiontype {
--- 1.213/sql/sql_acl.cc 2006-09-28 14:09:48 +05:00
+++ 1.214/sql/sql_acl.cc 2006-09-28 14:09:48 +05:00
@@ -169,7 +169,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;
@@ -312,7 +312,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");
@@ -2401,7 +2401,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;
@@ -3308,7 +3308,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");
@@ -3372,7 +3372,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 &
@@ -4012,7 +4012,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.582/sql/sql_parse.cc 2006-09-28 14:09:48 +05:00
+++ 1.583/sql/sql_parse.cc 2006-09-28 14:09:48 +05:00
@@ -1047,8 +1047,8 @@
char *passwd= strend(user)+1;
uint user_len= passwd - 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;
/*
@@ -1724,7 +1724,7 @@
password. New clients send the size (1 byte) + string (not null
terminated, so also '\0' for empty string).
*/
- char db_buff[NAME_BYTE_LEN+1]; // buffer to store db in utf8
+ char db_buff[NAME_LEN+1]; // buffer to store db in utf8
char *db= passwd;
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
*passwd++ : strlen(passwd);
@@ -7783,7 +7783,6 @@
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
@@ -7793,13 +7792,13 @@
TRUE the passed string is longer than max_length
*/
-bool check_string_length(CHARSET_INFO *cs, LEX_STRING *str,
- const char *err_msg, uint max_length)
+bool check_string_length(LEX_STRING *str, const char *err_msg,
+ uint max_length)
{
- if (cs->cset->charpos(cs, str->str, str->str + str->length,
- max_length) >= str->length)
- return FALSE;
+ if (str->length <= max_length)
+ return FALSE;
my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_length);
+
return TRUE;
}
--- 1.502/sql/sql_yacc.yy 2006-09-28 14:09:48 +05:00
+++ 1.503/sql/sql_yacc.yy 2006-09-28 14:09:48 +05:00
@@ -9237,7 +9237,7 @@
$$->host.str= (char *) "%";
$$->host.length= 1;
- if (check_string_length(system_charset_info, &$$->user,
+ if (check_string_length(&$$->user,
ER(ER_USERNAME), USERNAME_LENGTH))
YYABORT;
}
@@ -9248,9 +9248,9 @@
YYABORT;
$$->user = $1; $$->host=$3;
- if (check_string_length(system_charset_info, &$$->user,
+ if (check_string_length(&$$->user,
ER(ER_USERNAME), USERNAME_LENGTH) ||
- check_string_length(&my_charset_latin1, &$$->host,
+ check_string_length(&$$->host,
ER(ER_HOSTNAME), HOSTNAME_LENGTH))
YYABORT;
}
--- 1.246/sql/table.cc 2006-09-28 14:09:48 +05:00
+++ 1.247/sql/table.cc 2006-09-28 14:09:48 +05:00
@@ -2257,7 +2257,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;
@@ -2282,10 +2282,9 @@
#else
last_char_is_space= *name==' ';
#endif
- name_length++;
name++;
}
- return last_char_is_space || name_length > NAME_LEN;
+ return last_char_is_space || (uint) (name - start) > NAME_LEN;
}
--- 1.101/mysql-test/r/ctype_utf8.result 2006-09-28 14:09:48 +05:00
+++ 1.102/mysql-test/r/ctype_utf8.result 2006-09-28 14:09:48 +05:00
@@ -1340,19 +1340,6 @@
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;
-use test;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
--- 1.92/mysql-test/t/ctype_utf8.test 2006-09-28 14:09:48 +05:00
+++ 1.93/mysql-test/t/ctype_utf8.test 2006-09-28 14:09:48 +05:00
@@ -1069,23 +1069,6 @@
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;
-use test;
-
# End of 4.1 tests
#
--- 1.111/sql-common/client.c 2006-09-28 14:09:48 +05:00
+++ 1.112/sql-common/client.c 2006-09-28 14:09:48 +05:00
@@ -1753,7 +1753,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;
@@ -2212,7 +2212,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);
@@ -2242,7 +2242,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;
}
--- 1.121/sql/sp.cc 2006-09-28 14:09:48 +05:00
+++ 1.122/sql/sp.cc 2006-09-28 14:09:48 +05:00
@@ -406,16 +406,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];
- LEX_STRING definer_user_name= { definer_user_name_holder,
- USERNAME_BYTE_LENGTH };
+
+ char definer_user_name_holder[USERNAME_LENGTH + 1];
+ LEX_STRING_WITH_INIT definer_user_name(definer_user_name_holder,
+ USERNAME_LENGTH);
char definer_host_name_holder[HOSTNAME_LENGTH + 1];
LEX_STRING definer_host_name= { definer_host_name_holder, HOSTNAME_LENGTH };
@@ -514,7 +514,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");
--- 1.238/sql/sp_head.cc 2006-09-28 14:09:48 +05:00
+++ 1.239/sql/sp_head.cc 2006-09-28 14:09:48 +05:00
@@ -962,7 +962,7 @@
sp_head::execute(THD *thd)
{
DBUG_ENTER("sp_head::execute");
- 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;
sp_rcontext *ctx;
@@ -2010,8 +2010,8 @@
void
sp_head::set_definer(const char *definer, uint definerlen)
{
- char user_name_holder[USERNAME_BYTE_LENGTH + 1];
- LEX_STRING user_name= { user_name_holder, USERNAME_BYTE_LENGTH };
+ char user_name_holder[USERNAME_LENGTH + 1];
+ LEX_STRING_WITH_INIT user_name(user_name_holder, USERNAME_LENGTH);
char host_name_holder[HOSTNAME_LENGTH + 1];
LEX_STRING host_name= { host_name_holder, HOSTNAME_LENGTH };
--- 1.98/sql/slave.h 2006-09-28 14:09:48 +05:00
+++ 1.99/sql/slave.h 2006-09-28 14:09:48 +05:00
@@ -152,7 +152,7 @@
/* the variables below are needed because we can change masters on the fly */
char master_log_name[FN_REFLEN];
char host[HOSTNAME_LENGTH+1];
- char user[USERNAME_BYTE_LENGTH+1];
+ char user[USERNAME_LENGTH+1];
char password[MAX_PASSWORD_LENGTH+1];
my_bool ssl; // enables use of SSL connection if true
char ssl_ca[FN_REFLEN], ssl_capath[FN_REFLEN], ssl_cert[FN_REFLEN];
--- 1.41/sql/sql_repl.h 2006-09-28 14:09:48 +05:00
+++ 1.42/sql/sql_repl.h 2006-09-28 14:09:48 +05:00
@@ -24,7 +24,7 @@
uint32 server_id;
uint32 rpl_recovery_rank, master_id;
char host[HOSTNAME_LENGTH+1];
- char user[USERNAME_BYTE_LENGTH+1];
+ char user[USERNAME_LENGTH+1];
char password[MAX_PASSWORD_LENGTH+1];
uint16 port;
THD* thd;
| Thread |
|---|
| • bk commit into 5.1 tree (gluh:1.2328) | gluh | 28 Sep |