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
5ab2d821
Commit
5ab2d821
authored
Nov 09, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/opt/bug32020/my51-bug31445
into polly.(none):/home/kaa/src/opt/mysql-5.1-opt
parents
8016268f
ccd87109
Changes
3
Show 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 @
5ab2d821
...
@@ -72,3 +72,8 @@ count(*)
...
@@ -72,3 +72,8 @@ count(*)
select count(*) from information_schema.USER_PRIVILEGES;
select count(*) from information_schema.USER_PRIVILEGES;
count(*)
count(*)
0
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 @
5ab2d821
...
@@ -122,3 +122,15 @@ select count(*) from information_schema.COLUMN_PRIVILEGES;
...
@@ -122,3 +122,15 @@ select count(*) from information_schema.COLUMN_PRIVILEGES;
select
count
(
*
)
from
information_schema
.
SCHEMA_PRIVILEGES
;
select
count
(
*
)
from
information_schema
.
SCHEMA_PRIVILEGES
;
select
count
(
*
)
from
information_schema
.
TABLE_PRIVILEGES
;
select
count
(
*
)
from
information_schema
.
TABLE_PRIVILEGES
;
select
count
(
*
)
from
information_schema
.
USER_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 @
5ab2d821
...
@@ -393,6 +393,11 @@ int mysql_create_function(THD *thd,udf_func *udf)
...
@@ -393,6 +393,11 @@ int mysql_create_function(THD *thd,udf_func *udf)
if
(
!
initialized
)
if
(
!
initialized
)
{
{
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
));
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
...
@@ -516,6 +521,9 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
...
@@ -516,6 +521,9 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
if
(
!
initialized
)
if
(
!
initialized
)
{
{
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
));
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
DBUG_RETURN
(
1
);
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