diff options
author | Nayuta Yanagisawa <nayuta.yanagisawa@gmail.com> | 2020-10-16 14:33:22 +0000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-11-04 12:33:13 +0300 |
commit | b13fe8e51bd356299f58a07fecc589b3b3c4937b (patch) | |
tree | f01e0f35e4d38d6e7af675036950d0d3ab66f7e3 /mysql-test/suite | |
parent | 0f04f61395b642d429aaa6a0372061b0d996a6b9 (diff) | |
download | mariadb-git-b13fe8e51bd356299f58a07fecc589b3b3c4937b.tar.gz |
MDEV-18842: Unfortunate error message when the same column is used for application period start and end
An application-time period must be composed of two different columns.
We added a check that ensures that the above condition is met.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/period/r/create.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/period/t/create.test | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/suite/period/r/create.result b/mysql-test/suite/period/r/create.result index 8cedb23465d..da4cf998918 100644 --- a/mysql-test/suite/period/r/create.result +++ b/mysql-test/suite/period/r/create.result @@ -45,6 +45,10 @@ 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' +# MDEV-18842: Unfortunate error message when the same column is used +# for application period start and end +create or replace table t (s date, t date, period for apt(s,s)); +ERROR 42000: Column 's' specified twice create or replace table t (id int primary key, s date, e date, period for mytime(s,e), period for mytime2(s,e)); diff --git a/mysql-test/suite/period/t/create.test b/mysql-test/suite/period/t/create.test index 2e3de795698..49dcc6ad3c7 100644 --- a/mysql-test/suite/period/t/create.test +++ b/mysql-test/suite/period/t/create.test @@ -31,6 +31,12 @@ create or replace table t (id int primary key, s time, e time, --error ER_BAD_FIELD_ERROR create or replace table t (id int primary key, s date, e date, period for mytime(s,x)); + +--echo # MDEV-18842: Unfortunate error message when the same column is used +--echo # for application period start and end +--error ER_FIELD_SPECIFIED_TWICE +create or replace table t (s date, t date, period for apt(s,s)); + --error ER_MORE_THAN_ONE_PERIOD create or replace table t (id int primary key, s date, e date, period for mytime(s,e), |