~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/rand.cc

Reverted my change to interval_list

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <drizzled/server_includes.h>
 
21
#include CSTDINT_H
21
22
#include <drizzled/function/math/rand.h>
22
23
#include <drizzled/session.h>
23
24
 
24
 
namespace drizzled
25
 
{
26
 
 
27
 
static uint32_t sql_rnd()
28
 
{
29
 
  return (uint32_t) (rand() * 0xffffffff); /* make all bits random */
30
 
}
31
 
 
32
 
 
33
25
void Item_func_rand::seed_random(Item *arg)
34
26
{
35
27
  /*
88
80
  seed2= (seed1 + seed2 + 33) % max_value;
89
81
  return (((double) seed1) / max_value_dbl);
90
82
}
91
 
 
92
 
} /* namespace drizzled */