1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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
This commit is contained in:
unknown
2002-12-05 03:40:33 +02:00
parent 7280bddb71
commit 591b058518
11 changed files with 114 additions and 99 deletions

View File

@@ -37,7 +37,6 @@
#include <mysys_err.h>
#include <assert.h>
extern struct rand_struct sql_rand;
/*****************************************************************************
** Instansiate templates
@@ -159,7 +158,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
pthread_mutex_lock(&LOCK_thread_count);
ulong tmp=(ulong) (rnd(&sql_rand) * 3000000);
pthread_mutex_unlock(&LOCK_thread_count);
randominit(&rand, tmp + (ulong) start_time, tmp + (ulong) thread_id);
randominit(&rand, tmp + (ulong) &rand, tmp + (ulong) ::query_id);
}
}