summaryrefslogtreecommitdiff
path: root/mysql-test/suite/period
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-02-16 18:43:20 +0100
committerSergei Golubchik <serg@mariadb.org>2019-02-21 14:57:10 +0100
commit8ad23ff49834775b07397ebd8d2840c203aab59a (patch)
tree1d68206bd120ab43c4818f15f30bd4149bb0f8b3 /mysql-test/suite/period
parent7b48724dcca4064a272aac1ebe0e3ba061cc78c2 (diff)
downloadmariadb-git-8ad23ff49834775b07397ebd8d2840c203aab59a.tar.gz
don't allow TIME columns in PERIOD specification
Diffstat (limited to 'mysql-test/suite/period')
-rw-r--r--mysql-test/suite/period/r/create.result3
-rw-r--r--mysql-test/suite/period/t/create.test3
2 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/suite/period/r/create.result b/mysql-test/suite/period/r/create.result
index df77669f727..427d9605afe 100644
--- a/mysql-test/suite/period/r/create.result
+++ b/mysql-test/suite/period/r/create.result
@@ -40,6 +40,9 @@ ERROR HY000: Fields of PERIOD FOR `mytime` have different types
create or replace table t (id int primary key, s int, e date,
period for mytime(s,e));
ERROR 42000: Incorrect column specifier for column 's'
+create or replace table t (id int primary key, s time, e time,
+period for mytime(s,e));
+ERROR 42000: Incorrect column specifier for column 's'
create or replace table t (id int primary key, s date, e date,
period for mytime(s,x));
ERROR 42S22: Unknown column 'x' in 'mytime'
diff --git a/mysql-test/suite/period/t/create.test b/mysql-test/suite/period/t/create.test
index 9648fa02fbc..45f934bf133 100644
--- a/mysql-test/suite/period/t/create.test
+++ b/mysql-test/suite/period/t/create.test
@@ -26,6 +26,9 @@ create or replace table t (s timestamp(2), e timestamp(6),
--error ER_WRONG_FIELD_SPEC
create or replace table t (id int primary key, s int, e date,
period for mytime(s,e));
+--error ER_WRONG_FIELD_SPEC
+create or replace table t (id int primary key, s time, e time,
+ period for mytime(s,e));
--error ER_BAD_FIELD_ERROR
create or replace table t (id int primary key, s date, e date,
period for mytime(s,x));