summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-05-17 11:46:21 -0700
committerunknown <igor@rurik.mysql.com>2006-05-17 11:46:21 -0700
commit8df5fdb9334ff4c908471d5a6bd76dee57e3e9db (patch)
treee05c70627d1455e3fc35f9a5b7cf20f2ac40aabe /mysql-test/r
parent2d0297f093a7995b4d0224f090440ce7810d62af (diff)
parente7f87bd0b7d1519abf7aa84b9ac09062d77893e4 (diff)
downloadmariadb-git-8df5fdb9334ff4c908471d5a6bd76dee57e3e9db.tar.gz
Merge rurik.mysql.com:/home/igor/tmp_merge
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0 mysql-test/r/view.result: Auto merged mysql-test/t/view.test: Auto merged sql/item_timefunc.cc: Auto merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/view.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index ff577391ee0..795638dced0 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2649,3 +2649,14 @@ ldt
2006-01-01 03:00:00
drop view v1, v2;
drop table t1;
+CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, d datetime);
+CREATE VIEW v1 AS
+SELECT id, date(d) + INTERVAL TIME_TO_SEC(d) SECOND AS t, COUNT(*)
+FROM t1 GROUP BY id, t;
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`id` AS `id`,(cast(`t1`.`d` as date) + interval time_to_sec(`t1`.`d`) second) AS `t`,count(0) AS `COUNT(*)` from `t1` group by `t1`.`id`,(cast(`t1`.`d` as date) + interval time_to_sec(`t1`.`d`) second)
+SELECT * FROM v1;
+id t COUNT(*)
+DROP VIEW v1;
+DROP TABLE t1;