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
c316933e
Commit
c316933e
authored
Sep 27, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional 'after merge' fix
parent
c1e264a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+5
-6
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-3
No files found.
sql/mysql_priv.h
View file @
c316933e
...
...
@@ -567,7 +567,7 @@ 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
(
CHARSET_INFO
*
cs
,
LEX_STRING
*
str
,
bool
check_string_length
(
LEX_STRING
*
str
,
const
char
*
err_msg
,
uint
max_length
);
enum
enum_mysql_completiontype
{
...
...
sql/sql_parse.cc
View file @
c316933e
...
...
@@ -7565,7 +7565,6 @@ 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
...
...
@@ -7575,13 +7574,13 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user)
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
;
}
sql/sql_yacc.yy
View file @
c316933e
...
...
@@ -7523,7 +7523,7 @@ user:
$$->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;
}
...
...
@@ -7534,9 +7534,9 @@ user:
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;
}
...
...
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