mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixes to avoid errors from valgrind
Fixed problem with 'wrong packet number' in union include/my_global.h: Fix for valgrind mysql-test/t/rpl_rotate_logs.test: Fix to avoid timeing problem sql/item.h: Indentation change sql/set_var.cc: Fix to avoid reference to uninitialized memory sql/sql_select.cc: More DBUG_PRINT messages Fixed problem with 'wrong packet number' in union (tmp_join.error was not correctly reset) sql/sql_union.cc: Simple code cleanup strings/ctype-simple.c: Fix for valgrind
This commit is contained in:
@ -732,7 +732,17 @@ double my_strntod_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
||||
double result;
|
||||
|
||||
errno= 0; /* Safety */
|
||||
|
||||
/*
|
||||
The following define is to avoid warnings from valgrind as str[length]
|
||||
may not be defined (which is not fatal in real life)
|
||||
*/
|
||||
|
||||
#ifdef HAVE_purify
|
||||
if (length == INT_MAX32)
|
||||
#else
|
||||
if (length == INT_MAX32 || str[length] == 0)
|
||||
#endif
|
||||
result= strtod(str, end);
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user