1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Removed copying of parameters as this leads to memory leaks in embedded server.

Fixed 'not initialized' memory error.
This commit is contained in:
monty@mashka.mysql.fi
2002-12-05 03:40:33 +02:00
parent 7d41cd44c6
commit fc06433a69
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);
}
}