36
36
#include <drizzled/functions/decimal_typecast.h>
37
37
#include <drizzled/functions/divide.h>
38
38
#include <drizzled/functions/int.h>
39
#include <drizzled/functions/bit.h>
39
40
#include <drizzled/functions/bit_count.h>
40
41
#include <drizzled/functions/bit_length.h>
41
42
#include <drizzled/functions/find_in_set.h>
58
59
#include <drizzled/functions/ascii.h>
59
60
#include <drizzled/functions/asin.h>
60
61
#include <drizzled/functions/atan.h>
62
#include <drizzled/functions/char_length.h>
61
63
#include <drizzled/functions/ceiling.h>
62
64
#include <drizzled/functions/cos.h>
63
65
#include <drizzled/functions/exp.h>
64
66
#include <drizzled/functions/floor.h>
65
67
#include <drizzled/functions/ln.h>
66
68
#include <drizzled/functions/log.h>
69
#include <drizzled/functions/units.h>
67
70
#include <drizzled/functions/ord.h>
68
71
#include <drizzled/functions/pow.h>
69
72
#include <drizzled/functions/rand.h>
82
85
void fix_length_and_dec();
85
class Item_func_units :public Item_real_func
90
Item_func_units(char *name_arg,Item *a,double mul_arg,double add_arg)
91
:Item_real_func(a),name(name_arg),mul(mul_arg),add(add_arg) {}
93
const char *func_name() const { return name; }
94
void fix_length_and_dec()
95
{ decimals= NOT_FIXED_DEC; max_length= float_length(decimals); }
100
89
Objects of this class are used for ROLLUP queries to wrap up
101
90
each constant item referred to in GROUP BY list.
129
class Item_func_char_length :public Item_int_func
133
Item_func_char_length(Item *a) :Item_int_func(a) {}
135
const char *func_name() const { return "char_length"; }
136
void fix_length_and_dec() { max_length=10; }
139
class Item_func_coercibility :public Item_int_func
142
Item_func_coercibility(Item *a) :Item_int_func(a) {}
144
const char *func_name() const { return "coercibility"; }
145
void fix_length_and_dec() { max_length=10; maybe_null= 0; }
146
table_map not_null_tables() const { return 0; }
149
class Item_func_locate :public Item_int_func
151
String value1,value2;
152
DTCollation cmp_collation;
154
Item_func_locate(Item *a,Item *b) :Item_int_func(a,b) {}
155
Item_func_locate(Item *a,Item *b,Item *c) :Item_int_func(a,b,c) {}
156
const char *func_name() const { return "locate"; }
158
void fix_length_and_dec();
159
virtual void print(String *str, enum_query_type query_type);
163
118
class Item_func_field :public Item_int_func
165
120
String value,tmp;
172
127
void fix_length_and_dec();
176
/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */
178
class Item_func_bit: public Item_int_func
181
Item_func_bit(Item *a, Item *b) :Item_int_func(a, b) {}
182
Item_func_bit(Item *a) :Item_int_func(a) {}
183
void fix_length_and_dec() { unsigned_flag= 1; }
185
virtual inline void print(String *str, enum_query_type query_type)
187
print_op(str, query_type);
191
class Item_func_bit_or :public Item_func_bit
194
Item_func_bit_or(Item *a, Item *b) :Item_func_bit(a, b) {}
196
const char *func_name() const { return "|"; }
199
class Item_func_bit_and :public Item_func_bit
202
Item_func_bit_and(Item *a, Item *b) :Item_func_bit(a, b) {}
204
const char *func_name() const { return "&"; }
207
class Item_func_shift_left :public Item_func_bit
210
Item_func_shift_left(Item *a, Item *b) :Item_func_bit(a, b) {}
212
const char *func_name() const { return "<<"; }
215
class Item_func_shift_right :public Item_func_bit
218
Item_func_shift_right(Item *a, Item *b) :Item_func_bit(a, b) {}
220
const char *func_name() const { return ">>"; }
223
class Item_func_bit_neg :public Item_func_bit
226
Item_func_bit_neg(Item *a) :Item_func_bit(a) {}
228
const char *func_name() const { return "~"; }
230
virtual inline void print(String *str, enum_query_type query_type)
232
Item_func::print(str, query_type);
237
130
class Item_func_last_insert_id :public Item_int_func
432
325
bool is_written_to_binlog();
435
class Item_func_bit_xor : public Item_func_bit
438
Item_func_bit_xor(Item *a, Item *b) :Item_func_bit(a, b) {}
440
const char *func_name() const { return "^"; }
443
328
class Item_func_is_free_lock :public Item_int_func