MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ut0rnd.cc File Reference
#include "ut0rnd.h"
Include dependency graph for ut0rnd.cc:

Go to the source code of this file.

Macros

#define UT_RANDOM_1   1.0412321
#define UT_RANDOM_2   1.1131347
#define UT_RANDOM_3   1.0132677

Functions

UNIV_INTERN ulint ut_find_prime (ulint n)

Variables

UNIV_INTERN ulint ut_rnd_ulint_counter = 65654363

Detailed Description

Random numbers and hashing

Created 5/11/1994 Heikki Tuuri

Definition in file ut0rnd.cc.

Macro Definition Documentation

#define UT_RANDOM_1   1.0412321

These random numbers are used in ut_find_prime

Definition at line 34 of file ut0rnd.cc.

Function Documentation

UNIV_INTERN ulint ut_find_prime ( ulint  n)

Looks for a prime number slightly greater than the given argument. The prime is chosen so that it is not near any power of 2.

Returns
prime
Parameters
nin: positive number > 100

Definition at line 48 of file ut0rnd.cc.

Variable Documentation

UNIV_INTERN ulint ut_rnd_ulint_counter = 65654363

Seed value of ut_rnd_gen_ulint().

Definition at line 40 of file ut0rnd.cc.