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
8dacb206
Commit
8dacb206
authored
Mar 05, 2008
by
cmiller@zippy.cornsilk.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move test that has more to do with grants than DROP. We shouldn't have
grant warnings on embedded server.
parent
6217dd72
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
101 deletions
+101
-101
mysql-test/r/drop.result
mysql-test/r/drop.result
+0
-39
mysql-test/r/grant.result
mysql-test/r/grant.result
+39
-0
mysql-test/t/drop.test
mysql-test/t/drop.test
+0
-62
mysql-test/t/grant.test
mysql-test/t/grant.test
+62
-0
No files found.
mysql-test/r/drop.result
View file @
8dacb206
...
@@ -91,43 +91,4 @@ create table mysql_test.`#sql-347f_7` (f1 int);
...
@@ -91,43 +91,4 @@ create table mysql_test.`#sql-347f_7` (f1 int);
create table mysql_test.`#sql-347f_8` (f1 int);
create table mysql_test.`#sql-347f_8` (f1 int);
drop table mysql_test.`#sql-347f_8`;
drop table mysql_test.`#sql-347f_8`;
drop database mysql_test;
drop database mysql_test;
CREATE DATABASE dbbug33464;
CREATE USER 'userbug33464'@'localhost';
GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost';
userbug33464@localhost dbbug33464
DROP PROCEDURE IF EXISTS sp3;
DROP FUNCTION IF EXISTS fn1;
CREATE PROCEDURE sp3(v1 char(20))
BEGIN
SELECT * from dbbug33464.t6 where t6.f2= 'xyz';
END//
CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER
BEGIN
return 1;
END//
CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER
BEGIN
return 2;
END//
USE dbbug33464;
root@localhost dbbug33464
SELECT fn1();
fn1()
1
SELECT fn2();
fn2()
2
DROP USER 'userbug33464'@'localhost';
DROP FUNCTION fn1;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn1'
DROP FUNCTION fn2;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2'
DROP PROCEDURE sp3;
DROP USER 'userbug33464'@'localhost';
use test;
DROP DATABASE dbbug33464;
End of 5.1 tests
End of 5.1 tests
mysql-test/r/grant.result
View file @
8dacb206
...
@@ -1283,4 +1283,43 @@ CALL mysqltest1.test();
...
@@ -1283,4 +1283,43 @@ CALL mysqltest1.test();
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest1;
RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
CREATE DATABASE dbbug33464;
CREATE USER 'userbug33464'@'localhost';
GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost';
userbug33464@localhost dbbug33464
DROP PROCEDURE IF EXISTS sp3;
DROP FUNCTION IF EXISTS fn1;
CREATE PROCEDURE sp3(v1 char(20))
BEGIN
SELECT * from dbbug33464.t6 where t6.f2= 'xyz';
END//
CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER
BEGIN
return 1;
END//
CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER
BEGIN
return 2;
END//
USE dbbug33464;
root@localhost dbbug33464
SELECT fn1();
fn1()
1
SELECT fn2();
fn2()
2
DROP USER 'userbug33464'@'localhost';
DROP FUNCTION fn1;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn1'
DROP FUNCTION fn2;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2'
DROP PROCEDURE sp3;
DROP USER 'userbug33464'@'localhost';
use test;
DROP DATABASE dbbug33464;
End of 5.1 tests
End of 5.1 tests
mysql-test/t/drop.test
View file @
8dacb206
...
@@ -134,66 +134,4 @@ drop table mysql_test.`#sql-347f_8`;
...
@@ -134,66 +134,4 @@ drop table mysql_test.`#sql-347f_8`;
copy_file
$MYSQLTEST_VARDIR
/
master
-
data
/
mysql_test
/
t1
.
frm
$MYSQLTEST_VARDIR
/
master
-
data
/
mysql_test
/
#sql-347f_6.frm;
copy_file
$MYSQLTEST_VARDIR
/
master
-
data
/
mysql_test
/
t1
.
frm
$MYSQLTEST_VARDIR
/
master
-
data
/
mysql_test
/
#sql-347f_6.frm;
drop
database
mysql_test
;
drop
database
mysql_test
;
#
# Bug#33464: DROP FUNCTION caused a crash.
#
CREATE
DATABASE
dbbug33464
;
CREATE
USER
'userbug33464'
@
'localhost'
;
GRANT
CREATE
ROUTINE
ON
dbbug33464
.*
TO
'userbug33464'
@
'localhost'
;
--
replace_result
$MASTER_MYPORT
MYSQL_PORT
$MASTER_MYSOCK
MYSQL_SOCK
connect
(
connbug33464
,
localhost
,
userbug33464
,
,
dbbug33464
);
--
source
suite
/
funcs_1
/
include
/
show_connection
.
inc
--
disable_warnings
DROP
PROCEDURE
IF
EXISTS
sp3
;
DROP
FUNCTION
IF
EXISTS
fn1
;
--
enable_warnings
delimiter
//;
CREATE
PROCEDURE
sp3
(
v1
char
(
20
))
BEGIN
SELECT
*
from
dbbug33464
.
t6
where
t6
.
f2
=
'xyz'
;
END
//
delimiter
;
//
delimiter
//;
CREATE
FUNCTION
fn1
()
returns
char
(
50
)
SQL
SECURITY
INVOKER
BEGIN
return
1
;
END
//
delimiter
;
//
delimiter
//;
CREATE
FUNCTION
fn2
()
returns
char
(
50
)
SQL
SECURITY
DEFINER
BEGIN
return
2
;
END
//
delimiter
;
//
disconnect
connbug33464
;
# cleanup
connection
default
;
USE
dbbug33464
;
--
source
suite
/
funcs_1
/
include
/
show_connection
.
inc
SELECT
fn1
();
SELECT
fn2
();
--
error
0
,
ER_CANNOT_USER
DROP
USER
'userbug33464'
@
'localhost'
;
DROP
FUNCTION
fn1
;
DROP
FUNCTION
fn2
;
DROP
PROCEDURE
sp3
;
--
error
0
,
ER_CANNOT_USER
DROP
USER
'userbug33464'
@
'localhost'
;
use
test
;
DROP
DATABASE
dbbug33464
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
mysql-test/t/grant.test
View file @
8dacb206
...
@@ -1377,4 +1377,66 @@ RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
...
@@ -1377,4 +1377,66 @@ RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
FLUSH
PRIVILEGES
;
FLUSH
PRIVILEGES
;
#
# Bug#33464: DROP FUNCTION caused a crash.
#
CREATE
DATABASE
dbbug33464
;
CREATE
USER
'userbug33464'
@
'localhost'
;
GRANT
CREATE
ROUTINE
ON
dbbug33464
.*
TO
'userbug33464'
@
'localhost'
;
--
replace_result
$MASTER_MYPORT
MYSQL_PORT
$MASTER_MYSOCK
MYSQL_SOCK
connect
(
connbug33464
,
localhost
,
userbug33464
,
,
dbbug33464
);
--
source
suite
/
funcs_1
/
include
/
show_connection
.
inc
--
disable_warnings
DROP
PROCEDURE
IF
EXISTS
sp3
;
DROP
FUNCTION
IF
EXISTS
fn1
;
--
enable_warnings
delimiter
//;
CREATE
PROCEDURE
sp3
(
v1
char
(
20
))
BEGIN
SELECT
*
from
dbbug33464
.
t6
where
t6
.
f2
=
'xyz'
;
END
//
delimiter
;
//
delimiter
//;
CREATE
FUNCTION
fn1
()
returns
char
(
50
)
SQL
SECURITY
INVOKER
BEGIN
return
1
;
END
//
delimiter
;
//
delimiter
//;
CREATE
FUNCTION
fn2
()
returns
char
(
50
)
SQL
SECURITY
DEFINER
BEGIN
return
2
;
END
//
delimiter
;
//
disconnect
connbug33464
;
# cleanup
connection
default
;
USE
dbbug33464
;
--
source
suite
/
funcs_1
/
include
/
show_connection
.
inc
SELECT
fn1
();
SELECT
fn2
();
--
error
0
,
ER_CANNOT_USER
DROP
USER
'userbug33464'
@
'localhost'
;
DROP
FUNCTION
fn1
;
DROP
FUNCTION
fn2
;
DROP
PROCEDURE
sp3
;
--
error
0
,
ER_CANNOT_USER
DROP
USER
'userbug33464'
@
'localhost'
;
use
test
;
DROP
DATABASE
dbbug33464
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
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