diff options
author | Alexander Barkov <bar@mariadb.com> | 2020-05-22 16:31:16 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2020-05-22 17:00:14 +0400 |
commit | ea7830eef48333e28f98a9b91f05a95735b465a3 (patch) | |
tree | 49c25bfa60b4100f4a447c85028a15ce50961f91 /mysql-test/main | |
parent | dc22acfdb62745017226a5c698c1bc3ee3e3563e (diff) | |
download | mariadb-git-ea7830eef48333e28f98a9b91f05a95735b465a3.tar.gz |
MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison
Item_null_result did not override type_handler() because of a wrong merge
of d8a9b524f2e4efec675725c4c32acefe1d8dcb15 (MDEV-14221) from 10.1.
Overriding type_handler().
Removing the old style field_type() method. It's not relevant any more.
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/type_datetime_hires.result | 11 | ||||
-rw-r--r-- | mysql-test/main/type_datetime_hires.test | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/type_datetime_hires.result b/mysql-test/main/type_datetime_hires.result index ebb9c6032b9..5211515ea77 100644 --- a/mysql-test/main/type_datetime_hires.result +++ b/mysql-test/main/type_datetime_hires.result @@ -889,5 +889,16 @@ Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime) Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime) DROP TABLE t1; # +# MDEV-20984 Possibly wrong result or Assertion `args[0]->type_handler()->mysql_timestamp_type() == MYSQL_TIMESTAMP_DATETIME' failed in Item_func_round::date_op +# +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES ('1979-01-03 10:33:32'),('2012-12-12 12:12:12'); +SELECT ROUND(a) AS f FROM t1 GROUP BY a WITH ROLLUP; +f +1979-01-03 10:33:32 +2012-12-12 12:12:12 +NULL +DROP TABLE t1; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_datetime_hires.test b/mysql-test/main/type_datetime_hires.test index ed9a85bcda3..7b3b37560a3 100644 --- a/mysql-test/main/type_datetime_hires.test +++ b/mysql-test/main/type_datetime_hires.test @@ -147,5 +147,15 @@ SELECT a, ROUND(a,-6) FROM t1; DROP TABLE t1; --echo # +--echo # MDEV-20984 Possibly wrong result or Assertion `args[0]->type_handler()->mysql_timestamp_type() == MYSQL_TIMESTAMP_DATETIME' failed in Item_func_round::date_op +--echo # + +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 VALUES ('1979-01-03 10:33:32'),('2012-12-12 12:12:12'); +SELECT ROUND(a) AS f FROM t1 GROUP BY a WITH ROLLUP; +DROP TABLE t1; + + +--echo # --echo # End of 10.4 tests --echo # |