diff options
author | unknown <mhansson/martin@linux-st28.site> | 2007-10-09 14:58:09 +0200 |
---|---|---|
committer | unknown <mhansson/martin@linux-st28.site> | 2007-10-09 14:58:09 +0200 |
commit | ae4141ed75124cc4bbae5fa22662ef0e7f00b122 (patch) | |
tree | 8bf99e9f04ece5292c895e49ede9a191d11c5610 /sql/item_timefunc.h | |
parent | 692b686dae872c4d93f472d11d16eb8807076f98 (diff) | |
download | mariadb-git-ae4141ed75124cc4bbae5fa22662ef0e7f00b122.tar.gz |
Bug#31160: MAKETIME() crashes server when returning NULL in ORDER BY using filesort
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().
mysql-test/r/func_sapdb.result:
Bug#31160: Changed test result.
mysql-test/r/func_time.result:
Bug#31160: Test result.
mysql-test/t/func_time.test:
Bug#31160: Test case.
sql/item_timefunc.h:
Bug#31160: The fix: Initializing maybe_null to true
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 8e925a0156f..3e860017d89 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -962,7 +962,10 @@ class Item_func_maketime :public Item_str_timefunc { public: Item_func_maketime(Item *a, Item *b, Item *c) - :Item_str_timefunc(a, b ,c) {} + :Item_str_timefunc(a, b, c) + { + maybe_null= TRUE; + } String *val_str(String *str); const char *func_name() const { return "maketime"; } }; |