diff options
author | unknown <bell@sanja.is.com.ua> | 2004-04-07 15:23:05 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-04-07 15:23:05 +0300 |
commit | 0948f9769b3e3da2e064e65015b86644af4acd78 (patch) | |
tree | c7d0df7f0334621904d6713b3ea5f4ba1c9cefbe /mysql-test/t/show_check.test | |
parent | 08594c4795d9e673f8f514142489ce01954deba5 (diff) | |
parent | 91fb27a3ca13beffcfec0fef93f12c580bad260f (diff) | |
download | mariadb-git-0948f9769b3e3da2e064e65015b86644af4acd78.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-ps3-4.1
mysql-test/r/union.result:
Auto merged
sql/item.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r-- | mysql-test/t/show_check.test | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 638626a7456..b0307af19bb 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -256,3 +256,51 @@ delete from t3 where a=5; show table status; drop table t1, t2, t3; + +# +# Test for bug #3342 SHOW CREATE DATABASE seems to require DROP privilege +# + +create database test_$1; +show create database test_$1; +create table test_$1.t1(a int); +insert into test_$1.t1 values(1); +grant select on `test_$1`.* to mysqltest_1@localhost; +grant usage on `test_$1`.* to mysqltest_2@localhost; +grant drop on `test_$1`.* to mysqltest_3@localhost; + +connect (con1,localhost,mysqltest_1,,test_$1); +connection con1; +select * from t1; +show create database test_$1; +--error 1044 +drop table t1; +--error 1044 +drop database test_$1; + +connect (con2,localhost,mysqltest_2,,test); +connection con2; +--error 1044 +select * from test_$1.t1; +--error 1044 +show create database test_$1; +--error 1044 +drop table test_$1.t1; +--error 1044 +drop database test_$1; + +connect (con3,localhost,mysqltest_3,,test); +connection con3; +--error 1044 +select * from test_$1.t1; +--error 1044 +show create database test_$1; +drop table test_$1.t1; +drop database test_$1; + +connection default; +delete from mysql.user +where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +delete from mysql.db +where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +flush privileges; |