Commit 5d67dd04 authored by unknown's avatar unknown

another fix for RAND() initialization

parent cad553de
...@@ -156,7 +156,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), ...@@ -156,7 +156,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
*/ */
{ {
pthread_mutex_lock(&LOCK_thread_count); pthread_mutex_lock(&LOCK_thread_count);
ulong tmp=(ulong) (rnd(&sql_rand) * ((ulong)~0L)); ulong tmp=(ulong) (rnd(&sql_rand) * ((ulong)0xffffffff));
randominit(&rand, tmp + (ulong) start_time, randominit(&rand, tmp + (ulong) start_time,
tmp + (ulong) thread_id); tmp + (ulong) thread_id);
pthread_mutex_unlock(&LOCK_thread_count); pthread_mutex_unlock(&LOCK_thread_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment