diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2018-08-12 12:08:11 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2018-08-12 12:09:56 +0530 |
commit | befc09f00263d5375b2bb2ea0fac70b6cb0cb7fd (patch) | |
tree | a967b9a2b18e9fdbfad38a38a510a99be5ff9e1c /mysql-test/main/win.result | |
parent | b05ee14d950ef2dc141431877c17f7145a07da17 (diff) | |
download | mariadb-git-befc09f00263d5375b2bb2ea0fac70b6cb0cb7fd.tar.gz |
MDEV-16722: Assertion `type() != NULL_ITEM' failed
We hit this assert during the create of a temporary table field
because the current code does not handle the case when the value
of the NAME_CONST function is NULL.
Fixed this by allowing creation of temporary table fields even
for the case when NAME_CONST returns NULL value.
Introduced tmp_table_field_from_field_type_maybe_null() function
in Item class so both Item_basic_value and Item_name_const can use it.
Introduced a virtual method get_func_item() in the Item class.
Diffstat (limited to 'mysql-test/main/win.result')
-rw-r--r-- | mysql-test/main/win.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result index 7607cebc3a5..fd0fbefdcc5 100644 --- a/mysql-test/main/win.result +++ b/mysql-test/main/win.result @@ -3334,3 +3334,14 @@ d x 00:00:01 00:00:02 00:00:02 NULL DROP TABLE t1; +# +# MDEV-16722: Assertion `type() != NULL_ITEM' failed +# +create table t1 (a int); +insert into t1 values (1),(2),(3); +SELECT row_number() OVER (order by a) FROM t1 order by NAME_CONST('myname',NULL); +row_number() OVER (order by a) +1 +2 +3 +drop table t1; |