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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6320cded
Commit
6320cded
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/mysql-5.0-opt
parents
00e897ac
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 @
6320cded
...
...
@@ -70,3 +70,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 @
6320cded
...
...
@@ -116,3 +116,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 @
6320cded
...
...
@@ -410,7 +410,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
);
}
...
...
@@ -514,7 +519,10 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
DBUG_ENTER
(
"mysql_drop_function"
);
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
);
}
rw_wrlock
(
&
THR_LOCK_udf
);
...
...
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