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
ccd87109
Commit
ccd87109
authored
Nov 09, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/opt/bug32020/my50-bug31445
into polly.(none):/home/kaa/src/opt/bug32020/my51-bug31445
parents
3ebb915d
e703c6a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
mysql-test/r/skip_grants.result
mysql-test/r/skip_grants.result
+5
-0
mysql-test/t/skip_grants.test
mysql-test/t/skip_grants.test
+12
-0
sql/sql_udf.cc
sql/sql_udf.cc
+10
-2
No files found.
mysql-test/r/skip_grants.result
View file @
ccd87109
...
...
@@ -72,3 +72,8 @@ count(*)
select count(*) from information_schema.USER_PRIVILEGES;
count(*)
0
CREATE FUNCTION a RETURNS STRING SONAME '';
ERROR HY000: Can't initialize function 'a'; UDFs are unavailable with the --skip-grant-tables option
DROP FUNCTION a;
ERROR 42000: FUNCTION test.a does not exist
End of 5.0 tests
mysql-test/t/skip_grants.test
View file @
ccd87109
...
...
@@ -122,3 +122,15 @@ select count(*) from information_schema.COLUMN_PRIVILEGES;
select
count
(
*
)
from
information_schema
.
SCHEMA_PRIVILEGES
;
select
count
(
*
)
from
information_schema
.
TABLE_PRIVILEGES
;
select
count
(
*
)
from
information_schema
.
USER_PRIVILEGES
;
#
# Bug #32020: loading udfs while --skip-grant-tables is enabled causes out of
# memory errors
#
--
error
ER_CANT_INITIALIZE_UDF
CREATE
FUNCTION
a
RETURNS
STRING
SONAME
''
;
--
error
ER_SP_DOES_NOT_EXIST
DROP
FUNCTION
a
;
--
echo
End
of
5.0
tests
sql/sql_udf.cc
View file @
ccd87109
...
...
@@ -393,7 +393,12 @@ int mysql_create_function(THD *thd,udf_func *udf)
if
(
!
initialized
)
{
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
if
(
opt_noacl
)
my_error
(
ER_CANT_INITIALIZE_UDF
,
MYF
(
0
),
udf
->
name
.
str
,
"UDFs are unavailable with the --skip-grant-tables option"
);
else
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
DBUG_RETURN
(
1
);
}
...
...
@@ -516,7 +521,10 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
if
(
!
initialized
)
{
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
if
(
opt_noacl
)
my_error
(
ER_FUNCTION_NOT_DEFINED
,
MYF
(
0
),
udf_name
->
str
);
else
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
DBUG_RETURN
(
1
);
}
...
...
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