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
a07bbd78
Commit
a07bbd78
authored
Jan 19, 2006
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-review fixes (BUG#15658).
parent
d894e304
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
sql/sp_head.cc
sql/sp_head.cc
+11
-11
sql/sp_head.h
sql/sp_head.h
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
sql/sp_head.cc
View file @
a07bbd78
...
...
@@ -387,19 +387,19 @@ sp_name_current_db_new(THD *thd, LEX_STRING name)
}
/*
*
Check that the name 'ident' is ok. It's assumed to be an 'ident'
*
from the parser, so we only have to check length and trailing spaces.
*
The former is a standard requirement (and 'show status' assumes a
*
non-empty name), the latter is a mysql:ism as trailing spaces are
*
removed by get_field().
*
*
RETURN
*
TRUE - bad name
*
FALSE - name is ok
*/
Check that the name 'ident' is ok. It's assumed to be an 'ident'
from the parser, so we only have to check length and trailing spaces.
The former is a standard requirement (and 'show status' assumes a
non-empty name), the latter is a mysql:ism as trailing spaces are
removed by get_field().
RETURN
TRUE - bad name
FALSE - name is ok
*/
bool
sp_name_check
(
LEX_STRING
ident
)
check_routine_name
(
LEX_STRING
ident
)
{
return
(
!
ident
.
str
||
!
ident
.
str
[
0
]
||
ident
.
str
[
ident
.
length
-
1
]
==
' '
);
}
...
...
sql/sp_head.h
View file @
a07bbd78
...
...
@@ -104,7 +104,7 @@ sp_name *
sp_name_current_db_new
(
THD
*
thd
,
LEX_STRING
name
);
bool
sp_name_check
(
LEX_STRING
name
);
check_routine_name
(
LEX_STRING
name
);
class
sp_head
:
private
Query_arena
{
...
...
sql/sql_yacc.yy
View file @
a07bbd78
...
...
@@ -1293,7 +1293,7 @@ sp_name:
my_error(ER_WRONG_DB_NAME, MYF(0), $1.str);
YYABORT;
}
if (
sp_name_check
($3))
if (
check_routine_name
($3))
{
my_error(ER_SP_WRONG_NAME, MYF(0), $3.str);
YYABORT;
...
...
@@ -1303,7 +1303,7 @@ sp_name:
}
| ident
{
if (
sp_name_check
($1))
if (
check_routine_name
($1))
{
my_error(ER_SP_WRONG_NAME, MYF(0), $1.str);
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