diff options
author | Michael Widenius <monty@askmonty.org> | 2010-08-05 22:56:11 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-08-05 22:56:11 +0300 |
commit | d042146e5b41b6222df3e6b4c16a44f3ef2939b7 (patch) | |
tree | e40f5b435f7d17ed1c24dfb787ab8cd5f4f7d5d8 /include | |
parent | 3e610bc58d0ba325fdca3b06dfa976ecc513dc1e (diff) | |
parent | f0f21036951f6fed2fddeb58375425f957751fd5 (diff) | |
download | mariadb-git-d042146e5b41b6222df3e6b4c16a44f3ef2939b7.tar.gz |
Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
Diffstat (limited to 'include')
-rw-r--r-- | include/m_string.h | 3 | ||||
-rw-r--r-- | include/my_alarm.h | 4 | ||||
-rw-r--r-- | include/my_base.h | 11 | ||||
-rw-r--r-- | include/my_bitmap.h | 2 | ||||
-rw-r--r-- | include/my_getopt.h | 21 | ||||
-rw-r--r-- | include/my_global.h | 8 | ||||
-rw-r--r-- | include/my_sys.h | 2 | ||||
-rw-r--r-- | include/my_valgrind.h | 24 | ||||
-rw-r--r-- | include/myisam.h | 2 | ||||
-rw-r--r-- | include/sslopt-longopts.h | 21 |
10 files changed, 50 insertions, 48 deletions
diff --git a/include/m_string.h b/include/m_string.h index dc7b7c414c5..31719781a48 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -124,9 +124,6 @@ extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len); extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len); #undef bcmp #define bcmp(A,B,C) my_bcmp((A),(B),(C)) -#define bzero_if_valgrind(A,B) bzero(A,B) -#else -#define bzero_if_valgrind(A,B) #endif /* HAVE_valgrind */ #if defined(_lint) || defined(FORCE_INIT_OF_VARS) diff --git a/include/my_alarm.h b/include/my_alarm.h index 750135d64ed..c41c1d65e27 100644 --- a/include/my_alarm.h +++ b/include/my_alarm.h @@ -36,14 +36,14 @@ extern ulong my_time_to_wait_for_lock; #define ALARM_END VOID(signal(SIGALRM,alarm_signal)); \ VOID(alarm(alarm_old)); #define ALARM_TEST my_have_got_alarm -#ifdef DONT_REMEMBER_SIGNAL +#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY #define ALARM_REINIT VOID(alarm(MY_HOW_OFTEN_TO_ALARM)); \ VOID(signal(SIGALRM,my_set_alarm_variable));\ my_have_got_alarm=0; #else #define ALARM_REINIT VOID(alarm((uint) MY_HOW_OFTEN_TO_ALARM)); \ my_have_got_alarm=0; -#endif /* DONT_REMEMBER_SIGNAL */ +#endif /* SIGNAL_HANDLER_RESET_ON_DELIVERY */ #else #define ALARM_VARIABLES long alarm_pos=0,alarm_end_pos=MY_HOW_OFTEN_TO_WRITE-1 #define ALARM_INIT diff --git a/include/my_base.h b/include/my_base.h index 2aa49bd1787..8065441d4d7 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -272,17 +272,6 @@ enum ha_base_keytype { #define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */ #define HA_USES_BLOCK_SIZE ((uint) 32768) #define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */ -#if MYSQL_VERSION_ID < 0x50200 -/* - Key has a part that can have end space. If this is an unique key - we have to handle it differently from other unique keys as we can find - many matching rows for one key (because end space are not compared) -*/ -#define HA_END_SPACE_KEY 0 /* was: 4096 */ -#else -#error HA_END_SPACE_KEY is obsolete, please remove it -#endif - /* These flags can be added to key-seg-flag */ diff --git a/include/my_bitmap.h b/include/my_bitmap.h index 78642df3362..2c50ca3ec75 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -53,6 +53,8 @@ extern my_bool bitmap_is_overlapping(const MY_BITMAP *map1, extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit); extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit); extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit); +extern my_bool bitmap_union_is_set_all(const MY_BITMAP *map1, + const MY_BITMAP *map2); extern uint bitmap_set_next(MY_BITMAP *map); extern uint bitmap_get_first(const MY_BITMAP *map); extern uint bitmap_get_first_set(const MY_BITMAP *map); diff --git a/include/my_getopt.h b/include/my_getopt.h index 7cbad607aac..d7c996302fd 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -45,10 +45,10 @@ struct my_option const char *name; /* Name of the option */ int id; /* unique id or short option */ const char *comment; /* option comment, for autom. --help */ - uchar **value; /* The variable value */ - uchar **u_max_value; /* The user def. max variable value */ + void *value; /* The variable value */ + void *u_max_value; /* The user def. max variable value */ struct st_typelib *typelib; /* Pointer to possible values */ - ulong var_type; + ulong var_type; /* Must match the variable type */ enum get_opt_arg_type arg_type; longlong def_value; /* Default value */ longlong min_value; /* Min allowed value */ @@ -58,8 +58,16 @@ struct my_option void *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, ... ); +typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *); +typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...); +/** + Used to retrieve a reference to the object (variable) that holds the value + for the given option. For example, if var_type is GET_UINT, the function + must return a pointer to a variable of type uint. A argument is stored in + the location pointed to by the returned pointer. +*/ +typedef void *(*my_getopt_value)(const char *, uint, const struct my_option *, + int *); extern char *disabled_my_option; extern my_bool my_getopt_print_errors; @@ -71,8 +79,7 @@ extern int handle_options (int *argc, char ***argv, extern void my_cleanup_options(const struct my_option *options); 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(uchar ** (*func_addr)(const char *, uint, - const struct my_option *, int *)); +extern void my_getopt_register_get_addr(my_getopt_value); ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, my_bool *fix); diff --git a/include/my_global.h b/include/my_global.h index 8910990a148..6add808ed55 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -55,6 +55,10 @@ #define USE_PRAGMA_INTERFACE #endif +#if defined(__OpenBSD__) && (OpenBSD >= 200411) +#define HAVE_ERRNO_AS_DEFINE +#endif + #if defined(i386) && !defined(__i386__) #define __i386__ #endif @@ -548,8 +552,8 @@ extern "C" int madvise(void *addr, size_t len, int behav); #endif /* Does the system remember a signal handler after a signal ? */ -#ifndef HAVE_BSD_SIGNALS -#define DONT_REMEMBER_SIGNAL +#if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION) +#define SIGNAL_HANDLER_RESET_ON_DELIVERY #endif /* Define void to stop lint from generating "null effekt" comments */ diff --git a/include/my_sys.h b/include/my_sys.h index 3c492e661d3..81917c48acd 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -37,7 +37,7 @@ extern int NEAR my_errno; /* Last error in mysys */ #define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; } #define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;} -#define MY_INIT(name); { my_progname= name; my_init(); } +#define MY_INIT(name) { my_progname= name; my_init(); } #define MY_FILE_ERROR ((size_t) -1) diff --git a/include/my_valgrind.h b/include/my_valgrind.h index 301f9f85464..da434454565 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -24,15 +24,19 @@ #if defined(HAVE_valgrind)&& defined(HAVE_VALGRIND_MEMCHECK_H) #include <valgrind/memcheck.h> -#else -#define VALGRIND_MAKE_MEM_DEFINED(addr, size) do { } while(0) -#define VALGRIND_MAKE_MEM_NOACCESS(addr, size) do { } while(0) +#define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len) +#define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len) +#define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len) +#define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len) +#else /* HAVE_VALGRIND */ +# define MEM_UNDEFINED(a,len) ((void) 0) +# define MEM_NOACCESS(a,len) ((void) 0) +# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) +# define MEM_CHECK_DEFINED(a,len) ((void) 0) +#endif /* HAVE_VALGRIND */ + #ifdef SAFEMALLOC -#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) bfill(addr, size, 0x8F) +#define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0) #else -#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) do { } while(0) -#endif /* SAFEMALLOC */ -#endif /* HAVE_valgrind */ - -/* Compatibility with old source */ -#define TRASH(A,B) VALGRIND_MAKE_MEM_UNDEFINED(A, B) +#define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while (0) +#endif diff --git a/include/myisam.h b/include/myisam.h index 3d2a326363d..8413b7936e3 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -48,8 +48,6 @@ extern "C" { #define MI_NAME_IEXT ".MYI" #define MI_NAME_DEXT ".MYD" -/* Max extra space to use when sorting keys */ -#define MI_MAX_TEMP_LENGTH 2*1024L*1024L*1024L /* Possible values for myisam_block_size (must be power of 2) */ #define MI_KEY_BLOCK_LENGTH 1024 /* default key block length */ diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h index c76b5dcd252..c038ece1644 100644 --- a/include/sslopt-longopts.h +++ b/include/sslopt-longopts.h @@ -16,30 +16,31 @@ #ifdef HAVE_OPENSSL {"ssl", OPT_SSL_SSL, - "Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.", - (uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, 0, 0, - 0, 0, 0}, + "Enable SSL for connection (automatically enabled with other flags)." + "Disable with --skip-ssl.", &opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, {"ssl-ca", OPT_SSL_CA, "CA file in PEM format (check OpenSSL docs, implies --ssl).", - (uchar **) &opt_ssl_ca, (uchar **) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, + &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ssl-capath", OPT_SSL_CAPATH, "CA directory (check OpenSSL docs, implies --ssl).", - (uchar **) &opt_ssl_capath, (uchar **) &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, + &opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", - (uchar **) &opt_ssl_cert, (uchar **) &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG, + &opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", - (uchar **) &opt_ssl_cipher, (uchar **) &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG, + &opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", - (uchar **) &opt_ssl_key, (uchar **) &opt_ssl_key, 0, GET_STR, REQUIRED_ARG, + &opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #ifdef MYSQL_CLIENT {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, - "Verify server's \"Common Name\" in its cert against hostname used when connecting. This option is disabled by default.", - (uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert, + "Verify server's \"Common Name\" in its cert against hostname used " + "when connecting. This option is disabled by default.", + &opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif #endif /* HAVE_OPENSSL */ |