diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-06-20 19:36:37 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-06-20 19:36:37 +0400 |
commit | ff09512e07045b0997265d37c45f075daebe9531 (patch) | |
tree | 8ffec2c5e99266e730a9388c3d1936602b1e815c /mysql-test/main/win.result | |
parent | 9c53cbdd8887f0f8bcdade24a4be183a3b354bc9 (diff) | |
download | mariadb-git-ff09512e07045b0997265d37c45f075daebe9531.tar.gz |
MDEV-16489 when lead() returns null on a datetime field, the result is treated as the literal string '[NULL]'
Diffstat (limited to 'mysql-test/main/win.result')
-rw-r--r-- | mysql-test/main/win.result | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result index 3d56cd8e435..7607cebc3a5 100644 --- a/mysql-test/main/win.result +++ b/mysql-test/main/win.result @@ -3317,3 +3317,20 @@ DROP TABLE t1,t2; # # Start of 10.3 tests # +# +# MDEV-16489 when lead() returns null on a datetime field, the result is treated as the literal string '[NULL]' +# +CREATE TABLE t1 (d datetime); +INSERT INTO t1 VALUES ('2018-01-01 00:00:00'),('2018-02-01 00:00:00'); +SELECT *, LEAD(d) OVER (ORDER BY d) AS x FROM t1; +d x +2018-01-01 00:00:00 2018-02-01 00:00:00 +2018-02-01 00:00:00 NULL +DROP TABLE t1; +CREATE TABLE t1 (d time); +INSERT INTO t1 VALUES ('00:00:01'),('00:00:02'); +SELECT *, LEAD(d) OVER (ORDER BY d) AS x FROM t1; +d x +00:00:01 00:00:02 +00:00:02 NULL +DROP TABLE t1; |