mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug #30942: select str_to_date from derived table returns varying results
The function str_to_date has a field to say whether it's invoked constant arguments. But this member was not initialized, causing the function to think that it could use a cache of the format type when said cache was in fact not initialized. Fixed by initializing the field to false. mysql-test/r/type_date.result: Bug#30942: Test result mysql-test/t/type_date.test: Bug#30942: Test case sql/item_timefunc.h: Bug#30942: Initialized const_item to false
This commit is contained in:
@@ -1030,7 +1030,7 @@ class Item_func_str_to_date :public Item_str_func
|
||||
bool const_item;
|
||||
public:
|
||||
Item_func_str_to_date(Item *a, Item *b)
|
||||
:Item_str_func(a, b)
|
||||
:Item_str_func(a, b), const_item(false)
|
||||
{}
|
||||
String *val_str(String *str);
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
|
Reference in New Issue
Block a user