diff options
author | anozdrin@mysql.com <> | 2006-03-07 14:28:09 +0300 |
---|---|---|
committer | anozdrin@mysql.com <> | 2006-03-07 14:28:09 +0300 |
commit | d9d4dc5ef81e33c9006323a4def809eccb953a82 (patch) | |
tree | f377d746ddd3a559f6c8a1d2237fbeb30cd08efa /mysql-test/t/skip_grants.test | |
parent | 647a9406493b36bcb7098a500b6ee51656702473 (diff) | |
parent | c4cbe46bc73b680532f8a6cf2dff20f0e7afa341 (diff) | |
download | mariadb-git-d9d4dc5ef81e33c9006323a4def809eccb953a82.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.0-rt
Diffstat (limited to 'mysql-test/t/skip_grants.test')
-rw-r--r-- | mysql-test/t/skip_grants.test | 53 |
1 files changed, 45 insertions, 8 deletions
diff --git a/mysql-test/t/skip_grants.test b/mysql-test/t/skip_grants.test index 27220c9b507..93e052d8c71 100644 --- a/mysql-test/t/skip_grants.test +++ b/mysql-test/t/skip_grants.test @@ -9,14 +9,6 @@ drop procedure if exists f1; use test; # -# test that we can create VIEW if privileges check switched off -# -create table t1 (field1 INT); --- error ER_MALFORMED_DEFINER -CREATE VIEW v1 AS SELECT field1 FROM t1; -drop table t1; - -# # Test that we can create and drop procedure without warnings # see bug#9993 # @@ -33,3 +25,48 @@ drop table t1; # BUG#17595: DROP FUNCTION IF EXISTS f1 crashes server drop function if exists f1; + +# +# BUG#16777: Can not create trigger nor view w/o definer if --skip-grant-tables +# specified +# +# Also, a test that we can create VIEW if privileges check switched off has +# been moved here. +# + +# Prepare. + +--disable_warnings + +DROP VIEW IF EXISTS v1; +DROP VIEW IF EXISTS v2; + +DROP TABLE IF EXISTS t1; + +--enable_warnings + +# Test case. + +CREATE TABLE t1(c INT); + +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 + FOR EACH ROW + SET @a = 1; + +CREATE VIEW v1 AS SELECT * FROM t1; + +CREATE DEFINER=a@b TRIGGER ti_ai AFTER INSERT ON t1 + FOR EACH ROW + SET @b = 1; + +CREATE DEFINER=a@b VIEW v2 AS SELECT * FROM t1; + +# Cleanup. + +DROP TRIGGER t1_bi; +DROP TRIGGER ti_ai; + +DROP VIEW v1; +DROP VIEW v2; + +DROP TABLE t1; |