summaryrefslogtreecommitdiff
path: root/sql/time.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2006-06-06 02:47:30 +0300
committerunknown <monty@mysql.com>2006-06-06 02:47:30 +0300
commit2017107969f25998c2e0970b6bbe3749ef9ea244 (patch)
tree95341607866eaeca795c9a1a4c4c0d94df862cfd /sql/time.cc
parent6c3babe52c28d28a92d242307e13723500dce969 (diff)
downloadmariadb-git-2017107969f25998c2e0970b6bbe3749ef9ea244.tar.gz
Fixed some issues found by valgrind
(one testcase, one memory leak and some accesses to not initialized memory) mysql-test/r/events_scheduling.result: Changed event timer to two seconds to not get problems with slow system or when running with valgrind mysql-test/t/events_scheduling.test: Changed event timer to two seconds to not get problems with slow system or when running with valgrind mysql-test/valgrind.supp: Avoid purify warnings from DBUG library (safe to do) sql/ha_berkeley.cc: Fix problem with not freed memory sql/sql_class.cc: Ensure that row_count is initalized (as we otherwise may access it uninitialized) sql/sql_show.cc: c_ptr -> ptr to avoid accessing not initialized memory sql/sql_yacc.yy: Fix to not access not initialized memory sql/table.cc: Fix to not access not initialized memory sql/time.cc: Fix to not access not initialized memory
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: