NULL db_datadict v_granted_glob /* ALGORITHM=UNDEFINED */ select `db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER
NULL db_datadict v_granted_to_1 /* ALGORITHM=UNDEFINED */ select `db_datadict`.`t1`.`f1` AS `f1`,`db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER
def db_datadict v_granted_glob select `db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def db_datadict v_granted_to_1 select `db_datadict`.`t1`.`f1` AS `f1`,`db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
connect testuser1, localhost, testuser1, , test;
SELECT * FROM information_schema.views
WHERE table_schema = 'db_datadict' ORDER BY table_name;
def test t1_view select distinct `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test t1_view1 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci MERGE
def test t1_view2 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci TEMPTABLE
DROP VIEW test.t1_view1;
DROP VIEW test.t1_view2;
SELECT table_name,definer FROM information_schema.views
WHERE table_name = 't1_view';
table_name definer
...
...
@@ -148,7 +166,7 @@ ORDER BY table_schema,table_name;
table_schema table_name
test t1_view
RENAME TABLE test.t1_view TO db_datadict.t1_view;
ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed.
ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed
DROP VIEW test.t1_view;
CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table;
SELECT table_schema,table_name FROM information_schema.views
...
...
@@ -189,8 +207,6 @@ WHERE table_name LIKE 't1_%'
ORDER BY table_name;
table_name
t1_view
Warnings:
Warning 1356 View 'db_datadict.t1_view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them