221
219
#define MY_CHARSET_BIN_MB_MAXLEN 1
223
221
// uncachable cause
224
static const uint32_t UNCACHEABLE_DEPENDENT= 1;
225
static const uint32_t UNCACHEABLE_RAND= 2;
226
static const uint32_t UNCACHEABLE_SIDEEFFECT= 3;
222
#define UNCACHEABLE_DEPENDENT 1
223
#define UNCACHEABLE_RAND 2
224
#define UNCACHEABLE_SIDEEFFECT 4
227
225
/// forcing to save JOIN for explain
228
static const uint32_t UNCACHEABLE_EXPLAIN= 4;
226
#define UNCACHEABLE_EXPLAIN 8
229
227
/** Don't evaluate subqueries in prepare even if they're not correlated */
230
static const uint32_t UNCACHEABLE_PREPARE= 5;
228
#define UNCACHEABLE_PREPARE 16
231
229
/* For uncorrelated SELECT in an UNION with some correlated SELECTs */
232
static const uint32_t UNCACHEABLE_UNITED= 6;
230
#define UNCACHEABLE_UNITED 32
234
232
/* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
235
233
#define UNDEF_POS (-1)
237
235
/* Options to add_table_to_list() */
238
static const uint32_t TL_OPTION_UPDATING= 0;
239
static const uint32_t TL_OPTION_FORCE_INDEX= 1;
240
static const uint32_t TL_OPTION_IGNORE_LEAVES= 2;
241
static const uint32_t TL_OPTION_ALIAS= 3;
242
static const uint32_t NUM_OF_TABLE_OPTIONS= 4;
236
#define TL_OPTION_UPDATING 1
237
#define TL_OPTION_FORCE_INDEX 2
238
#define TL_OPTION_IGNORE_LEAVES 4
239
#define TL_OPTION_ALIAS 8
244
241
/* Some portable defines */
409
406
#define MY_COLL_ALLOW_CONV 3
410
407
#define MY_COLL_DISALLOW_NONE 4
411
408
#define MY_COLL_CMP_CONV 7
413
inline static void clear_timestamp_auto_bits(enum timestamp_auto_set_type &_target_,
414
const enum timestamp_auto_set_type _bits_)
416
_target_= (enum timestamp_auto_set_type)((int)(_target_) & ~_bits_);
409
#define clear_timestamp_auto_bits(_target_, _bits_) \
410
(_target_)= (enum timestamp_auto_set_type)((int)(_target_) & ~(int)(_bits_))
420
413
* The following are for the interface with the .frm file
423
416
#define FIELDFLAG_PACK_SHIFT 3
424
417
#define FIELDFLAG_MAX_DEC 31
427
// FIXME: T will just be drizzled::Field::utype, but that would
428
// require including field.h. Moving the function elsewhere might be a
429
// better idea. Leaving it for restructuring.
430
template <typename T>
431
T MTYP_TYPENR(const T& type)
433
return static_cast<T>(type & 127);
436
419
#define MTYP_TYPENR(type) (type & 127) /* Remove bits from type */
439
inline static uint32_t f_settype(const enum enum_field_types x)
441
return (uint32_t(x) << FIELDFLAG_PACK_SHIFT);
421
#define f_settype(x) (((int) x) << FIELDFLAG_PACK_SHIFT)
444
424
#ifdef __cplusplus
445
425
template <class T> void set_if_bigger(T &a, const T &b)
639
619
# define _DTRACE_VERSION 0
642
typedef uint64_t table_map; /* Used for table bits in join */
643
typedef uint32_t nesting_map; /* Used for flags of nesting constructs */
645
622
} /* namespace drizzled */
647
624
#endif /* DRIZZLED_DEFINITIONS_H */