Below is the list of changes that have just been committed into a local
5.0 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-08 16:16:39+05:00, gluh@stripped +4 -0
after merge fix
sql/mysql_priv.h@stripped, 2006-09-08 16:16:35+05:00, gluh@stripped +2 -1
after merge fix
added charset parameter to check_string_length() function
sql/slave.h@stripped, 2006-09-08 16:16:35+05:00, gluh@stripped +1 -1
after merge fix
USERNAME_LENGTH const is changed to USERNAME_BYTE_LENGTH
sql/sql_parse.cc@stripped, 2006-09-08 16:16:35+05:00, gluh@stripped +6 -8
after merge fix
added charset parameter to check_string_length() function
sql/sql_yacc.yy@stripped, 2006-09-08 16:16:35+05:00, gluh@stripped +6 -4
after merge fix
added charset parameter to check_string_length() function
# 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.0
--- 1.408/sql/mysql_priv.h 2006-09-08 16:16:50 +05:00
+++ 1.409/sql/mysql_priv.h 2006-09-08 16:16:50 +05:00
@@ -566,7 +566,8 @@
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(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);
enum enum_mysql_completiontype {
ROLLBACK_RELEASE=-2, ROLLBACK=1, ROLLBACK_AND_CHAIN=7,
--- 1.571/sql/sql_parse.cc 2006-09-08 16:16:50 +05:00
+++ 1.572/sql/sql_parse.cc 2006-09-08 16:16:50 +05:00
@@ -7552,6 +7552,7 @@
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
@@ -7561,16 +7562,13 @@
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 (system_charset_info->cset->charpos(system_charset_info, str->str,
- str->str + str->length, max_length) >=
- str->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.484/sql/sql_yacc.yy 2006-09-08 16:16:50 +05:00
+++ 1.485/sql/sql_yacc.yy 2006-09-08 16:16:50 +05:00
@@ -7507,7 +7507,8 @@
$$->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
@@ -7517,9 +7518,10 @@
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
--- 1.95/sql/slave.h 2006-09-08 16:16:50 +05:00
+++ 1.96/sql/slave.h 2006-09-08 16:16:50 +05:00
@@ -406,7 +406,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_LENGTH+1];
+ char user[USERNAME_BYTE_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];
| Thread |
|---|
| • bk commit into 5.0 tree (gluh:1.2263) | gluh | 8 Sep |