~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2010-02-05 08:11:15 UTC
  • mfrom: (1283 build)
  • mto: (1273.13.43 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: mordred@inaugust.com-20100205081115-dr82nvrwv4lvw7sd
Merged trunk.

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 */