~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <drizzled/function/math/rand.h>
22
22
#include <drizzled/session.h>
23
23
 
 
24
namespace drizzled
 
25
{
 
26
 
24
27
static uint32_t sql_rnd()
25
28
{
26
29
  return (uint32_t) (rand() * 0xffffffff); /* make all bits random */
85
88
  seed2= (seed1 + seed2 + 33) % max_value;
86
89
  return (((double) seed1) / max_value_dbl);
87
90
}
 
91
 
 
92
} /* namespace drizzled */