summaryrefslogtreecommitdiff
path: root/mysql-test/r/win_insert_select.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-07-04 14:14:30 +0400
committerAlexander Barkov <bar@mariadb.org>2017-07-04 14:14:30 +0400
commit25ad623d64ebc34093544875e5b0ebd6101e975b (patch)
treeee4fb7047a003b0a8c292af0b91e3ef37b870477 /mysql-test/r/win_insert_select.result
parent760127ac6ff428d4538733b3f99b743f7a802581 (diff)
downloadmariadb-git-25ad623d64ebc34093544875e5b0ebd6101e975b.tar.gz
MDEV-13240 Wrong warning with MAX(datetime_field) OVER (...)
The problem resided in Item_window_func implementation, and it was revealed by bb-10.2-ext specific changes: Item_window_func::save_in_field() works differently in bb-10.2-ext vs 10.2: - 10.2 goes through val_str() - bb-10.2-ext goes through get_date(), due to Type_handler related changes. get_date() tries to convert empty string to DATETIME, hence the warning. During a discussion with Vicentiu, it was decided to fix Item_window_func::val_xxx() to return NULL (instead of an "empty" value, such as 0 for numbers and '' for strings) when force_return_blank is set.
Diffstat (limited to 'mysql-test/r/win_insert_select.result')
-rw-r--r--mysql-test/r/win_insert_select.result4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/win_insert_select.result b/mysql-test/r/win_insert_select.result
index c86576df6ae..5eddbf78713 100644
--- a/mysql-test/r/win_insert_select.result
+++ b/mysql-test/r/win_insert_select.result
@@ -1,7 +1,7 @@
CREATE TABLE t1 (c1 INT, c2 VARCHAR(30));
PREPARE populate_table FROM "INSERT into t1 values (1, 'manual_insert_1'),
(4, 'manual_insert_2')";
-INSERT INTO t1 SELECT row_number() over(), "should_have_0" FROM t1;
+INSERT INTO t1 SELECT row_number() over(), "should_have_NULL" FROM t1;
INSERT INTO t1 SELECT 1 + row_number() over(), "should_have_2" FROM t1;
EXECUTE populate_table;
INSERT INTO t1 SELECT 10 + row_number() over(), "should repeat 4 times [11-14]" FROM t1;
@@ -13,8 +13,8 @@ c1 c2
12 should repeat 4 times [11-14]
13 should repeat 4 times [11-14]
14 should repeat 4 times [11-14]
-0 should_have_0
2 should_have_2
+NULL should_have_NULL
DELETE FROM t1;
EXECUTE populate_table;
INSERT INTO t1