summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-07-18 15:53:12 +0500
committerunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-07-18 15:53:12 +0500
commitd39e85320f953919dfb6f2c67e57cde2d1d40890 (patch)
tree85e4fffc46950c057cae436dc52c6595a1531767 /sql/item_timefunc.cc
parent60670458239cdd30ce4961575867b3707873c4cc (diff)
downloadmariadb-git-d39e85320f953919dfb6f2c67e57cde2d1d40890.tar.gz
Backporting Kostja's changes made for 5.0 into 4.1.
Please use "ul" when merging this changeset to 5.0. sql/item_timefunc.cc: Fix a valgrind warning in type_date test. sql/sql_locale.cc: Fix a Windows build failure: "false" -> FALSE
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 2da0e8956c2..44d9b422263 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -479,10 +479,11 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time,
const char *ptr, *end;
MY_LOCALE *locale;
THD *thd= current_thd;
- char buf[128];
- String tmp(buf, thd->variables.character_set_results);
+ char buf[128];
+ String tmp(buf, sizeof(buf), thd->variables.character_set_results);
uint errors= 0;
+ tmp.length(0);
str->length(0);
str->set_charset(&my_charset_bin);
locale = thd->variables.lc_time_names;