diff options
author | Chad MILLER <chad@mysql.com> | 2008-07-10 14:47:53 -0400 |
---|---|---|
committer | Chad MILLER <chad@mysql.com> | 2008-07-10 14:47:53 -0400 |
commit | 6a6e77eeffc7dbd72888ef685fdb93fc2ae7aed6 (patch) | |
tree | d78d316822f255f22093dc0cc26ea8943b5f91d4 /include | |
parent | 5e0d806d276d27fef1a5dfcdca92f010836510ed (diff) | |
parent | 1aaa63aabaef8015c71fc6143b3062e197049707 (diff) | |
download | mariadb-git-6a6e77eeffc7dbd72888ef685fdb93fc2ae7aed6.tar.gz |
Merge chunk from trunk.
Diffstat (limited to 'include')
-rw-r--r-- | include/m_string.h | 1 | ||||
-rw-r--r-- | include/my_getopt.h | 3 | ||||
-rw-r--r-- | include/my_global.h | 55 | ||||
-rw-r--r-- | include/my_sys.h | 6 | ||||
-rw-r--r-- | include/mysql_com.h | 14 |
5 files changed, 43 insertions, 36 deletions
diff --git a/include/m_string.h b/include/m_string.h index 981111b8718..c26d0fb9260 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -219,6 +219,7 @@ double my_strtod(const char *str, char **end, int *error); double my_atof(const char *nptr); extern char *llstr(longlong value,char *buff); +extern char *ullstr(longlong value,char *buff); #ifndef HAVE_STRTOUL extern long strtol(const char *str, char **ptr, int base); extern ulong strtoul(const char *str, char **ptr, int base); diff --git a/include/my_getopt.h b/include/my_getopt.h index dcd6ad9d79b..f5688a37231 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -67,7 +67,8 @@ extern void my_print_variables(const struct my_option *options); extern void my_getopt_register_get_addr(gptr* (*func_addr)(const char *, uint, const struct my_option *)); -ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp); +ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, + bool *fixed); my_bool getopt_compare_strings(const char *s, const char *t, uint length); C_MODE_END diff --git a/include/my_global.h b/include/my_global.h index dd3bc39413d..08877300d8a 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -109,36 +109,31 @@ The macros below are used to allow build of Universal/fat binaries of MySQL and MySQL applications under darwin. */ -#ifdef TARGET_FAT_BINARY -# undef SIZEOF_CHARP -# undef SIZEOF_INT -# undef SIZEOF_LONG -# undef SIZEOF_LONG_LONG -# undef SIZEOF_OFF_T -# undef SIZEOF_SHORT - -#if defined(__i386__) -# undef WORDS_BIGENDIAN -# define SIZEOF_CHARP 4 -# define SIZEOF_INT 4 -# define SIZEOF_LONG 4 -# define SIZEOF_LONG_LONG 8 -# define SIZEOF_OFF_T 8 -# define SIZEOF_SHORT 2 - -#elif defined(__ppc__) -# define WORDS_BIGENDIAN -# define SIZEOF_CHARP 4 -# define SIZEOF_INT 4 -# define SIZEOF_LONG 4 -# define SIZEOF_LONG_LONG 8 -# define SIZEOF_OFF_T 8 -# define SIZEOF_SHORT 2 - -#else -# error Building FAT binary for an unknown architecture. -#endif -#endif /* TARGET_FAT_BINARY */ +#if defined(__APPLE__) && defined(__MACH__) +# undef SIZEOF_CHARP +# undef SIZEOF_SHORT +# undef SIZEOF_INT +# undef SIZEOF_LONG +# undef SIZEOF_LONG_LONG +# undef SIZEOF_OFF_T +# undef WORDS_BIGENDIAN +# define SIZEOF_SHORT 2 +# define SIZEOF_INT 4 +# define SIZEOF_LONG_LONG 8 +# define SIZEOF_OFF_T 8 +# if defined(__i386__) || defined(__ppc__) +# define SIZEOF_CHARP 4 +# define SIZEOF_LONG 4 +# elif defined(__x86_64__) || defined(__ppc64__) +# define SIZEOF_CHARP 8 +# define SIZEOF_LONG 8 +# else +# error Building FAT binary for an unknown architecture. +# endif +# if defined(__ppc__) || defined(__ppc64__) +# define WORDS_BIGENDIAN +# endif +#endif /* defined(__APPLE__) && defined(__MACH__) */ /* diff --git a/include/my_sys.h b/include/my_sys.h index 75347713a55..099310d9f4b 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -531,6 +531,12 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *); #define my_b_tell(info) ((info)->pos_in_file + \ (uint) (*(info)->current_pos - (info)->request_pos)) +#define my_b_get_buffer_start(info) (info)->request_pos +#define my_b_get_bytes_in_buffer(info) (char*) (info)->read_end - \ + (char*) my_b_get_buffer_start(info) +#define my_b_get_pos_in_file(info) (info)->pos_in_file + + /* tell write offset in the SEQ_APPEND cache */ my_off_t my_b_append_tell(IO_CACHE* info); my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */ diff --git a/include/mysql_com.h b/include/mysql_com.h index 889579e3622..94b34c1c3f0 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -387,12 +387,16 @@ typedef struct st_udf_args typedef struct st_udf_init { - my_bool maybe_null; /* 1 if function can return NULL */ - unsigned int decimals; /* for real functions */ - unsigned long max_length; /* For string functions */ - char *ptr; /* free pointer for function data */ - my_bool const_item; /* 0 if result is independent of arguments */ + my_bool maybe_null; /* 1 if function can return NULL */ + unsigned int decimals; /* for real functions */ + unsigned long max_length; /* For string functions */ + char *ptr; /* free pointer for function data */ + my_bool const_item; /* 1 if function always returns the same value */ } UDF_INIT; +/* + TODO: add a notion for determinism of the UDF. + See Item_udf_func::update_used_tables () +*/ /* Constants when using compression */ #define NET_HEADER_SIZE 4 /* standard header size */ |