MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
random.h
1
/*
2
Copyright (C) 2003, 2005, 2006 MySQL AB
3
All rights reserved. Use is subject to license terms.
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
#ifndef RANDOM_H
20
#define RANDOM_H
21
22
/***************************************************************
23
* I N C L U D E D F I L E S *
24
***************************************************************/
25
26
/***************************************************************
27
* M A C R O S *
28
***************************************************************/
29
30
/***************************************************************/
31
/* C O N S T A N T S */
32
/***************************************************************/
33
34
35
/***************************************************************
36
* D A T A S T R U C T U R E S *
37
***************************************************************/
38
39
typedef
struct
{
40
unsigned
int
length;
41
unsigned
int
*values;
42
unsigned
int
currentIndex;
43
}
RandomSequence
;
44
45
typedef
struct
{
46
unsigned
int
length;
47
unsigned
int
value;
48
}
SequenceValues
;
49
50
/***************************************************************
51
* P U B L I C F U N C T I O N S *
52
***************************************************************/
53
54
#ifdef __cplusplus
55
extern
"C"
{
56
#endif
57
58
59
extern
double
getTps(
unsigned
int
count,
double
timeValue);
60
61
/*----------------------------*/
62
/* Random Sequences Functions */
63
/*----------------------------*/
64
extern
int
initSequence(
RandomSequence
*seq,
SequenceValues
*inputValues);
65
extern
unsigned
int
getNextRandom(
RandomSequence
*seq);
66
extern
void
printSequence(
RandomSequence
*seq,
unsigned
int
numPerRow);
67
68
/*---------------------------------------------------*/
69
/* Code from the glibc, to make sure the same random */
70
/* number generator is used by all */
71
/*---------------------------------------------------*/
72
extern
void
myRandom48Init(
long
int
seedval);
73
extern
long
int
myRandom48(
unsigned
int
maxValue);
74
75
#ifdef __cplusplus
76
}
77
#endif
78
79
/***************************************************************
80
* E X T E R N A L D A T A *
81
***************************************************************/
82
83
84
85
#endif
/* RANDOM_H */
86
storage
ndb
include
util
random.h
Generated on Sat Nov 9 2013 01:27:00 for MySQL 5.6.14 Source Code Document by
1.8.1.2