summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2008-11-27 17:05:38 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2008-11-27 17:05:38 +0400
commit8a43bcc33a918a12131164e61dd2629d1b688dc7 (patch)
treec61e6a14ef5de640a505489c42a67f76446e6ec7 /sql/field.cc
parent35bebf503fb64611e6088a169dabf926f403dd2c (diff)
parent7b488c46a0882d2e8cc2ab5f2ff57722c395594a (diff)
downloadmariadb-git-8a43bcc33a918a12131164e61dd2629d1b688dc7.tar.gz
5.0-bugteam->5.1-bugteam merge
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc
index a03beb4e8af..e815320bc9e 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -5814,6 +5814,7 @@ int Field_newdate::store_time(MYSQL_TIME *ltime,timestamp_type time_type)
{
char buff[MAX_DATE_STRING_REP_LENGTH];
String str(buff, sizeof(buff), &my_charset_latin1);
+ tmp= 0;
make_date((DATE_TIME_FORMAT *) 0, ltime, &str);
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED,
str.ptr(), str.length(), MYSQL_TIMESTAMP_DATE, 1);
@@ -6056,6 +6057,7 @@ int Field_datetime::store_time(MYSQL_TIME *ltime,timestamp_type time_type)
{
char buff[MAX_DATE_STRING_REP_LENGTH];
String str(buff, sizeof(buff), &my_charset_latin1);
+ tmp= 0;
make_datetime((DATE_TIME_FORMAT *) 0, ltime, &str);
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED,
str.ptr(), str.length(), MYSQL_TIMESTAMP_DATETIME,1);