From 591b058518dcbc736398d64e8bfd1ac43099323e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Dec 2002 03:40:33 +0200 Subject: Removed copying of parameters as this leads to memory leaks in embedded server. Fixed 'not initialized' memory error. mysql-test/mysql-test-run.sh: Updates to be able to more easily use --valgrind mysql-test/r/alter_table.result: Added missing drop table mysql-test/t/alter_table.test: Added missing drop table sql/field.cc: Simple optimizations sql/ha_innodb.cc: Remove copying of parameters as this leads to memory leaks in MySQL. Should be instead fixed by, in embedded server, make a temporary copy of all parameters and free them on server-end sql/log.cc: Simple optimization sql/mysql_priv.h: Move external reference to struct to include file sql/mysqld.cc: Added safety asserts sql/sql_class.cc: Fixed non fatal 'not initialized memory reference error' in thread init sql/sql_udf.cc: Clear current_thd for global thread strings/strto.c: Simple optimization --- strings/strto.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'strings/strto.c') diff --git a/strings/strto.c b/strings/strto.c index 84dccbcbeb8..c98b19a7e67 100644 --- a/strings/strto.c +++ b/strings/strto.c @@ -103,6 +103,7 @@ function (const char *nptr,char **endptr,int base) } /* Check for a sign. */ + negative= 0; if (*s == '-') { negative = 1; @@ -110,11 +111,9 @@ function (const char *nptr,char **endptr,int base) } else if (*s == '+') { - negative = 0; ++s; } - else - negative = 0; + if (base == 16 && s[0] == '0' && toupper (s[1]) == 'X') s += 2; -- cgit v1.2.1