diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-03-16 19:49:17 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-03-18 19:22:13 +0100 |
commit | 4fdac6c07e1b896cbf6060d61b47669a48a1ebc9 (patch) | |
tree | 7026f13b8872fed211e43f9767937eba868ff836 /mysql-test/r/view.result | |
parent | b25373beb52af6de43a70a0883918a0d2fd60c53 (diff) | |
download | mariadb-git-4fdac6c07e1b896cbf6060d61b47669a48a1ebc9.tar.gz |
MDEV-9701: CREATE VIEW with GROUP BY or ORDER BY and constant produces invalid definition
Fixed printing integer constant in the ORDER clause (MySQL solution)
Removed workaround for double resolving counter in the ORDER.
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8ee72c35d0b..d4a2a9b1b79 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -826,6 +826,9 @@ drop table t2; create table t1 (a int); insert into t1 values (1), (2); create view v1 as select 5 from t1 order by 1; +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 5 AS `5` from `t1` order by 1 latin1 latin1_swedish_ci select * from v1; 5 5 @@ -5884,5 +5887,21 @@ a DROP VIEW v1; DROP TABLE t1; # +# MDEV-9701: CREATE VIEW with GROUP BY or ORDER BY and constant +# produces invalid definition +# +CREATE TABLE t1 ( i INT ); +INSERT INTO t1 VALUES (1),(2); +CREATE VIEW v1 AS +SELECT 3 AS three, COUNT(*) FROM t1 GROUP BY three; +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 3 AS `three`,count(0) AS `COUNT(*)` from `t1` group by '' latin1 latin1_swedish_ci +SELECT * FROM v1; +three COUNT(*) +3 2 +drop view v1; +drop table t1; +# # End of 10.1 tests # |