diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2007-03-29 17:27:42 +0300 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2007-03-29 17:27:42 +0300 |
commit | 374718ff456af3c210df6b4638b2a43b89b9762a (patch) | |
tree | 94d5a320e9c08b8f33e5b1e51f794fe67b8c9cc7 /mysql-test/r/sp-security.result | |
parent | 4bcc759f71bf256f20180b5e585b726a2eb1583d (diff) | |
parent | 00aaa9a3d482f726d903489ad142b2ddccceaf8a (diff) | |
download | mariadb-git-374718ff456af3c210df6b4638b2a43b89b9762a.tar.gz |
Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
BitKeeper/deleted/.del-my_lread.c:
Auto merged
BitKeeper/deleted/.del-my_lwrite.c:
Auto merged
BitKeeper/deleted/.del-raid.cc~488f5fa6538394e1:
Auto merged
BitKeeper/deleted/.del-raid.h~2d2503a66b128ac6:
Auto merged
client/mysqldump.c:
Auto merged
extra/perror.c:
Auto merged
include/my_sys.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/libmysqld.c:
Auto merged
mysql-test/r/mysqlbinlog2.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysys/default.c:
Auto merged
mysys/hash.c:
Auto merged
mysys/mf_iocache.c:
Auto merged
mysys/mf_keycache.c:
Auto merged
mysys/my_alloc.c:
Auto merged
mysys/my_dup.c:
Auto merged
mysys/my_getwd.c:
Auto merged
mysys/my_handler.c:
Auto merged
mysys/my_lib.c:
Auto merged
mysys/my_malloc.c:
Auto merged
mysys/my_pread.c:
Auto merged
mysys/my_read.c:
Auto merged
mysys/my_seek.c:
Auto merged
mysys/my_static.c:
Auto merged
mysys/safemalloc.c:
Auto merged
mysys/thr_alarm.c:
Auto merged
mysys/typelib.c:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/strfunc.cc:
Auto merged
sql/table.cc:
Auto merged
sql/tztime.cc:
Auto merged
sql/unireg.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/heap/_check.c:
Auto merged
storage/heap/hp_delete.c:
Auto merged
storage/heap/hp_hash.c:
Auto merged
storage/heap/hp_open.c:
Auto merged
storage/heap/hp_rkey.c:
Auto merged
storage/heap/hp_rrnd.c:
Auto merged
storage/heap/hp_write.c:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/myisam/mi_close.c:
Auto merged
storage/myisam/mi_delete.c:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_keycache.c:
Auto merged
storage/myisam/mi_page.c:
Auto merged
storage/myisam/mi_statrec.c:
Auto merged
storage/myisam/myisamchk.c:
Auto merged
storage/myisammrg/myrg_extra.c:
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/grant.result:
Merged from 5.0
mysql-test/r/sp.result:
Merged from 5.0
mysql-test/r/sp_trans.result:
Merged from 5.0
mysql-test/t/mysqlbinlog2.test:
Merged from 5.0
mysys/thr_lock.c:
Merged from 5.0
sql/ha_ndbcluster.cc:
Merged from 5.0
sql/log.cc:
Merged from 5.0
sql/mysql_priv.h:
Merged from 5.0
sql/mysqld.cc:
Merged from 5.0
sql/set_var.cc:
Merged from 5.0
sql/sql_db.cc:
Merged from 5.0
sql/sql_insert.cc:
Merged from 5.0
sql/sql_parse.cc:
Merged from 5.0
sql/sql_show.cc:
Merged from 5.0
sql/sql_update.cc:
Merged from 5.0
Diffstat (limited to 'mysql-test/r/sp-security.result')
-rw-r--r-- | mysql-test/r/sp-security.result | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index b2fdf6a864e..7315ef40083 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -8,22 +8,29 @@ create procedure db1_secret.dummy() begin end; drop procedure db1_secret.dummy; use db1_secret; create table t1 ( u varchar(64), i int ); +insert into t1 values('test', 0); create procedure stamp(i int) insert into db1_secret.t1 values (user(), i); show procedure status like 'stamp'; Db Name Type Definer Modified Created Security_type Comment db1_secret stamp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER -create function db() returns varchar(64) return database(); +create function db() returns varchar(64) +begin +declare v varchar(64); +select u into v from t1 limit 1; +return v; +end| show function status like 'db'; Db Name Type Definer Modified Created Security_type Comment db1_secret db FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER call stamp(1); select * from t1; u i +test 0 root@localhost 1 select db(); db() -db1_secret +test grant execute on procedure db1_secret.stamp to user1@'%'; grant execute on function db1_secret.db to user1@'%'; grant execute on procedure db1_secret.stamp to ''@'%'; @@ -31,25 +38,34 @@ grant execute on function db1_secret.db to ''@'%'; call db1_secret.stamp(2); select db1_secret.db(); db1_secret.db() -db1_secret +test select * from db1_secret.t1; ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1' create procedure db1_secret.dummy() begin end; ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret' drop procedure db1_secret.dummy; ERROR 42000: PROCEDURE db1_secret.dummy does not exist +drop procedure db1_secret.stamp; +ERROR 42000: alter routine command denied to user 'user1'@'localhost' for routine 'db1_secret.stamp' +drop function db1_secret.db; +ERROR 42000: alter routine command denied to user 'user1'@'localhost' for routine 'db1_secret.db' call db1_secret.stamp(3); select db1_secret.db(); db1_secret.db() -db1_secret +test select * from db1_secret.t1; ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1' create procedure db1_secret.dummy() begin end; ERROR 42000: Access denied for user ''@'%' to database 'db1_secret' drop procedure db1_secret.dummy; ERROR 42000: PROCEDURE db1_secret.dummy does not exist +drop procedure db1_secret.stamp; +ERROR 42000: alter routine command denied to user ''@'%' for routine 'db1_secret.stamp' +drop function db1_secret.db; +ERROR 42000: alter routine command denied to user ''@'%' for routine 'db1_secret.db' select * from t1; u i +test 0 root@localhost 1 user1@localhost 2 anon@localhost 3 @@ -64,21 +80,22 @@ db1_secret db FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 IN call stamp(4); select * from t1; u i +test 0 root@localhost 1 user1@localhost 2 anon@localhost 3 root@localhost 4 select db(); db() -db1_secret +test call db1_secret.stamp(5); -ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret' +ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 't1' select db1_secret.db(); -ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret' +ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1' call db1_secret.stamp(6); -ERROR 42000: Access denied for user ''@'%' to database 'db1_secret' +ERROR 42000: INSERT command denied to user ''@'localhost' for table 't1' select db1_secret.db(); -ERROR 42000: Access denied for user ''@'%' to database 'db1_secret' +ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1' drop database if exists db2; create database db2; use db2; |