summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorunknown <nick@mysql.com>2002-10-24 14:33:24 -0600
committerunknown <nick@mysql.com>2002-10-24 14:33:24 -0600
commit171ac60fe1ce0cb112a11b709ff8029b3de935a3 (patch)
treea4e8accbfad564c2b676948f926f7502fc2dfda4 /sql/mysqld.cc
parentf4a3b1d90357f4db8a966210d84177542e635a2f (diff)
downloadmariadb-git-171ac60fe1ce0cb112a11b709ff8029b3de935a3.tar.gz
Moved rand initialization from mysqld.cc to sql_class.cc:THD::THD()
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index e6c2c198722..e91ede0bf71 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -290,7 +290,7 @@ int segfaulted = 0; // ensure we do not enter SIGSEGV handler twice
*/
static bool kill_in_progress=FALSE;
-static struct rand_struct sql_rand;
+struct rand_struct sql_rand; // used by sql_class.cc:THD::THD()
static int cleanup_done;
static char **defaults_argv;
char glob_hostname[FN_REFLEN];
@@ -2416,15 +2416,6 @@ static void create_new_thread(THD *thd)
for (uint i=0; i < 8 ; i++) // Generate password teststring
thd->scramble[i]= (char) (rnd(&sql_rand)*94+33);
thd->scramble[8]=0;
- /*
- We need good random number initialization for new thread
- Just coping global one will not work
- */
- {
- ulong tmp=(ulong) (rnd(&sql_rand) * 3000000);
- randominit(&(thd->rand), tmp + (ulong) start_time,
- tmp + (ulong) thread_id);
- }
thd->real_id=pthread_self(); // Keep purify happy
/* Start a new thread to handle connection */