diff options
author | sergefp@mysql.com <> | 2003-12-20 00:54:38 +0300 |
---|---|---|
committer | sergefp@mysql.com <> | 2003-12-20 00:54:38 +0300 |
commit | 23b25675f269acb2ae07e8a32bb37f68d523b299 (patch) | |
tree | 6f1ee123b4c43806a2d62ab70bfdc1402e51dff9 /include | |
parent | a8456e6801040e9b10aa3a89621b360684dc543c (diff) | |
parent | 29e1bddb4337481ae2fbdfb6558060f85841eacb (diff) | |
download | mariadb-git-23b25675f269acb2ae07e8a32bb37f68d523b299.tar.gz |
Merge mysql.com:/home/psergey/mysql-5.0-latest-pull
into mysql.com:/dbdata/psergey/mysql-5.0-imerge-unique
Diffstat (limited to 'include')
-rw-r--r-- | include/config-win.h | 5 | ||||
-rw-r--r-- | include/errmsg.h | 3 | ||||
-rw-r--r-- | include/my_base.h | 10 | ||||
-rw-r--r-- | include/my_dir.h | 11 | ||||
-rw-r--r-- | include/my_global.h | 24 | ||||
-rw-r--r-- | include/my_pthread.h | 3 | ||||
-rw-r--r-- | include/my_sys.h | 4 | ||||
-rw-r--r-- | include/mysql.h | 3 | ||||
-rw-r--r-- | include/mysql_com.h | 2 | ||||
-rw-r--r-- | include/mysql_embed.h | 2 | ||||
-rw-r--r-- | include/mysqld_error.h | 2 | ||||
-rw-r--r-- | include/sql_state.h | 2 |
12 files changed, 57 insertions, 14 deletions
diff --git a/include/config-win.h b/include/config-win.h index 86318bddbcb..10490fd2f91 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -93,6 +93,7 @@ functions */ #define LONGLONG_MIN ((__int64) 0x8000000000000000) #define LONGLONG_MAX ((__int64) 0x7FFFFFFFFFFFFFFF) +#define ULONGLONG_MAX ((unsigned __int64) 0xFFFFFFFFFFFFFFFF) #define LL(A) ((__int64) A) /* Type information */ @@ -158,6 +159,10 @@ typedef uint rf_SetTimer; #define USE_MB_IDENT 1 #define USE_STRCOLL 1 +/* All windows servers should support .sym files */ +#undef USE_SYMDIR +#define USE_SYMDIR + /* If LOAD DATA LOCAL INFILE should be enabled by default */ #define ENABLED_LOCAL_INFILE 1 diff --git a/include/errmsg.h b/include/errmsg.h index 24326b1efef..8f3ddfa9796 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -86,5 +86,4 @@ extern const char *client_errors[]; /* Error messages */ #define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2045 #define CR_CONN_UNKNOW_PROTOCOL 2046 #define CR_INVALID_CONN_HANDLE 2047 -#define CR_MYSQL_SERVER_INIT_MISSED 2048 -#define CR_SECURE_AUTH 2049 +#define CR_SECURE_AUTH 2048 diff --git a/include/my_base.h b/include/my_base.h index 25521d7b13d..89b46de520f 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -190,11 +190,17 @@ enum ha_base_keytype { /* poor old NISAM has 8-bit flags :-( */ #define HA_SORT_ALLOWS_SAME 128 /* Intern bit when sorting records */ #endif +/* + 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 (becaue end space are not compared) +*/ +#define HA_END_SPACE_KEY 4096 - /* These flags can be order to key-seg-flag */ + /* These flags can be added to key-seg-flag */ #define HA_SPACE_PACK 1 /* Pack space in key-seg */ -#define HA_PART_KEY 4 /* Used by MySQL for part-key-cols */ +#define HA_PART_KEY_SEG 4 /* Used by MySQL for part-key-cols */ #define HA_VAR_LENGTH 8 #define HA_NULL_PART 16 #define HA_BLOB_PART 32 diff --git a/include/my_dir.h b/include/my_dir.h index 4ccda050914..851b6d8d7e9 100644 --- a/include/my_dir.h +++ b/include/my_dir.h @@ -74,14 +74,21 @@ typedef struct my_stat #endif /* USE_MY_STAT_STRUCT */ -typedef struct fileinfo /* Struct returned from my_dir & my_stat */ +/* Struct describing one file returned from my_dir */ +typedef struct fileinfo { char *name; - MY_STAT mystat; + MY_STAT *mystat; } FILEINFO; typedef struct st_my_dir /* Struct returned from my_dir */ { + /* + These members are just copies of parts of DYNAMIC_ARRAY structure, + which is allocated right after the end of MY_DIR structure (MEM_ROOT + for storing names is also resides there). We've left them here because + we don't want to change code that uses my_dir. + */ struct fileinfo *dir_entry; uint number_off_files; } MY_DIR; diff --git a/include/my_global.h b/include/my_global.h index a34a0bd786c..3275b010bb4 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -294,6 +294,9 @@ C_MODE_END #endif #ifdef HAVE_ATOMIC_ADD #define __SMP__ +#ifdef HAVE_LINUX_CONFIG_H +#include <linux/config.h> /* May define CONFIG_SMP */ +#endif #ifndef CONFIG_SMP #define CONFIG_SMP #endif @@ -633,11 +636,26 @@ extern double my_atof(const char*); #define HAVE_LONG_LONG 1 #endif +/* + Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define + ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined. + Also on Windows we define these constants by hand in config-win.h. +*/ + #if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN) #define LONGLONG_MIN ((long long) 0x8000000000000000LL) #define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL) #endif +#if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX) +/* First check for ANSI C99 definition: */ +#ifdef ULLONG_MAX +#define ULONGLONG_MAX ULLONG_MAX +#else +#define ULONGLONG_MAX ((unsigned long long)(~0ULL)) +#endif +#endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/ + #if SIZEOF_LONG == 4 #define INT_MIN32 (long) 0x80000000L #define INT_MAX32 (long) 0x7FFFFFFFL @@ -1162,4 +1180,10 @@ typedef union { #endif #endif +#ifdef HAVE_CHARSET_utf8 +#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8" +#else +#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME +#endif + #endif /* my_global_h */ diff --git a/include/my_pthread.h b/include/my_pthread.h index 44e6edcddec..cf04d078c70 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -117,6 +117,7 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #undef SAFE_MUTEX /* This will cause conflicts */ #define pthread_key(T,V) DWORD V #define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF) +#define pthread_key_delete(A) TlsFree(A) #define pthread_getspecific(A) (TlsGetValue(A)) #define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) #define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) @@ -125,6 +126,7 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #else #define pthread_key(T,V) __declspec(thread) T V #define pthread_key_create(A,B) pthread_dummy(0) +#define pthread_key_delete(A) pthread_dummy(0) #define pthread_getspecific(A) (&(A)) #define my_pthread_getspecific(T,A) (&(A)) #define my_pthread_getspecific_ptr(T,V) (V) @@ -180,6 +182,7 @@ extern int pthread_mutex_destroy (pthread_mutex_t *); typedef int pthread_attr_t; /* Needed by Unixware 7.0.0 */ #define pthread_key_create(A,B) thr_keycreate((A),(B)) +#define pthread_key_delete(A) thr_keydelete(A) #define pthread_handler_decl(A,B) void *A(void *B) #define pthread_key(T,V) pthread_key_t V diff --git a/include/my_sys.h b/include/my_sys.h index 59d5767d204..7927192848a 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -163,7 +163,7 @@ extern char *my_strdup_with_length(const byte *from, uint length, #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) #pragma alloca #endif /* _AIX */ -#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) +#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca) #define alloca __builtin_alloca #endif /* GNUC */ #define my_alloca(SZ) alloca((size_t) (SZ)) @@ -583,7 +583,7 @@ extern int my_printf_error _VARARGS((uint my_err, const char *format, extern int my_message(uint my_err, const char *str,myf MyFlags); extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags); extern int my_message_curses(uint my_err, const char *str,myf MyFlags); -extern void my_init(void); +extern my_bool my_init(void); extern void my_end(int infoflag); extern int my_redel(const char *from, const char *to, int MyFlags); extern int my_copystat(const char *from, const char *to, int MyFlags); diff --git a/include/mysql.h b/include/mysql.h index fd0330b35da..d1b467f9649 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -638,9 +638,6 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); (*(mysql)->methods->advanced_command)(mysql, command, \ NullS, 0, arg, length, skip_check) unsigned long net_safe_read(MYSQL* mysql); -void mysql_once_init(void); - -extern my_bool server_inited; #ifdef __NETWARE__ #pragma pack(pop) /* restore alignment */ diff --git a/include/mysql_com.h b/include/mysql_com.h index 3e91670cf9e..cc2e1056a9e 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -356,7 +356,7 @@ const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); /* Some other useful functions */ -void my_init(void); +my_bool my_init(void); int load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv); my_bool my_thread_init(void); diff --git a/include/mysql_embed.h b/include/mysql_embed.h index 7a169d4133e..df358e29872 100644 --- a/include/mysql_embed.h +++ b/include/mysql_embed.h @@ -32,4 +32,6 @@ #undef MYSQL_SERVER_SUFFIX #define MYSQL_SERVER_SUFFIX "-embedded" +#undef HAVE_QUERY_CACHE /* Cache dosn't work yet */ + #endif /* EMBEDDED_LIBRARY */ diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 4f2c387dbc3..2f333bec7c8 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -301,7 +301,7 @@ #define ER_BAD_FT_COLUMN 1282 #define ER_UNKNOWN_KEY_CACHE 1283 #define ER_WARN_HOSTNAME_WONT_WORK 1284 -#define ER_UNKNOWN_TABLE_ENGINE 1285 +#define ER_UNKNOWN_STORAGE_ENGINE 1285 #define ER_WARN_DEPRECATED_SYNTAX 1286 #define ER_SP_NO_RECURSIVE_CREATE 1287 #define ER_SP_ALREADY_EXISTS 1288 diff --git a/include/sql_state.h b/include/sql_state.h index de8df2d88a5..f4fbe434490 100644 --- a/include/sql_state.h +++ b/include/sql_state.h @@ -161,7 +161,7 @@ ER_WARN_DATA_OUT_OF_RANGE, "01000", "", ER_WARN_DATA_TRUNCATED, "01000", "", ER_WRONG_NAME_FOR_INDEX, "42000", "", ER_WRONG_NAME_FOR_CATALOG, "42000", "", -ER_UNKNOWN_TABLE_ENGINE, "42000", "", +ER_UNKNOWN_STORAGE_ENGINE, "42000", "", /* 5.0 */ ER_SP_NO_RECURSIVE_CREATE, "2F003", "", ER_SP_ALREADY_EXISTS, "42000", "", |