diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/view_source.result | 48 | ||||
-rw-r--r-- | mysql-test/main/view_source.test | 24 |
2 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/main/view_source.result b/mysql-test/main/view_source.result new file mode 100644 index 00000000000..bb37b2617ad --- /dev/null +++ b/mysql-test/main/view_source.result @@ -0,0 +1,48 @@ +SET NAMES utf8; +create table t1 (a int); +insert into t1 values (1), (2), (11), (12); +create view v1 as +-- Some comment +select a as 'ăș' from t1 where a > 10 +-- Another comment with ășîț +order by a +; +SET NAMES latin1; +show create view v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `??` from `t1` where `t1`.`a` > 10 order by `t1`.`a` utf8 utf8_general_ci +select * from information_schema.views where table_schema = 'test'; +TABLE_CATALOG def +TABLE_SCHEMA test +TABLE_NAME v1 +VIEW_DEFINITION select `test`.`t1`.`a` AS `??` from `test`.`t1` where `test`.`t1`.`a` > 10 order by `test`.`t1`.`a` +CHECK_OPTION NONE +IS_UPDATABLE YES +DEFINER root@localhost +SECURITY_TYPE DEFINER +CHARACTER_SET_CLIENT utf8 +COLLATION_CONNECTION utf8_general_ci +ALGORITHM UNDEFINED +SOURCE -- Some comment +select a as '??' from t1 where a > 10 +-- Another comment with ??î? +order by a +SET NAMES utf8; +select * from information_schema.views where table_schema = 'test'; +TABLE_CATALOG def +TABLE_SCHEMA test +TABLE_NAME v1 +VIEW_DEFINITION select `test`.`t1`.`a` AS `ăș` from `test`.`t1` where `test`.`t1`.`a` > 10 order by `test`.`t1`.`a` +CHECK_OPTION NONE +IS_UPDATABLE YES +DEFINER root@localhost +SECURITY_TYPE DEFINER +CHARACTER_SET_CLIENT utf8 +COLLATION_CONNECTION utf8_general_ci +ALGORITHM UNDEFINED +SOURCE -- Some comment +select a as 'ăș' from t1 where a > 10 +-- Another comment with ășîț +order by a +drop table t1; +drop view v1; diff --git a/mysql-test/main/view_source.test b/mysql-test/main/view_source.test new file mode 100644 index 00000000000..a4389ff918a --- /dev/null +++ b/mysql-test/main/view_source.test @@ -0,0 +1,24 @@ +SET NAMES utf8; +create table t1 (a int); +insert into t1 values (1), (2), (11), (12); + +create view v1 as + -- Some comment + select a as 'ăș' from t1 where a > 10 + -- Another comment with ășîț + order by a +; + +SET NAMES latin1; + +show create view v1; + +--vertical_results +select * from information_schema.views where table_schema = 'test'; + +SET NAMES utf8; +--vertical_results +select * from information_schema.views where table_schema = 'test'; + +drop table t1; +drop view v1; |