~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2009-01-17 02:46:52 UTC
  • Revision ID: brian@gir-3.local-20090117024652-4ducefje08ajbs1q
Refactor append_identifier and remove dead OPTION_QUOTE_SHOW_CREATE option
(we always quote).

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/function/func.h>
24
24
#include <drizzled/function/math/real.h>
25
25
 
26
 
namespace drizzled
27
 
{
28
 
 
29
26
class Item_func_rand :public Item_real_func
30
27
{
31
 
  uint64_t seed1;
32
 
  uint64_t seed2;
33
 
  uint64_t max_value;
34
 
  double max_value_dbl;
35
 
  void _seed_random_int(uint64_t new_seed1, uint64_t new_seed2);
36
 
 
 
28
  struct rand_struct *rand;
37
29
public:
38
 
  Item_func_rand(Item *a) :Item_real_func(a) {}
 
30
  Item_func_rand(Item *a) :Item_real_func(a), rand(0) {}
39
31
  Item_func_rand()        :Item_real_func() {}
40
32
  double val_real();
41
33
  const char *func_name() const { return "rand"; }
42
34
  bool const_item() const { return 0; }
43
35
  void update_used_tables();
44
36
  bool fix_fields(Session *session, Item **ref);
 
37
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
38
  { return true; }
45
39
private:
46
40
  void seed_random (Item * val);
47
41
};
48
42
 
49
 
} /* namespace drizzled */
50
 
 
51
43
#endif /* DRIZZLED_FUNCTION_MATH_RAND_H */