diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 9 | ||||
-rw-r--r-- | include/my_sys.h | 9 | ||||
-rw-r--r-- | include/myisam.h | 7 | ||||
-rw-r--r-- | include/mysql.h | 8 |
4 files changed, 23 insertions, 10 deletions
diff --git a/include/my_global.h b/include/my_global.h index 7cd79b3e078..e8527e83e28 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -965,4 +965,13 @@ typedef union { #define statistic_add(V,C,L) (V)+=(C) #endif +/* Macros to make switching between C and C++ mode easier */ +#ifdef __cplusplus +#define C_MODE_START extern "C" { +#define C_MODE_END } +#else +#define C_MODE_START +#define C_MODE_END +#endif + #endif /* _global_h */ diff --git a/include/my_sys.h b/include/my_sys.h index b70d123a66a..0ab39f1146b 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -106,7 +106,8 @@ extern int NEAR my_errno; /* Last error in mysys */ #define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */ #define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */ #define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl. */ -#define KEYCACHE_BLOCK_SIZE 1024 +#define DEFAULT_KEYCACHE_BLOCK_SIZE 1024 +#define MAX_KEYCACHE_BLOCK_SIZE 16384 /* root_alloc flags */ #define MY_KEEP_PREALLOC 1 @@ -190,9 +191,10 @@ extern char *get_charsets_dir(char *buf); /* statistics */ extern ulong _my_cache_w_requests,_my_cache_write,_my_cache_r_requests, _my_cache_read; -extern ulong _my_blocks_used,_my_blocks_changed; +extern ulong _my_blocks_used,_my_blocks_changed; +extern uint key_cache_block_size; extern ulong my_file_opened,my_stream_opened, my_tmp_file_created; -extern my_bool key_cache_inited; +extern my_bool key_cache_inited, my_init_done; /* Point to current my_message() */ extern void (*my_sigtstp_cleanup)(void), @@ -602,6 +604,7 @@ my_bool my_compress(byte *, ulong *, ulong *); my_bool my_uncompress(byte *, ulong *, ulong *); byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen); ulong checksum(const byte *mem, uint count); +uint my_bit_log2(ulong value); #if defined(_MSC_VER) && !defined(__WIN__) extern void sleep(int sec); diff --git a/include/myisam.h b/include/myisam.h index 78dbfd62cbe..36c0de5034f 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -46,6 +46,11 @@ extern "C" { /* Max extra space to use when sorting keys */ #define MI_MAX_TEMP_LENGTH 256*1024L*1024L +/* Possible values for myisam_block_size (must be power of 2) */ +#define MI_KEY_BLOCK_LENGTH 1024 /* default key block length */ +#define MI_MIN_KEY_BLOCK_LENGTH 1024 /* Min key block length */ +#define MI_MAX_KEY_BLOCK_LENGTH 16384 + #define mi_portable_sizeof_char_ptr 8 typedef uint32 ha_checksum; @@ -192,7 +197,7 @@ extern uint myisam_block_size; extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user; extern my_bool myisam_concurrent_insert; extern my_off_t myisam_max_temp_length,myisam_max_extra_temp_length; -extern uint myisam_bulk_insert_tree_size; +extern ulong myisam_bulk_insert_tree_size; /* Prototypes for myisam-functions */ diff --git a/include/mysql.h b/include/mysql.h index 7867dea2c31..a82a35efc4b 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -26,11 +26,9 @@ #undef __WIN__ #endif -#ifndef MYSQL_SERVER #ifdef __cplusplus extern "C" { #endif -#endif #ifndef _global_h /* If not standard header */ #include <sys/types.h> @@ -229,7 +227,7 @@ typedef struct st_mysql_res { /* Set up and bring down the server; to ensure that applications will * work when linked against either the standard client library or the * embedded server library, these functions should be called. */ -void mysql_server_init(int argc, const char **argv, const char **groups); +int mysql_server_init(int argc, const char **argv, const char **groups); void mysql_server_end(); /* Set up and bring down a thread; these function should be called @@ -382,10 +380,8 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); #define HAVE_MYSQL_REAL_CONNECT -#ifndef MYSQL_SERVER #ifdef __cplusplus } #endif -#endif -#endif +#endif /* _mysql_h */ |