diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config-win.h | 3 | ||||
-rw-r--r-- | include/m_ctype.h | 7 | ||||
-rw-r--r-- | include/m_string.h | 3 | ||||
-rw-r--r-- | include/my_getopt.h | 16 | ||||
-rw-r--r-- | include/my_global.h | 28 | ||||
-rw-r--r-- | include/my_sys.h | 11 | ||||
-rw-r--r-- | include/my_time.h | 19 | ||||
-rw-r--r-- | include/myisampack.h | 357 | ||||
-rw-r--r-- | include/mysql.h | 11 | ||||
-rw-r--r-- | include/mysql_com.h | 41 | ||||
-rw-r--r-- | include/mysql_time.h | 9 | ||||
-rw-r--r-- | include/mysqld_error.h | 115 | ||||
-rw-r--r-- | include/sql_common.h | 1 |
13 files changed, 339 insertions, 282 deletions
diff --git a/include/config-win.h b/include/config-win.h index 91697c985d1..0ba8dd2cf43 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -150,6 +150,9 @@ typedef uint rf_SetTimer; #define HAVE_NAMED_PIPE /* We can only create pipes on NT */ #endif +/* ERROR is defined in wingdi.h */ +#undef ERROR + /* We need to close files to break connections on shutdown */ #ifndef SIGNAL_WITH_VIO_CLOSE #define SIGNAL_WITH_VIO_CLOSE diff --git a/include/m_ctype.h b/include/m_ctype.h index 785fa431385..65b11f4c06a 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -149,6 +149,7 @@ typedef struct my_charset_handler_st uint (*well_formed_len)(struct charset_info_st *, const char *b,const char *e, uint nchars); uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length); + uint (*numcells)(struct charset_info_st *, const char *b, const char *e); /* Unicode convertion */ int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc, @@ -325,6 +326,7 @@ int my_wildcmp_8bit(CHARSET_INFO *, int escape, int w_one, int w_many); uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e); +uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e); uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos); int my_mbcharlen_8bit(CHARSET_INFO *, uint c); @@ -342,6 +344,7 @@ int my_wildcmp_mb(CHARSET_INFO *, const char *wildstr,const char *wildend, int escape, int w_one, int w_many); uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); +uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_instr_mb(struct charset_info_st *, @@ -391,8 +394,10 @@ extern my_bool my_parse_charset_xml(const char *bug, uint len, #define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0)) #define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \ ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j))) -#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) +#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) #define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b))) +#define my_charpos(cs, b, e, num) (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num)) + #define use_mb(s) ((s)->cset->ismbchar != NULL) #define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b))) diff --git a/include/m_string.h b/include/m_string.h index 0709dbaffb4..97d34421537 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -238,6 +238,9 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error); #ifndef HAVE_STRTOULL #define HAVE_STRTOULL #endif +#ifndef HAVE_STRTOLL +#define HAVE_STRTOLL +#endif #else #ifdef HAVE_LONG_LONG extern char *longlong2str(longlong val,char *dst,int radix); diff --git a/include/my_getopt.h b/include/my_getopt.h index bf119892a31..e6ca1130f85 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -14,6 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef _my_getopt_h +#define _my_getopt_h + C_MODE_START #define GET_NO_ARG 1 @@ -51,14 +54,15 @@ struct my_option int app_type; /* To be used by an application */ }; +typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * ); +typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... ); + extern char *disabled_my_option; extern my_bool my_getopt_print_errors; +extern my_error_reporter my_getopt_error_reporter; extern int handle_options (int *argc, char ***argv, - const struct my_option *longopts, - my_bool (*get_one_option)(int, - const struct my_option *, - char *)); + const struct my_option *longopts, my_get_one_option); extern void my_print_help(const struct my_option *options); extern void my_print_variables(const struct my_option *options); extern void my_getopt_register_get_addr(gptr* (*func_addr)(const char *, uint, @@ -66,4 +70,8 @@ extern void my_getopt_register_get_addr(gptr* (*func_addr)(const char *, uint, ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp); my_bool getopt_compare_strings(const char *s, const char *t, uint length); + C_MODE_END + +#endif /* _my_getopt_h */ + diff --git a/include/my_global.h b/include/my_global.h index a6a777e8eaf..684617695a7 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -644,23 +644,17 @@ typedef SOCKET_SIZE_TYPE size_socket; #endif #endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/ -#if SIZEOF_LONG == 4 -#define INT_MIN32 (long) 0x80000000L -#define INT_MAX32 (long) 0x7FFFFFFFL -#define INT_MIN24 ((long) 0xff800000L) -#define INT_MAX24 0x007fffffL -#define INT_MIN16 ((short int) 0x8000) -#define INT_MAX16 0x7FFF -#define INT_MIN8 ((char) 0x80) -#define INT_MAX8 ((char) 0x7F) -#else /* Probably Alpha */ -#define INT_MIN32 ((long) (int) 0x80000000) -#define INT_MAX32 ((long) (int) 0x7FFFFFFF) -#define INT_MIN24 ((long) (int) 0xff800000) -#define INT_MAX24 ((long) (int) 0x007fffff) -#define INT_MIN16 ((short int) 0xffff8000) -#define INT_MAX16 ((short int) 0x00007FFF) -#endif +#define INT_MIN32 (~0x7FFFFFFFL) +#define INT_MAX32 0x7FFFFFFFL +#define UINT_MAX32 0xFFFFFFFFL +#define INT_MIN24 (~0x007FFFFF) +#define INT_MAX24 0x007FFFFF +#define UINT_MAX24 0x00FFFFFF +#define INT_MIN16 (~0x7FFF) +#define INT_MAX16 0x7FFF +#define UINT_MAX16 0xFFFF +#define INT_MIN8 (~0x7F) +#define INT_MAX8 0x7F /* From limits.h instead */ #ifndef DBL_MIN diff --git a/include/my_sys.h b/include/my_sys.h index 2ac86df87e8..0d722a899f6 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -251,6 +251,12 @@ typedef struct wild_file_pack /* Struct to hold info when selecting files */ my_string *wild; /* Pointer to wildcards */ } WF_PACK; +enum loglevel { + ERROR_LEVEL, + WARNING_LEVEL, + INFORMATION_LEVEL +}; + enum cache_type { READ_CACHE,WRITE_CACHE, @@ -701,7 +707,8 @@ File create_temp_file(char *to, const char *dir, const char *pfx, #define my_init_dynamic_array(A,B,C,D) init_dynamic_array(A,B,C,D CALLER_INFO) #define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_CALLER_INFO) extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size, - uint init_alloc,uint alloc_increment CALLER_INFO_PROTO); + uint init_alloc,uint alloc_increment + CALLER_INFO_PROTO); extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element); extern byte *alloc_dynamic(DYNAMIC_ARRAY *array); extern byte *pop_dynamic(DYNAMIC_ARRAY*); @@ -731,7 +738,7 @@ extern void my_free_lock(byte *ptr,myf flags); #define my_free_lock(A,B) my_free((A),(B)) #endif #define alloc_root_inited(A) ((A)->min_malloc != 0) -#define clear_alloc_root(A) bzero((void *) (A), sizeof(MEM_ROOT)) +#define clear_alloc_root(A) { (A)->free= (A)->used= (A)->pre_alloc= 0; } extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size, uint pre_alloc_size); extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size); diff --git a/include/my_time.h b/include/my_time.h index e42f7e9e402..d4dbe459c3b 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -27,6 +27,16 @@ C_MODE_START extern ulonglong log_10_int[20]; +extern uchar days_in_month[]; + +/* + Portable time_t replacement. + Should be signed and hold seconds for 1902-2038 range. +*/ +typedef long my_time_t; + +#define MY_TIME_T_MAX LONG_MAX +#define MY_TIME_T_MIN LONG_MIN #define YY_PART_YEAR 70 @@ -41,6 +51,15 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time, int *was_cut); +long calc_daynr(uint year,uint month,uint day); + +void init_time(void); + +my_time_t +my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap); + +void set_zero_time(MYSQL_TIME *tm); + C_MODE_END #endif /* _my_time_h_ */ diff --git a/include/myisampack.h b/include/myisampack.h index 06c94fea75f..c92429e4c01 100644 --- a/include/myisampack.h +++ b/include/myisampack.h @@ -22,215 +22,218 @@ */ /* these two are for uniformity */ -#define mi_sint1korr(A) (int8)(*A) -#define mi_uint1korr(A) (uint8)(*A) - -#define mi_sint2korr(A) (int16) (((int16) ((uchar) (A)[1])) +\ - ((int16) ((int16) (A)[0]) << 8)) -#define mi_sint3korr(A) ((int32) ((((uchar) (A)[0]) & 128) ? \ - (((uint32) 255L << 24) | \ - (((uint32) (uchar) (A)[0]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[2])) : \ - (((uint32) (uchar) (A)[0]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[2]))) -#define mi_sint4korr(A) (int32) (((int32) ((uchar) (A)[3])) +\ - (((int32) ((uchar) (A)[2]) << 8)) +\ - (((int32) ((uchar) (A)[1]) << 16)) +\ - (((int32) ((int16) (A)[0]) << 24))) -#define mi_sint8korr(A) (longlong) mi_uint8korr(A) -#define mi_uint2korr(A) (uint16) (((uint16) ((uchar) (A)[1])) +\ - ((uint16) ((uchar) (A)[0]) << 8)) -#define mi_uint3korr(A) (uint32) (((uint32) ((uchar) (A)[2])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[0])) << 16)) -#define mi_uint4korr(A) (uint32) (((uint32) ((uchar) (A)[3])) +\ - (((uint32) ((uchar) (A)[2])) << 8) +\ - (((uint32) ((uchar) (A)[1])) << 16) +\ - (((uint32) ((uchar) (A)[0])) << 24)) -#define mi_uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[4])) +\ - (((uint32) ((uchar) (A)[3])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[1])) << 24)) +\ - (((ulonglong) ((uchar) (A)[0])) << 32)) -#define mi_uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[5])) +\ - (((uint32) ((uchar) (A)[4])) << 8) +\ - (((uint32) ((uchar) (A)[3])) << 16) +\ - (((uint32) ((uchar) (A)[2])) << 24)) +\ - (((ulonglong) (((uint32) ((uchar) (A)[1])) +\ - (((uint32) ((uchar) (A)[0]) << 8)))) <<\ - 32)) -#define mi_uint7korr(A) ((ulonglong)(((uint32) ((uchar) (A)[6])) +\ - (((uint32) ((uchar) (A)[5])) << 8) +\ - (((uint32) ((uchar) (A)[4])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) +\ - (((ulonglong) (((uint32) ((uchar) (A)[2])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[0])) << 16))) <<\ - 32)) -#define mi_uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[7])) +\ - (((uint32) ((uchar) (A)[6])) << 8) +\ - (((uint32) ((uchar) (A)[5])) << 16) +\ - (((uint32) ((uchar) (A)[4])) << 24)) +\ - (((ulonglong) (((uint32) ((uchar) (A)[3])) +\ - (((uint32) ((uchar) (A)[2])) << 8) +\ - (((uint32) ((uchar) (A)[1])) << 16) +\ - (((uint32) ((uchar) (A)[0])) << 24))) <<\ - 32)) +#define mi_sint1korr(A) ((int8)(*A)) +#define mi_uint1korr(A) ((uint8)(*A)) + +#define mi_sint2korr(A) ((int16) (((int16) (((uchar*) (A))[1])) +\ + ((int16) ((int16) ((char*) (A))[0]) << 8))) +#define mi_sint3korr(A) ((int32) (((((uchar*) (A))[0]) & 128) ? \ + (((uint32) 255L << 24) | \ + (((uint32) ((uchar*) (A))[0]) << 16) |\ + (((uint32) ((uchar*) (A))[1]) << 8) | \ + ((uint32) ((uchar*) (A))[2])) : \ + (((uint32) ((uchar*) (A))[0]) << 16) |\ + (((uint32) ((uchar*) (A))[1]) << 8) | \ + ((uint32) ((uchar*) (A))[2]))) +#define mi_sint4korr(A) ((int32) (((int32) (((uchar*) (A))[3])) +\ + ((int32) (((uchar*) (A))[2]) << 8) +\ + ((int32) (((uchar*) (A))[1]) << 16) +\ + ((int32) ((int16) ((char*) (A))[0]) << 24))) +#define mi_sint8korr(A) ((longlong) mi_uint8korr(A)) +#define mi_uint2korr(A) ((uint16) (((uint16) (((uchar*) (A))[1])) +\ + ((uint16) (((uchar*) (A))[0]) << 8))) +#define mi_uint3korr(A) ((uint32) (((uint32) (((uchar*) (A))[2])) +\ + (((uint32) (((uchar*) (A))[1])) << 8) +\ + (((uint32) (((uchar*) (A))[0])) << 16))) +#define mi_uint4korr(A) ((uint32) (((uint32) (((uchar*) (A))[3])) +\ + (((uint32) (((uchar*) (A))[2])) << 8) +\ + (((uint32) (((uchar*) (A))[1])) << 16) +\ + (((uint32) (((uchar*) (A))[0])) << 24))) +#define mi_uint5korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[4])) +\ + (((uint32) (((uchar*) (A))[3])) << 8) +\ + (((uint32) (((uchar*) (A))[2])) << 16) +\ + (((uint32) (((uchar*) (A))[1])) << 24)) +\ + (((ulonglong) (((uchar*) (A))[0])) << 32)) +#define mi_uint6korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[5])) +\ + (((uint32) (((uchar*) (A))[4])) << 8) +\ + (((uint32) (((uchar*) (A))[3])) << 16) +\ + (((uint32) (((uchar*) (A))[2])) << 24)) +\ + (((ulonglong) (((uint32) (((uchar*) (A))[1])) +\ + (((uint32) (((uchar*) (A))[0]) << 8)))) <<\ + 32)) +#define mi_uint7korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[6])) +\ + (((uint32) (((uchar*) (A))[5])) << 8) +\ + (((uint32) (((uchar*) (A))[4])) << 16) +\ + (((uint32) (((uchar*) (A))[3])) << 24)) +\ + (((ulonglong) (((uint32) (((uchar*) (A))[2])) +\ + (((uint32) (((uchar*) (A))[1])) << 8) +\ + (((uint32) (((uchar*) (A))[0])) << 16))) <<\ + 32)) +#define mi_uint8korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[7])) +\ + (((uint32) (((uchar*) (A))[6])) << 8) +\ + (((uint32) (((uchar*) (A))[5])) << 16) +\ + (((uint32) (((uchar*) (A))[4])) << 24)) +\ + (((ulonglong) (((uint32) (((uchar*) (A))[3])) +\ + (((uint32) (((uchar*) (A))[2])) << 8) +\ + (((uint32) (((uchar*) (A))[1])) << 16) +\ + (((uint32) (((uchar*) (A))[0])) << 24))) <<\ + 32)) /* This one is for uniformity */ #define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A) -#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\ - *((uchar*) ((T)+1))= (uchar)(def_temp); \ - *((uchar*) ((T)+0))= (uchar)(def_temp >> 8); } -#define mi_int3store(T,A) { /*lint -save -e734 */\ - ulong def_temp= (ulong) (A);\ - *(((T)+2))=(char) (def_temp);\ - *((T)+1)= (char) (def_temp >> 8);\ - *((T)+0)= (char) (def_temp >> 16);\ - /*lint -restore */} -#define mi_int4store(T,A) { ulong def_temp= (ulong) (A);\ - *((T)+3)=(char) (def_temp);\ - *((T)+2)=(char) (def_temp >> 8);\ - *((T)+1)=(char) (def_temp >> 16);\ - *((T)+0)=(char) (def_temp >> 24); } -#define mi_int5store(T,A) { ulong def_temp= (ulong) (A),\ - def_temp2= (ulong) ((A) >> 32);\ - *((T)+4)=(char) (def_temp);\ - *((T)+3)=(char) (def_temp >> 8);\ - *((T)+2)=(char) (def_temp >> 16);\ - *((T)+1)=(char) (def_temp >> 24);\ - *((T)+0)=(char) (def_temp2); } -#define mi_int6store(T,A) { ulong def_temp= (ulong) (A),\ - def_temp2= (ulong) ((A) >> 32);\ - *((T)+5)=(char) (def_temp);\ - *((T)+4)=(char) (def_temp >> 8);\ - *((T)+3)=(char) (def_temp >> 16);\ - *((T)+2)=(char) (def_temp >> 24);\ - *((T)+1)=(char) (def_temp2);\ - *((T)+0)=(char) (def_temp2 >> 8); } -#define mi_int7store(T,A) { ulong def_temp= (ulong) (A),\ - def_temp2= (ulong) ((A) >> 32);\ - *((T)+6)=(char) (def_temp);\ - *((T)+5)=(char) (def_temp >> 8);\ - *((T)+4)=(char) (def_temp >> 16);\ - *((T)+3)=(char) (def_temp >> 24);\ - *((T)+2)=(char) (def_temp2);\ - *((T)+1)=(char) (def_temp2 >> 8);\ - *((T)+0)=(char) (def_temp2 >> 16); } -#define mi_int8store(T,A) { ulong def_temp3= (ulong) (A), \ - def_temp4= (ulong) ((A) >> 32); \ - mi_int4store((T),def_temp4); \ - mi_int4store((T+4),def_temp3); \ - } +#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\ + ((uchar*) (T))[1]= (uchar) (def_temp);\ + ((uchar*) (T))[0]= (uchar) (def_temp >> 8); } +#define mi_int3store(T,A) { /*lint -save -e734 */\ + ulong def_temp= (ulong) (A);\ + ((uchar*) (T))[2]= (uchar) (def_temp);\ + ((uchar*) (T))[1]= (uchar) (def_temp >> 8);\ + ((uchar*) (T))[0]= (uchar) (def_temp >> 16);\ + /*lint -restore */} +#define mi_int4store(T,A) { ulong def_temp= (ulong) (A);\ + ((uchar*) (T))[3]= (uchar) (def_temp);\ + ((uchar*) (T))[2]= (uchar) (def_temp >> 8);\ + ((uchar*) (T))[1]= (uchar) (def_temp >> 16);\ + ((uchar*) (T))[0]= (uchar) (def_temp >> 24); } +#define mi_int5store(T,A) { ulong def_temp= (ulong) (A),\ + def_temp2= (ulong) ((A) >> 32);\ + ((uchar*) (T))[4]= (uchar) (def_temp);\ + ((uchar*) (T))[3]= (uchar) (def_temp >> 8);\ + ((uchar*) (T))[2]= (uchar) (def_temp >> 16);\ + ((uchar*) (T))[1]= (uchar) (def_temp >> 24);\ + ((uchar*) (T))[0]= (uchar) (def_temp2); } +#define mi_int6store(T,A) { ulong def_temp= (ulong) (A),\ + def_temp2= (ulong) ((A) >> 32);\ + ((uchar*) (T))[5]= (uchar) (def_temp);\ + ((uchar*) (T))[4]= (uchar) (def_temp >> 8);\ + ((uchar*) (T))[3]= (uchar) (def_temp >> 16);\ + ((uchar*) (T))[2]= (uchar) (def_temp >> 24);\ + ((uchar*) (T))[1]= (uchar) (def_temp2);\ + ((uchar*) (T))[0]= (uchar) (def_temp2 >> 8); } +#define mi_int7store(T,A) { ulong def_temp= (ulong) (A),\ + def_temp2= (ulong) ((A) >> 32);\ + ((uchar*) (T))[6]= (uchar) (def_temp);\ + ((uchar*) (T))[5]= (uchar) (def_temp >> 8);\ + ((uchar*) (T))[4]= (uchar) (def_temp >> 16);\ + ((uchar*) (T))[3]= (uchar) (def_temp >> 24);\ + ((uchar*) (T))[2]= (uchar) (def_temp2);\ + ((uchar*) (T))[1]= (uchar) (def_temp2 >> 8);\ + ((uchar*) (T))[0]= (uchar) (def_temp2 >> 16); } +#define mi_int8store(T,A) { ulong def_temp3= (ulong) (A),\ + def_temp4= (ulong) ((A) >> 32);\ + mi_int4store((uchar*) (T) + 0, def_temp4);\ + mi_int4store((uchar*) (T) + 4, def_temp3); } #ifdef WORDS_BIGENDIAN -#define mi_float4store(T,A) { *(T)= ((byte *) &A)[0];\ - *((T)+1)=(char) ((byte *) &A)[1];\ - *((T)+2)=(char) ((byte *) &A)[2];\ - *((T)+3)=(char) ((byte *) &A)[3]; } +#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((uchar*) &A)[0];\ + ((uchar*) (T))[1]= ((uchar*) &A)[1];\ + ((uchar*) (T))[2]= ((uchar*) &A)[2];\ + ((uchar*) (T))[3]= ((uchar*) &A)[3]; } #define mi_float4get(V,M) { float def_temp;\ - ((byte*) &def_temp)[0]=(M)[0];\ - ((byte*) &def_temp)[1]=(M)[1];\ - ((byte*) &def_temp)[2]=(M)[2];\ - ((byte*) &def_temp)[3]=(M)[3];\ - (V)=def_temp; } - -#define mi_float8store(T,V) { *(T)= ((byte *) &V)[0];\ - *((T)+1)=(char) ((byte *) &V)[1];\ - *((T)+2)=(char) ((byte *) &V)[2];\ - *((T)+3)=(char) ((byte *) &V)[3];\ - *((T)+4)=(char) ((byte *) &V)[4];\ - *((T)+5)=(char) ((byte *) &V)[5];\ - *((T)+6)=(char) ((byte *) &V)[6];\ - *((T)+7)=(char) ((byte *) &V)[7]; } + ((uchar*) &def_temp)[0]= ((uchar*) (M))[0];\ + ((uchar*) &def_temp)[1]= ((uchar*) (M))[1];\ + ((uchar*) &def_temp)[2]= ((uchar*) (M))[2];\ + ((uchar*) &def_temp)[3]= ((uchar*) (M))[3];\ + (V)= def_temp; } + +#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[0];\ + ((uchar*) (T))[1]= ((uchar*) &V)[1];\ + ((uchar*) (T))[2]= ((uchar*) &V)[2];\ + ((uchar*) (T))[3]= ((uchar*) &V)[3];\ + ((uchar*) (T))[4]= ((uchar*) &V)[4];\ + ((uchar*) (T))[5]= ((uchar*) &V)[5];\ + ((uchar*) (T))[6]= ((uchar*) &V)[6];\ + ((uchar*) (T))[7]= ((uchar*) &V)[7]; } #define mi_float8get(V,M) { double def_temp;\ - ((byte*) &def_temp)[0]=(M)[0];\ - ((byte*) &def_temp)[1]=(M)[1];\ - ((byte*) &def_temp)[2]=(M)[2];\ - ((byte*) &def_temp)[3]=(M)[3];\ - ((byte*) &def_temp)[4]=(M)[4];\ - ((byte*) &def_temp)[5]=(M)[5];\ - ((byte*) &def_temp)[6]=(M)[6];\ - ((byte*) &def_temp)[7]=(M)[7]; \ - (V)=def_temp; } + ((uchar*) &def_temp)[0]= ((uchar*) (M))[0];\ + ((uchar*) &def_temp)[1]= ((uchar*) (M))[1];\ + ((uchar*) &def_temp)[2]= ((uchar*) (M))[2];\ + ((uchar*) &def_temp)[3]= ((uchar*) (M))[3];\ + ((uchar*) &def_temp)[4]= ((uchar*) (M))[4];\ + ((uchar*) &def_temp)[5]= ((uchar*) (M))[5];\ + ((uchar*) &def_temp)[6]= ((uchar*) (M))[6];\ + ((uchar*) &def_temp)[7]= ((uchar*) (M))[7]; \ + (V)= def_temp; } #else -#define mi_float4store(T,A) { *(T)= ((byte *) &A)[3];\ - *((T)+1)=(char) ((byte *) &A)[2];\ - *((T)+2)=(char) ((byte *) &A)[1];\ - *((T)+3)=(char) ((byte *) &A)[0]; } +#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((uchar*) &A)[3];\ + ((uchar*) (T))[1]= ((uchar*) &A)[2];\ + ((uchar*) (T))[2]= ((uchar*) &A)[1];\ + ((uchar*) (T))[3]= ((uchar*) &A)[0]; } #define mi_float4get(V,M) { float def_temp;\ - ((byte*) &def_temp)[0]=(M)[3];\ - ((byte*) &def_temp)[1]=(M)[2];\ - ((byte*) &def_temp)[2]=(M)[1];\ - ((byte*) &def_temp)[3]=(M)[0];\ - (V)=def_temp; } + ((uchar*) &def_temp)[0]= ((uchar*) (M))[3];\ + ((uchar*) &def_temp)[1]= ((uchar*) (M))[2];\ + ((uchar*) &def_temp)[2]= ((uchar*) (M))[1];\ + ((uchar*) &def_temp)[3]= ((uchar*) (M))[0];\ + (V)= def_temp; } #if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN) -#define mi_float8store(T,V) { *(T)= ((byte *) &V)[3];\ - *((T)+1)=(char) ((byte *) &V)[2];\ - *((T)+2)=(char) ((byte *) &V)[1];\ - *((T)+3)=(char) ((byte *) &V)[0];\ - *((T)+4)=(char) ((byte *) &V)[7];\ - *((T)+5)=(char) ((byte *) &V)[6];\ - *((T)+6)=(char) ((byte *) &V)[5];\ - *((T)+7)=(char) ((byte *) &V)[4];} +#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[3];\ + ((uchar*) (T))[1]= ((uchar*) &V)[2];\ + ((uchar*) (T))[2]= ((uchar*) &V)[1];\ + ((uchar*) (T))[3]= ((uchar*) &V)[0];\ + ((uchar*) (T))[4]= ((uchar*) &V)[7];\ + ((uchar*) (T))[5]= ((uchar*) &V)[6];\ + ((uchar*) (T))[6]= ((uchar*) &V)[5];\ + ((uchar*) (T))[7]= ((uchar*) &V)[4];} #define mi_float8get(V,M) { double def_temp;\ - ((byte*) &def_temp)[0]=(M)[3];\ - ((byte*) &def_temp)[1]=(M)[2];\ - ((byte*) &def_temp)[2]=(M)[1];\ - ((byte*) &def_temp)[3]=(M)[0];\ - ((byte*) &def_temp)[4]=(M)[7];\ - ((byte*) &def_temp)[5]=(M)[6];\ - ((byte*) &def_temp)[6]=(M)[5];\ - ((byte*) &def_temp)[7]=(M)[4];\ - (V)=def_temp; } + ((uchar*) &def_temp)[0]= ((uchar*) (M))[3];\ + ((uchar*) &def_temp)[1]= ((uchar*) (M))[2];\ + ((uchar*) &def_temp)[2]= ((uchar*) (M))[1];\ + ((uchar*) &def_temp)[3]= ((uchar*) (M))[0];\ + ((uchar*) &def_temp)[4]= ((uchar*) (M))[7];\ + ((uchar*) &def_temp)[5]= ((uchar*) (M))[6];\ + ((uchar*) &def_temp)[6]= ((uchar*) (M))[5];\ + ((uchar*) &def_temp)[7]= ((uchar*) (M))[4];\ + (V)= def_temp; } #else -#define mi_float8store(T,V) { *(T)= ((byte *) &V)[7];\ - *((T)+1)=(char) ((byte *) &V)[6];\ - *((T)+2)=(char) ((byte *) &V)[5];\ - *((T)+3)=(char) ((byte *) &V)[4];\ - *((T)+4)=(char) ((byte *) &V)[3];\ - *((T)+5)=(char) ((byte *) &V)[2];\ - *((T)+6)=(char) ((byte *) &V)[1];\ - *((T)+7)=(char) ((byte *) &V)[0];} +#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[7];\ + ((uchar*) (T))[1]= ((uchar*) &V)[6];\ + ((uchar*) (T))[2]= ((uchar*) &V)[5];\ + ((uchar*) (T))[3]= ((uchar*) &V)[4];\ + ((uchar*) (T))[4]= ((uchar*) &V)[3];\ + ((uchar*) (T))[5]= ((uchar*) &V)[2];\ + ((uchar*) (T))[6]= ((uchar*) &V)[1];\ + ((uchar*) (T))[7]= ((uchar*) &V)[0];} #define mi_float8get(V,M) { double def_temp;\ - ((byte*) &def_temp)[0]=(M)[7];\ - ((byte*) &def_temp)[1]=(M)[6];\ - ((byte*) &def_temp)[2]=(M)[5];\ - ((byte*) &def_temp)[3]=(M)[4];\ - ((byte*) &def_temp)[4]=(M)[3];\ - ((byte*) &def_temp)[5]=(M)[2];\ - ((byte*) &def_temp)[6]=(M)[1];\ - ((byte*) &def_temp)[7]=(M)[0];\ - (V)=def_temp; } + ((uchar*) &def_temp)[0]= ((uchar*) (M))[7];\ + ((uchar*) &def_temp)[1]= ((uchar*) (M))[6];\ + ((uchar*) &def_temp)[2]= ((uchar*) (M))[5];\ + ((uchar*) &def_temp)[3]= ((uchar*) (M))[4];\ + ((uchar*) &def_temp)[4]= ((uchar*) (M))[3];\ + ((uchar*) &def_temp)[5]= ((uchar*) (M))[2];\ + ((uchar*) &def_temp)[6]= ((uchar*) (M))[1];\ + ((uchar*) &def_temp)[7]= ((uchar*) (M))[0];\ + (V)= def_temp; } #endif /* __FLOAT_WORD_ORDER */ #endif /* WORDS_BIGENDIAN */ /* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */ #ifdef BIG_TABLES -#define mi_rowstore(T,A) mi_int8store(T,A) -#define mi_rowkorr(T) mi_uint8korr(T) +#define mi_rowstore(T,A) mi_int8store(T, A) +#define mi_rowkorr(T) mi_uint8korr(T) #else -#define mi_rowstore(T,A) { mi_int4store(T,0); mi_int4store(((T)+4),A); } -#define mi_rowkorr(T) mi_uint4korr((T)+4) +#define mi_rowstore(T,A) { mi_int4store(T, 0);\ + mi_int4store(((uchar*) (T) + 4), A); } +#define mi_rowkorr(T) mi_uint4korr((uchar*) (T) + 4) #endif #if SIZEOF_OFF_T > 4 -#define mi_sizestore(T,A) mi_int8store(T,A) -#define mi_sizekorr(T) mi_uint8korr(T) +#define mi_sizestore(T,A) mi_int8store(T, A) +#define mi_sizekorr(T) mi_uint8korr(T) #else -#define mi_sizestore(T,A) { if ((A) == HA_OFFSET_ERROR) bfill((char*) (T),8,255); else { mi_int4store((T),0); mi_int4store(((T)+4),A); }} -#define mi_sizekorr(T) mi_uint4korr((T)+4) +#define mi_sizestore(T,A) { if ((A) == HA_OFFSET_ERROR)\ + bfill((char*) (T), 8, 255);\ + else { mi_int4store((T), 0);\ + mi_int4store(((T) + 4), A); }} +#define mi_sizekorr(T) mi_uint4korr((uchar*) (T) + 4) #endif diff --git a/include/mysql.h b/include/mysql.h index 2af1c657aeb..9d08bf5aa57 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -99,7 +99,7 @@ typedef struct st_mysql_field { unsigned int flags; /* Div flags */ unsigned int decimals; /* Number of decimals in field */ unsigned int charsetnr; /* Character set */ - enum enum_field_types type; /* Type of field. Se mysql_com.h for types */ + enum enum_field_types type; /* Type of field. See mysql_com.h for types */ } MYSQL_FIELD; typedef char **MYSQL_ROW; /* return data as array of strings */ @@ -175,7 +175,7 @@ struct st_mysql_options { */ my_bool rpl_parse; /* - If set, never read from a master,only from slave, when doing + If set, never read from a master, only from slave, when doing a read that is replication-aware */ my_bool no_master_reads; @@ -454,7 +454,7 @@ int STDCALL mysql_add_slave(MYSQL* mysql, const char* host, const char* passwd); int STDCALL mysql_shutdown(MYSQL *mysql, - enum enum_shutdown_level + enum mysql_enum_shutdown_level shutdown_level); int STDCALL mysql_dump_debug_info(MYSQL *mysql); int STDCALL mysql_refresh(MYSQL *mysql, @@ -538,7 +538,7 @@ enum enum_mysql_stmt_state typedef struct st_mysql_bind { unsigned long *length; /* output length pointer */ - my_bool *is_null; /* Pointer to null indicators */ + my_bool *is_null; /* Pointer to null indicator */ void *buffer; /* buffer to get/put data */ enum enum_field_types buffer_type; /* buffer type */ unsigned long buffer_length; /* buffer length, must be set for str/binary */ @@ -587,7 +587,7 @@ typedef struct st_mysql_stmt */ unsigned int server_status; unsigned int last_errno; /* error code */ - unsigned int param_count; /* inpute parameters count */ + unsigned int param_count; /* input parameter count */ unsigned int field_count; /* number of columns in result set */ enum enum_mysql_stmt_state state; /* statement state */ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ @@ -638,6 +638,7 @@ typedef struct st_mysql_methods MYSQL_RES * (*use_result)(MYSQL *mysql); void (*fetch_lengths)(unsigned long *to, MYSQL_ROW column, unsigned int field_count); + void (*flush_use_result)(MYSQL *mysql); #if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) MYSQL_FIELD * (*list_fields)(MYSQL *mysql); my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); diff --git a/include/mysql_com.h b/include/mysql_com.h index fa73895000c..3cf1a011e3c 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -242,25 +242,32 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, #define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM #define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY -enum enum_shutdown_level { - /* - We want levels to be in growing order of hardness. So we leave room - for future intermediate levels. For now, escalating one level is += 10; - later if we insert new levels in between we will need a function - next_shutdown_level(level). Note that DEFAULT does not respect the - growing property. - */ - SHUTDOWN_DEFAULT= 0, /* mapped to WAIT_ALL_BUFFERS for now */ + +/* Shutdown/kill enums and constants */ + +/* Bits for THD::killable. */ +#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) +#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) +#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) +#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) + +enum mysql_enum_shutdown_level { /* - Here is the list in growing order (the next does the previous plus - something). WAIT_ALL_BUFFERS is what we have now. Others are "this MySQL - server does not support this shutdown level yet". + We want levels to be in growing order of hardness (because we use number + comparisons). Note that DEFAULT does not respect the growing property, but + it's ok. */ - SHUTDOWN_WAIT_CONNECTIONS= 10, /* wait for existing connections to finish */ - SHUTDOWN_WAIT_TRANSACTIONS= 20, /* wait for existing trans to finish */ - SHUTDOWN_WAIT_STATEMENTS= 30, /* wait for existing updating stmts to finish */ - SHUTDOWN_WAIT_ALL_BUFFERS= 40, /* flush InnoDB buffers */ - SHUTDOWN_WAIT_CRITICAL_BUFFERS= 50, /* flush MyISAM buffs (no corruption) */ + SHUTDOWN_DEFAULT = 0, + /* wait for existing connections to finish */ + SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT, + /* wait for existing trans to finish */ + SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS, + /* wait for existing updates to finish (=> no partial MyISAM update) */ + SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE, + /* flush InnoDB buffers and other storage engines' buffers*/ + SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), + /* don't flush InnoDB buffers, flush other storage engines' buffers*/ + SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, /* Now the 2 levels of the KILL command */ #if MYSQL_VERSION_ID >= 50000 KILL_QUERY= 254, diff --git a/include/mysql_time.h b/include/mysql_time.h index 943d018fc14..ec67d60dea5 100644 --- a/include/mysql_time.h +++ b/include/mysql_time.h @@ -17,7 +17,14 @@ #ifndef _mysql_time_h_ #define _mysql_time_h_ -/* Time declarations shared between server and client library */ +/* + Time declarations shared between the server and client API: + you should not add anything to this header unless it's used + (and hence should be visible) in mysql.h. + If you're looking for a place to add new time-related declaration, + it's most likely my_time.h. See also "C API Handling of Date + and Time Values" chapter in documentation. +*/ enum enum_mysql_timestamp_type { diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 432919db04b..125a39b2249 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -318,60 +318,61 @@ #define ER_WARN_INVALID_TIMESTAMP 1299 #define ER_INVALID_CHARACTER_STRING 1300 #define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301 -#define ER_SP_NO_RECURSIVE_CREATE 1302 -#define ER_SP_ALREADY_EXISTS 1303 -#define ER_SP_DOES_NOT_EXIST 1304 -#define ER_SP_DROP_FAILED 1305 -#define ER_SP_STORE_FAILED 1306 -#define ER_SP_LILABEL_MISMATCH 1307 -#define ER_SP_LABEL_REDEFINE 1308 -#define ER_SP_LABEL_MISMATCH 1309 -#define ER_SP_UNINIT_VAR 1310 -#define ER_SP_BADSELECT 1311 -#define ER_SP_BADRETURN 1312 -#define ER_SP_BADSTATEMENT 1313 -#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1314 -#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1315 -#define ER_QUERY_INTERRUPTED 1316 -#define ER_SP_WRONG_NO_OF_ARGS 1317 -#define ER_SP_COND_MISMATCH 1318 -#define ER_SP_NORETURN 1319 -#define ER_SP_NORETURNEND 1320 -#define ER_SP_BAD_CURSOR_QUERY 1321 -#define ER_SP_BAD_CURSOR_SELECT 1322 -#define ER_SP_CURSOR_MISMATCH 1323 -#define ER_SP_CURSOR_ALREADY_OPEN 1324 -#define ER_SP_CURSOR_NOT_OPEN 1325 -#define ER_SP_UNDECLARED_VAR 1326 -#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1327 -#define ER_SP_FETCH_NO_DATA 1328 -#define ER_SP_DUP_PARAM 1329 -#define ER_SP_DUP_VAR 1330 -#define ER_SP_DUP_COND 1331 -#define ER_SP_DUP_CURS 1332 -#define ER_SP_CANT_ALTER 1333 -#define ER_SP_SUBSELECT_NYI 1334 -#define ER_SP_NO_USE 1335 -#define ER_SP_VARCOND_AFTER_CURSHNDLR 1336 -#define ER_SP_CURSOR_AFTER_HANDLER 1337 -#define ER_SP_CASE_NOT_FOUND 1338 -#define ER_FPARSER_TOO_BIG_FILE 1339 -#define ER_FPARSER_BAD_HEADER 1340 -#define ER_FPARSER_EOF_IN_COMMENT 1341 -#define ER_FPARSER_ERROR_IN_PARAMETER 1342 -#define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1343 -#define ER_VIEW_NO_EXPLAIN 1344 -#define ER_FRM_UNKNOWN_TYPE 1345 -#define ER_WRONG_OBJECT 1346 -#define ER_NONUPDATEABLE_COLUMN 1347 -#define ER_VIEW_SELECT_DERIVED 1348 -#define ER_VIEW_SELECT_CLAUSE 1349 -#define ER_VIEW_SELECT_VARIABLE 1350 -#define ER_VIEW_SELECT_TMPTABLE 1351 -#define ER_VIEW_WRONG_LIST 1352 -#define ER_WARN_VIEW_MERGE 1353 -#define ER_WARN_VIEW_WITHOUT_KEY 1354 -#define ER_VIEW_INVALID 1355 -#define ER_SP_NO_DROP_SP 1356 -#define ER_SP_GOTO_IN_HNDLR 1357 -#define ER_ERROR_MESSAGES 358 +#define ER_CONFLICTING_DECLARATIONS 1302 +#define ER_SP_NO_RECURSIVE_CREATE 1303 +#define ER_SP_ALREADY_EXISTS 1304 +#define ER_SP_DOES_NOT_EXIST 1305 +#define ER_SP_DROP_FAILED 1306 +#define ER_SP_STORE_FAILED 1307 +#define ER_SP_LILABEL_MISMATCH 1308 +#define ER_SP_LABEL_REDEFINE 1309 +#define ER_SP_LABEL_MISMATCH 1310 +#define ER_SP_UNINIT_VAR 1311 +#define ER_SP_BADSELECT 1312 +#define ER_SP_BADRETURN 1313 +#define ER_SP_BADSTATEMENT 1314 +#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1315 +#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1316 +#define ER_QUERY_INTERRUPTED 1317 +#define ER_SP_WRONG_NO_OF_ARGS 1318 +#define ER_SP_COND_MISMATCH 1319 +#define ER_SP_NORETURN 1320 +#define ER_SP_NORETURNEND 1321 +#define ER_SP_BAD_CURSOR_QUERY 1322 +#define ER_SP_BAD_CURSOR_SELECT 1323 +#define ER_SP_CURSOR_MISMATCH 1324 +#define ER_SP_CURSOR_ALREADY_OPEN 1325 +#define ER_SP_CURSOR_NOT_OPEN 1326 +#define ER_SP_UNDECLARED_VAR 1327 +#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1328 +#define ER_SP_FETCH_NO_DATA 1329 +#define ER_SP_DUP_PARAM 1330 +#define ER_SP_DUP_VAR 1331 +#define ER_SP_DUP_COND 1332 +#define ER_SP_DUP_CURS 1333 +#define ER_SP_CANT_ALTER 1334 +#define ER_SP_SUBSELECT_NYI 1335 +#define ER_SP_NO_USE 1336 +#define ER_SP_VARCOND_AFTER_CURSHNDLR 1337 +#define ER_SP_CURSOR_AFTER_HANDLER 1338 +#define ER_SP_CASE_NOT_FOUND 1339 +#define ER_FPARSER_TOO_BIG_FILE 1340 +#define ER_FPARSER_BAD_HEADER 1341 +#define ER_FPARSER_EOF_IN_COMMENT 1342 +#define ER_FPARSER_ERROR_IN_PARAMETER 1343 +#define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1344 +#define ER_VIEW_NO_EXPLAIN 1345 +#define ER_FRM_UNKNOWN_TYPE 1346 +#define ER_WRONG_OBJECT 1347 +#define ER_NONUPDATEABLE_COLUMN 1348 +#define ER_VIEW_SELECT_DERIVED 1349 +#define ER_VIEW_SELECT_CLAUSE 1350 +#define ER_VIEW_SELECT_VARIABLE 1351 +#define ER_VIEW_SELECT_TMPTABLE 1352 +#define ER_VIEW_WRONG_LIST 1353 +#define ER_WARN_VIEW_MERGE 1354 +#define ER_WARN_VIEW_WITHOUT_KEY 1355 +#define ER_VIEW_INVALID 1356 +#define ER_SP_NO_DROP_SP 1357 +#define ER_SP_GOTO_IN_HNDLR 1358 +#define ER_ERROR_MESSAGES 359 diff --git a/include/sql_common.h b/include/sql_common.h index 3f50008a922..cde53786f83 100644 --- a/include/sql_common.h +++ b/include/sql_common.h @@ -25,7 +25,6 @@ extern "C" { MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, my_bool default_value, uint server_capabilities); void free_rows(MYSQL_DATA *cur); -void flush_use_result(MYSQL *mysql); my_bool mysql_autenticate(MYSQL *mysql, const char *passwd); void free_old_query(MYSQL *mysql); void end_server(MYSQL *mysql); |