~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/mysql_priv.h

  • Committer: Brian Aker
  • Date: 2008-07-11 00:33:12 UTC
  • mfrom: (51.1.83 remove-dbug)
  • Revision ID: brian@tangent.org-20080711003312-f4sf5n2z3obor1u8
Comming Jay's merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
#define PREV_BITS(type,A)       ((type) (((type) 1 << (A)) -1))
116
116
#define all_bits_set(A,B) ((A) & (B) != (B))
117
117
 
118
 
/*
119
 
  Generates a warning that a feature is deprecated. After a specified version
120
 
  asserts that the feature is removed.
121
 
 
122
 
  Using it as
123
 
 
124
 
    WARN_DEPRECATED(thd, 6,2, "BAD", "'GOOD'");
125
 
 
126
 
 Will result in a warning
127
 
 
128
 
    "The syntax 'BAD' is deprecated and will be removed in MySQL 6.2. Please
129
 
    use 'GOOD' instead"
130
 
 
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)
134
 
*/
135
 
#define WARN_DEPRECATED(Thd,VerHi,VerLo,Old,New)                            \
136
 
  do {                                                                      \
137
 
    compile_time_assert(MYSQL_VERSION_ID < VerHi * 10000 + VerLo * 100);    \
138
 
    if (Thd)                                                                \
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));                   \
143
 
    else                                                                    \
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));                   \
147
 
  } while(0)
148
 
 
149
118
extern CHARSET_INFO *system_charset_info, *files_charset_info ;
150
119
extern CHARSET_INFO *national_charset_info, *table_alias_charset;
151
120
 
152
 
 
153
121
enum Derivation
154
122
{
155
123
  DERIVATION_IGNORABLE= 5,
561
529
 
562
530
/* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
563
531
#define UNDEF_POS (-1)
564
 
#ifdef EXTRA_DEBUG
565
 
/**
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
570
 
  concurrency problems
571
 
*/
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);
575
 
#else
576
 
#define DBUG_SYNC_POINT(lock_name,lock_timeout)
577
 
#endif /* EXTRA_DEBUG */
578
532
 
579
533
/* BINLOG_DUMP options */
580
534
 
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.
890
844
*/
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);
2042
1994
 
2043
 
/* sql_yacc.cc */
2044
 
extern void turn_parser_debug_on();
2045
 
 
2046
1995
/* Some inline functions for more speed */
2047
1996
 
2048
1997
inline bool add_item_to_list(THD *thd, Item *item)