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
aaad9172
Commit
aaad9172
authored
Nov 23, 2004
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
parents
fed5f621
43aefd66
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
sql/sp.cc
sql/sp.cc
+2
-1
sql/sql_parse.cc
sql/sql_parse.cc
+19
-20
No files found.
sql/sp.cc
View file @
aaad9172
...
...
@@ -1153,7 +1153,6 @@ sp_change_db(THD *thd, char *name, bool no_access_check)
int
length
,
db_length
;
char
*
dbname
=
my_strdup
((
char
*
)
name
,
MYF
(
MY_WME
));
char
path
[
FN_REFLEN
];
ulong
db_access
;
HA_CREATE_INFO
create
;
DBUG_ENTER
(
"sp_change_db"
);
DBUG_PRINT
(
"enter"
,
(
"db: %s, no_access_check: %d"
,
name
,
no_access_check
));
...
...
@@ -1174,6 +1173,8 @@ sp_change_db(THD *thd, char *name, bool no_access_check)
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if
(
!
no_access_check
)
{
ulong
db_access
;
if
(
test_all_bits
(
thd
->
master_access
,
DB_ACLS
))
db_access
=
DB_ACLS
;
else
...
...
sql/sql_parse.cc
View file @
aaad9172
...
...
@@ -3339,16 +3339,15 @@ create_error:
}
case
SQLCOM_CREATE_FUNCTION
:
// UDF function
{
sp_head
*
sph
;
if
(
check_access
(
thd
,
INSERT_ACL
,
"mysql"
,
0
,
1
,
0
))
break
;
#ifdef HAVE_DLOPEN
if
(
(
sph
=
sp_find_function
(
thd
,
lex
->
spname
)
))
if
(
sp_find_function
(
thd
,
lex
->
spname
))
{
my_error
(
ER_UDF_EXISTS
,
MYF
(
0
),
lex
->
spname
->
m_name
.
str
);
goto
error
;
}
if
(
!
(
res
=
mysql_create_function
(
thd
,
&
lex
->
udf
)))
if
(
!
(
res
=
mysql_create_function
(
thd
,
&
lex
->
udf
)))
send_ok
(
thd
);
#else
res
=
TRUE
;
...
...
@@ -3800,19 +3799,19 @@ create_error:
else
sp
=
sp_find_function
(
thd
,
lex
->
spname
);
mysql_reset_errors
(
thd
);
if
(
!
sp
)
result
=
SP_KEY_NOT_FOUND
;
else
if
(
sp
)
{
if
(
check_sp_definer_access
(
thd
,
sp
))
goto
error
;
if
(
lex
->
sql_command
==
SQLCOM_DROP_PROCEDURE
)
result
=
sp_drop_procedure
(
thd
,
lex
->
spname
);
else
{
result
=
sp_drop_function
(
thd
,
lex
->
spname
);
}
else
{
#ifdef HAVE_DLOPEN
if
(
result
==
SP_KEY_NOT_FOUND
)
if
(
lex
->
sql_command
==
SQLCOM_DROP_FUNCTION
)
{
udf_func
*
udf
=
find_udf
(
lex
->
spname
->
m_name
.
str
,
lex
->
spname
->
m_name
.
length
);
...
...
@@ -3820,7 +3819,7 @@ create_error:
{
if
(
check_access
(
thd
,
DELETE_ACL
,
"mysql"
,
0
,
1
,
0
))
goto
error
;
if
(
!
(
res
=
mysql_drop_function
(
thd
,
&
lex
->
spname
->
m_name
)))
if
(
!
(
res
=
mysql_drop_function
(
thd
,
&
lex
->
spname
->
m_name
)))
{
send_ok
(
thd
);
break
;
...
...
@@ -3828,7 +3827,7 @@ create_error:
}
}
#endif
}
result
=
SP_KEY_NOT_FOUND
;
}
res
=
result
;
switch
(
result
)
...
...
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