Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a3300c39
Commit
a3300c39
authored
Sep 08, 2006
by
gluh@mysql.com/gluh.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fix
parent
e2684ad5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
14 deletions
+15
-14
sql/mysql_priv.h
sql/mysql_priv.h
+2
-1
sql/slave.h
sql/slave.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+6
-8
sql/sql_yacc.yy
sql/sql_yacc.yy
+6
-4
No files found.
sql/mysql_priv.h
View file @
a3300c39
...
...
@@ -566,7 +566,8 @@ void get_default_definer(THD *thd, LEX_USER *definer);
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
,
...
...
sql/slave.h
View file @
a3300c39
...
...
@@ -406,7 +406,7 @@ typedef struct st_master_info
/* 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
];
...
...
sql/sql_parse.cc
View file @
a3300c39
...
...
@@ -7552,6 +7552,7 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user)
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 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user)
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
;
}
sql/sql_yacc.yy
View file @
a3300c39
...
...
@@ -7507,7 +7507,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
...
...
@@ -7517,9 +7518,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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment