summaryrefslogtreecommitdiff
path: root/mysql-test/t/view_grant.test
diff options
context:
space:
mode:
authorgkodinov@mysql.com <>2006-06-21 12:12:46 +0300
committergkodinov@mysql.com <>2006-06-21 12:12:46 +0300
commit75ca0554935b4e70394618da3de956fc27e894cf (patch)
tree4d1eaabc3133949024515c0746b67bb1c08977bd /mysql-test/t/view_grant.test
parentee2e2d0c6d46d0d58e4bcff0b4c8289882e254b4 (diff)
downloadmariadb-git-75ca0554935b4e70394618da3de956fc27e894cf.tar.gz
Bug #20482: failure on Create join view with sources views/tables in different
schemas The function check_one_table_access() called to check access to tables in SELECT/INSERT/UPDATE was doing additional checks/modifications that don't hold in the context of setup_tables_and_check_access(). That's why the check_one_table() was split into two : the functionality needed by setup_tables_and_check_access() into check_single_table_access() and the rest of the functionality stays in check_one_table_access() that is made to call the new check_single_table_access() function.
Diffstat (limited to 'mysql-test/t/view_grant.test')
-rw-r--r--mysql-test/t/view_grant.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index 4663a667d25..9d23bfa6197 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -807,3 +807,24 @@ SELECT * FROM v;
DROP VIEW v;
DROP TABLE t1;
USE test;
+
+#
+# BUG#20482: failure on Create join view with sources views/tables
+# in different schemas
+#
+--disable_warnings
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+--enable_warnings
+
+CREATE TABLE test1.t0 (a VARCHAR(20));
+CREATE TABLE test2.t1 (a VARCHAR(20));
+CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
+CREATE OR REPLACE VIEW test.v1 AS
+ SELECT ta.a AS col1, tb.a AS col2 FROM test2.t3 ta, test2.t1 tb;
+
+DROP VIEW test.v1;
+DROP VIEW test2.t3;
+DROP TABLE test2.t1, test1.t0;
+DROP DATABASE test2;
+DROP DATABASE test1;