115
115
#define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1))
116
116
#define all_bits_set(A,B) ((A) & (B) != (B))
119
Generates a warning that a feature is deprecated. After a specified version
120
asserts that the feature is removed.
124
WARN_DEPRECATED(thd, 6,2, "BAD", "'GOOD'");
126
Will result in a warning
128
"The syntax 'BAD' is deprecated and will be removed in MySQL 6.2. Please
131
Note, that in macro arguments BAD is not quoted, while 'GOOD' is.
132
Note, that the version is TWO numbers, separated with a comma
133
(two macro arguments, that is)
135
#define WARN_DEPRECATED(Thd,VerHi,VerLo,Old,New) \
137
compile_time_assert(MYSQL_VERSION_ID < VerHi * 10000 + VerLo * 100); \
139
push_warning_printf((Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \
140
ER_WARN_DEPRECATED_SYNTAX, \
141
ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER), \
142
(Old), #VerHi "." #VerLo, (New)); \
144
sql_print_warning("The syntax '%s' is deprecated and will be removed " \
145
"in MySQL %s. Please use %s instead.", \
146
(Old), #VerHi "." #VerLo, (New)); \
149
118
extern CHARSET_INFO *system_charset_info, *files_charset_info ;
150
119
extern CHARSET_INFO *national_charset_info, *table_alias_charset;
155
123
DERIVATION_IGNORABLE= 5,
562
530
/* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
563
531
#define UNDEF_POS (-1)
566
Sync points allow us to force the server to reach a certain line of code
567
and block there until the client tells the server it is ok to go on.
568
The client tells the server to block with SELECT GET_LOCK()
569
and unblocks it with SELECT RELEASE_LOCK(). Used for debugging difficult
572
#define DBUG_SYNC_POINT(lock_name,lock_timeout) \
573
debug_sync_point(lock_name,lock_timeout)
574
void debug_sync_point(const char* lock_name, uint lock_timeout);
576
#define DBUG_SYNC_POINT(lock_name,lock_timeout)
577
#endif /* EXTRA_DEBUG */
579
533
/* BINLOG_DUMP options */
886
840
Then one can later test for it by using ERROR_INJECT_CRASH_VALUE,
887
841
ERROR_INJECT_ACTION_VALUE and ERROR_INJECT_VALUE. This have the same
888
842
behaviour as the above described macros except that they use the
889
error inject value instead of a code used by DBUG macros.
843
error inject value instead of a code used by debug macros.
891
845
#define SET_ERROR_INJECT_VALUE(x) \
892
846
current_thd->error_inject_value= (x)
893
#define ERROR_INJECT_CRASH(code) \
894
DBUG_EVALUATE_IF(code, (abort(), 0), 0)
895
847
#define ERROR_INJECT_ACTION(code, action) \
896
848
(check_and_unset_keyword(code) ? ((action), 0) : 0)
897
849
#define ERROR_INJECT(code) \
2040
1992
void free_list(I_List <i_string_pair> *list);
2041
1993
void free_list(I_List <i_string> *list);
2044
extern void turn_parser_debug_on();
2046
1995
/* Some inline functions for more speed */
2048
1997
inline bool add_item_to_list(THD *thd, Item *item)