summaryrefslogtreecommitdiff
path: root/sql/time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/time.cc')
-rw-r--r--sql/time.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/time.cc b/sql/time.cc
index 3c654de23bb..be1e4f10825 100644
--- a/sql/time.cc
+++ b/sql/time.cc
@@ -692,6 +692,7 @@ void make_truncated_value_warning(THD *thd, const char *str_val,
char buff[128];
String str(buff,(uint32) sizeof(buff), system_charset_info);
str.copy(str_val, str_length, system_charset_info);
+ str[str_length]= 0; // Ensure we have end 0 for snprintf
switch (time_type) {
case MYSQL_TIMESTAMP_DATE: