summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorunknown <mhansson/martin@linux-st28.site>2007-10-04 09:15:26 +0200
committerunknown <mhansson/martin@linux-st28.site>2007-10-04 09:15:26 +0200
commitf8f021fd6ba2f654b9b6a3731bc9fea84885687c (patch)
treefbf39f514822aaee7429182813fe7d92fc13d124 /sql/item_timefunc.h
parent4a801dde7ea531f16a261e860eb6bb30b497166d (diff)
downloadmariadb-git-f8f021fd6ba2f654b9b6a3731bc9fea84885687c.tar.gz
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
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 8e925a0156f..cb69bd200e6 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -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);