summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/config-win.h26
-rw-r--r--include/errmsg.h1
-rw-r--r--include/ft_global.h2
-rw-r--r--include/hash.h2
-rw-r--r--include/heap.h58
-rw-r--r--include/help_end.h1
-rw-r--r--include/help_start.h2
-rw-r--r--include/keycache.h5
-rw-r--r--include/m_ctype.h2
-rw-r--r--include/m_string.h2
-rw-r--r--include/my_base.h2
-rw-r--r--include/my_dbug.h3
-rw-r--r--include/my_global.h22
-rw-r--r--include/my_list.h4
-rw-r--r--include/my_pthread.h4
-rw-r--r--include/my_sys.h4
-rw-r--r--include/my_time.h5
-rw-r--r--include/mysql.h30
-rw-r--r--include/mysql_com.h7
-rw-r--r--include/mysql_time.h12
-rw-r--r--include/mysys_err.h3
-rw-r--r--include/raid.h7
-rw-r--r--include/violite.h22
23 files changed, 157 insertions, 69 deletions
diff --git a/include/config-win.h b/include/config-win.h
index d28bb25cd09..472190e53ca 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -31,18 +31,25 @@ functions */
#define HAVE_SMEM 1
-#if defined(__NT__)
-#define SYSTEM_TYPE "NT"
-#elif defined(__WIN2000__)
-#define SYSTEM_TYPE "WIN2000"
+#if defined(_WIN64) || defined(WIN64)
+#define SYSTEM_TYPE "Win64"
+#elif defined(_WIN32) || defined(WIN32)
+#define SYSTEM_TYPE "Win32"
#else
-#define SYSTEM_TYPE "Win95/Win98"
+#define SYSTEM_TYPE "Windows"
#endif
-#if defined(_WIN64) || defined(WIN64)
-#define MACHINE_TYPE "ia64" /* Define to machine type name */
+#if defined(_M_IA64)
+#define MACHINE_TYPE "ia64"
+#elif defined(_M_IX86)
+#define MACHINE_TYPE "ia32"
+#elif defined(_M_ALPHA)
+#define MACHINE_TYPE "axp"
#else
-#define MACHINE_TYPE "i32" /* Define to machine type name */
+#define MACHINE_TYPE "unknown" /* Define to machine type name */
+#endif
+
+#if !(defined(_WIN64) || defined(WIN64))
#ifndef _WIN32
#define _WIN32 /* Compatible with old source */
#endif
@@ -175,6 +182,8 @@ typedef uint rf_SetTimer;
#define sigset(A,B) signal((A),(B))
#define finite(A) _finite(A)
#define sleep(A) Sleep((A)*1000)
+#define popen(A) popen(A,B) _popen((A),(B))
+#define pclose(A) _pclose(A)
#ifndef __BORLANDC__
#define access(A,B) _access(A,B)
@@ -393,4 +402,5 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_CHARSET_ucs2 1
#define HAVE_CHARSET_ujis 1
#define HAVE_CHARSET_utf8 1
+#define HAVE_UCA_COLLATIONS 1
diff --git a/include/errmsg.h b/include/errmsg.h
index 6115b24a3d8..96977227666 100644
--- a/include/errmsg.h
+++ b/include/errmsg.h
@@ -90,3 +90,4 @@ extern const char *client_errors[]; /* Error messages */
#define CR_SECURE_AUTH 2049
#define CR_FETCH_CANCELED 2050
#define CR_NO_DATA 2051
+#define CR_NO_STMT_METADATA 2052
diff --git a/include/ft_global.h b/include/ft_global.h
index 94f6ad9ef51..c3f60d13a7a 100644
--- a/include/ft_global.h
+++ b/include/ft_global.h
@@ -62,7 +62,7 @@ void ft_free_stopwords(void);
#define FT_SORTED 2
#define FT_EXPAND 4 /* query expansion */
-FT_INFO *ft_init_search(uint,void *, uint, byte *, uint, byte *);
+FT_INFO *ft_init_search(uint,void *, uint, byte *, uint,CHARSET_INFO *, byte *);
my_bool ft_boolean_check_syntax_string(const byte *);
#ifdef __cplusplus
diff --git a/include/hash.h b/include/hash.h
index cd7210a290c..9a6d91036e1 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -47,7 +47,7 @@ my_bool _hash_init(HASH *hash, CHARSET_INFO *charset,
uint key_length, hash_get_key get_key,
void (*free_element)(void*), uint flags CALLER_INFO_PROTO);
void hash_free(HASH *tree);
-void hash_reset(HASH *hash);
+void my_hash_reset(HASH *hash);
byte *hash_element(HASH *hash,uint idx);
gptr hash_search(HASH *info,const byte *key,uint length);
gptr hash_next(HASH *info,const byte *key,uint length);
diff --git a/include/heap.h b/include/heap.h
index 63f2abbabc7..ac2b38d1f2d 100644
--- a/include/heap.h
+++ b/include/heap.h
@@ -63,18 +63,48 @@ typedef struct st_heap_ptrs
struct st_level_info
{
- uint free_ptrs_in_block,records_under_level;
- HP_PTRS *last_blocks; /* pointers to HP_PTRS or records */
+ /* Number of unused slots in *last_blocks HP_PTRS block (0 for 0th level) */
+ uint free_ptrs_in_block;
+
+ /*
+ Maximum number of records that can be 'contained' inside of each element
+ of last_blocks array. For level 0 - 1, for level 1 - HP_PTRS_IN_NOD, for
+ level 2 - HP_PTRS_IN_NOD^2 and so forth.
+ */
+ uint records_under_level;
+
+ /*
+ Ptr to last allocated HP_PTRS (or records buffer for level 0) on this
+ level.
+ */
+ HP_PTRS *last_blocks;
};
-typedef struct st_heap_block /* The data is saved in blocks */
+
+/*
+ Heap table records and hash index entries are stored in HP_BLOCKs.
+ HP_BLOCK is used as a 'growable array' of fixed-size records. Size of record
+ is recbuffer bytes.
+ The internal representation is as follows:
+ HP_BLOCK is a hierarchical structure of 'blocks'.
+ A block at level 0 is an array records_in_block records.
+ A block at higher level is an HP_PTRS structure with pointers to blocks at
+ lower levels.
+ At the highest level there is one top block. It is stored in HP_BLOCK::root.
+
+ See hp_find_block for a description of how record pointer is obtained from
+ its index.
+ See hp_get_new_block
+*/
+
+typedef struct st_heap_block
{
- HP_PTRS *root;
+ HP_PTRS *root; /* Top-level block */
struct st_level_info level_info[HP_MAX_LEVELS+1];
- uint levels;
- uint records_in_block; /* Records in a heap-block */
+ uint levels; /* number of used levels */
+ uint records_in_block; /* Records in one heap-block */
uint recbuffer; /* Length of one saved record */
- ulong last_allocated; /* Blocks allocated, used by keys */
+ ulong last_allocated; /* number of records there is allocated space for */
} HP_BLOCK;
struct st_heap_info; /* For referense */
@@ -87,11 +117,16 @@ typedef struct st_hp_keydef /* Key definition with open */
uint8 algorithm; /* HASH / BTREE */
HA_KEYSEG *seg;
HP_BLOCK block; /* Where keys are saved */
+ /*
+ Number of buckets used in hash table. Used only to provide
+ #records estimates for heap key scans.
+ */
+ ha_rows hash_buckets;
TREE rb_tree;
int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
const byte *record, byte *recpos);
- int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
- const byte *record, byte *recpos, int flag);
+ int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
+ const byte *record, byte *recpos, int flag);
uint (*get_key_length)(struct st_hp_keydef *keydef, const byte *key);
} HP_KEYDEF;
@@ -100,9 +135,9 @@ typedef struct st_heap_share
HP_BLOCK block;
HP_KEYDEF *keydef;
ulong min_records,max_records; /* Params to open */
- ulong data_length,index_length;
+ ulong data_length,index_length,max_table_size;
uint records; /* records */
- uint blength;
+ uint blength; /* records rounded up to 2^n */
uint deleted; /* Deleted records in database */
uint reclength; /* Length of one record */
uint changed;
@@ -150,6 +185,7 @@ typedef struct st_heap_create_info
{
uint auto_key;
uint auto_key_type;
+ ulong max_table_size;
ulonglong auto_increment;
} HP_CREATE_INFO;
diff --git a/include/help_end.h b/include/help_end.h
index a63d9e7ca9f..3bd16c09e3b 100644
--- a/include/help_end.h
+++ b/include/help_end.h
@@ -2,5 +2,6 @@
#undef printf
#undef puts
#undef fputs
+#undef fputc
#undef putchar
#endif
diff --git a/include/help_start.h b/include/help_start.h
index 38bb91f7655..7ffde1ab803 100644
--- a/include/help_start.h
+++ b/include/help_start.h
@@ -4,4 +4,6 @@
#define printf consoleprintf
#define puts(s) consoleprintf("%s\n",s)
#define fputs(s,f) puts(s)
+#define fputc(s,f) consoleprintf("%c", s)
+#define putchar(s) consoleprintf("%c", s)
#endif
diff --git a/include/keycache.h b/include/keycache.h
index 26ee0ccadb1..a292a69b0a3 100644
--- a/include/keycache.h
+++ b/include/keycache.h
@@ -88,12 +88,13 @@ typedef struct st_key_cache
ulong param_division_limit; /* min. percentage of warm blocks */
ulong param_age_threshold; /* determines when hot block is downgraded */
- /* Statistics variables */
+ /* Statistics variables. These are reset in reset_key_cache_counters(). */
ulong global_blocks_changed; /* number of currently dirty blocks */
ulong global_cache_w_requests;/* number of write requests (write hits) */
ulong global_cache_write; /* number of writes from the cache to files */
ulong global_cache_r_requests;/* number of read requests (read hits) */
ulong global_cache_read; /* number of reads from files to the cache */
+
int blocks; /* max number of blocks in the cache */
my_bool in_init; /* Set to 1 in MySQL during init/resize */
} KEY_CACHE;
@@ -132,5 +133,7 @@ extern my_bool multi_key_cache_set(const byte *key, uint length,
KEY_CACHE *key_cache);
extern void multi_key_cache_change(KEY_CACHE *old_data,
KEY_CACHE *new_data);
+extern int reset_key_cache_counters(const char *name,
+ KEY_CACHE *key_cache);
C_MODE_END
#endif /* _keycache_h */
diff --git a/include/m_ctype.h b/include/m_ctype.h
index ddc21070547..26e285b9683 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -63,7 +63,7 @@ typedef struct unicase_info_st
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
#define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
-
+#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CHARSET_UNDEFINED 0
diff --git a/include/m_string.h b/include/m_string.h
index 97d34421537..d3465363beb 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -215,7 +215,7 @@ extern char *strstr(const char *, const char *);
extern int is_prefix(const char *, const char *);
/* Conversion routines */
-double my_strtod(const char *str, char **end);
+double my_strtod(const char *str, char **end, int *error);
double my_atof(const char *nptr);
extern char *llstr(longlong value,char *buff);
diff --git a/include/my_base.h b/include/my_base.h
index d884113dc4d..d702ec45140 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -291,6 +291,7 @@ enum ha_base_keytype {
#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */
#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
+#define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */
/* Other constants */
@@ -339,6 +340,7 @@ enum ha_base_keytype {
#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */
#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */
#define HA_STATE_EXTEND_BLOCK 2048
+#define HA_STATE_RNEXT_SAME 4096 /* rnext_same was called */
enum en_fieldtype {
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 9174a8b1ef9..711ece4335c 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -38,6 +38,7 @@ extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...));
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
uint length);
+extern void _db_output_();
extern void _db_lock_file();
extern void _db_unlock_file();
@@ -66,6 +67,7 @@ extern void _db_unlock_file();
#define DEBUGGER_ON _no_db_=0
#define DBUG_LOCK_FILE { _db_lock_file(); }
#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
+#define DBUG_OUTPUT(A) { _db_output_(A); }
#define DBUG_ASSERT(A) assert(A)
#else /* No debugger */
@@ -86,6 +88,7 @@ extern void _db_unlock_file();
#define DEBUGGER_ON
#define DBUG_LOCK_FILE
#define DBUG_UNLOCK_FILE
+#define DBUG_OUTPUT(A)
#define DBUG_ASSERT(A) {}
#endif
#ifdef __cplusplus
diff --git a/include/my_global.h b/include/my_global.h
index f6200830ee3..7ca3d5e1e58 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -135,7 +135,13 @@
#ifdef HAVE_UNIXWARE7_THREADS
#include <thread.h>
#else
+#if defined(HPUX10) || defined(HPUX11)
+C_MODE_START /* HPUX needs this, signal.h bug */
+#include <pthread.h>
+C_MODE_END
+#else
#include <pthread.h> /* AIX must have this included first */
+#endif
#endif /* HAVE_UNIXWARE7_THREADS */
#endif /* HAVE_mit_thread */
#if !defined(SCO) && !defined(_REENTRANT)
@@ -194,10 +200,10 @@ C_MODE_END
/* Fix problem when linking c++ programs with gcc 3.x */
#ifdef DEFINE_CXA_PURE_VIRTUAL
#define FIX_GCC_LINKING_PROBLEM \
-extern "C" { int __cxa_pure_virtual() {\
+C_MODE_START int __cxa_pure_virtual() {\
DBUG_ASSERT("Pure virtual method called." == "Aborted");\
return 0;\
-} }
+} C_MODE_END
#else
#define FIX_GCC_LINKING_PROBLEM
#endif
@@ -370,6 +376,12 @@ int __void__;
#define LINT_INIT(var)
#endif
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_purify)
+#define PURIFY_OR_LINT_INIT(var) var=0
+#else
+#define PURIFY_OR_LINT_INIT(var)
+#endif
+
/* Define some useful general macros */
#if defined(__cplusplus) && defined(__GNUC__)
#define max(a, b) ((a) >? (b))
@@ -524,7 +536,11 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define FN_LEN 256 /* Max file name len */
#define FN_HEADLEN 253 /* Max length of filepart of file name */
#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */
+#ifdef PATH_MAX
+#define FN_REFLEN PATH_MAX/* Max length of full path-name */
+#else
#define FN_REFLEN 512 /* Max length of full path-name */
+#endif
#define FN_EXTCHAR '.'
#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */
#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */
@@ -1066,7 +1082,7 @@ do { doubleget_union _tmp; \
#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
-#define doublestore(T,V) do { *(T)= ((byte *) &V)[4];\
+#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((byte *) &V)[4];\
*(((char*)T)+1)=(char) ((byte *) &V)[5];\
*(((char*)T)+2)=(char) ((byte *) &V)[6];\
*(((char*)T)+3)=(char) ((byte *) &V)[7];\
diff --git a/include/my_list.h b/include/my_list.h
index 789bbb50f97..f786621e311 100644
--- a/include/my_list.h
+++ b/include/my_list.h
@@ -33,8 +33,8 @@ extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data);
-extern unsigned int list_length(LIST *list);
-extern int list_walk(LIST *list,list_walk_action action,gptr argument);
+extern unsigned int list_length(LIST *);
+extern int list_walk(LIST *,list_walk_action action,gptr argument);
#define rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a))
diff --git a/include/my_pthread.h b/include/my_pthread.h
index cd0cf49a891..f8cd3e0de71 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -631,15 +631,17 @@ extern int pthread_dummy(int);
/* All thread specific variables are in the following struct */
#define THREAD_NAME_SIZE 10
+#ifndef DEFAULT_THREAD_STACK
#if defined(__ia64__)
/*
MySQL can survive with 32K, but some glibc libraries require > 128K stack
To resolve hostnames
*/
-#define DEFAULT_THREAD_STACK (192*1024L)
+#define DEFAULT_THREAD_STACK (256*1024L)
#else
#define DEFAULT_THREAD_STACK (192*1024)
#endif
+#endif
struct st_my_thread_var
{
diff --git a/include/my_sys.h b/include/my_sys.h
index 01a7482e4d0..79c7c8bd3c0 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -214,6 +214,7 @@ 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_file_opened,my_stream_opened, my_tmp_file_created;
+extern uint mysys_usage_id;
extern my_bool my_init_done;
/* Point to current my_message() */
@@ -657,6 +658,7 @@ extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
my_off_t seek_offset,pbool use_async_io,
pbool clear_cache);
+extern void setup_io_cache(IO_CACHE* info);
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
#ifdef THREAD
extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count);
@@ -737,6 +739,8 @@ extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
extern char *strdup_root(MEM_ROOT *root,const char *str);
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
+extern void get_defaults_files(int argc, char **argv,
+ char **defaults, char **extra_defaults);
extern int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv);
extern void free_defaults(char **argv);
diff --git a/include/my_time.h b/include/my_time.h
index dab17904b2d..94701e159c4 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -58,14 +58,15 @@ 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);
+void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
/*
Required buffer length for my_time_to_str, my_date_to_str,
my_datetime_to_str and TIME_to_string functions. Note, that the
caller is still responsible to check that given TIME structure
has values in valid ranges, otherwise size of the buffer could
- be not enough.
+ be not enough. We also rely on the fact that even wrong values
+ sent using binary protocol fit in this buffer.
*/
#define MAX_DATE_STRING_REP_LENGTH 30
diff --git a/include/mysql.h b/include/mysql.h
index 1c886020fdb..d8a56126756 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -334,6 +334,17 @@ typedef struct st_mysql_parameters
*/
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
void STDCALL mysql_server_end(void);
+/*
+ mysql_server_init/end need to be called when using libmysqld or
+ libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
+ you don't need to call it explicitely; but you need to call
+ mysql_server_end() to free memory). The names are a bit misleading
+ (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
+ names which suit well whether you're using libmysqld or libmysqlclient. We
+ intend to promote these aliases over the mysql_server* ones.
+*/
+#define mysql_library_init mysql_server_init
+#define mysql_library_end mysql_server_end
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
@@ -490,6 +501,8 @@ MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
const char *wild);
unsigned long STDCALL mysql_escape_string(char *to,const char *from,
unsigned long from_length);
+unsigned long STDCALL mysql_hex_string(char *to,const char *from,
+ unsigned long from_length);
unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
char *to,const char *from,
unsigned long length);
@@ -642,23 +655,6 @@ typedef struct st_mysql_methods
#endif
} MYSQL_METHODS;
-#ifdef HAVE_DEPRECATED_411_API
-/* Deprecated calls (since MySQL 4.1.2) */
-
-/* Use mysql_stmt_init + mysql_stmt_prepare instead */
-MYSQL_STMT * STDCALL mysql_prepare(MYSQL * mysql, const char *query,
- unsigned long length);
-#define mysql_execute mysql_stmt_execute
-#define mysql_fetch mysql_stmt_fetch
-#define mysql_fetch_column mysql_stmt_fetch_column
-#define mysql_bind_param mysql_stmt_bind_param
-#define mysql_bind_result mysql_stmt_bind_result
-#define mysql_param_count mysql_stmt_param_count
-#define mysql_param_result mysql_stmt_param_metadata
-#define mysql_get_metadata mysql_stmt_result_metadata
-#define mysql_send_long_data mysql_stmt_send_long_data
-
-#endif /* HAVE_DEPRECATED_411_API */
MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 4686acc098f..56c7f7d2ab5 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -130,6 +130,7 @@ enum enum_server_command
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
#define SERVER_QUERY_NO_INDEX_USED 32
+#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
#define MYSQL_ERRMSG_SIZE 512
#define NET_READ_TIMEOUT 30 /* Timeout on read */
@@ -282,13 +283,7 @@ void my_net_local_init(NET *net);
void net_end(NET *net);
void net_clear(NET *net);
my_bool net_realloc(NET *net, unsigned long length);
-
-#ifndef EMBEDDED_LIBRARY /* To be removed by HF */
my_bool net_flush(NET *net);
-#else
-#define net_flush(A)
-#endif
-
my_bool my_net_write(NET *net,const char *packet,unsigned long len);
my_bool net_write_command(NET *net,unsigned char command,
const char *header, unsigned long head_len,
diff --git a/include/mysql_time.h b/include/mysql_time.h
index ec67d60dea5..5f4fc12c005 100644
--- a/include/mysql_time.h
+++ b/include/mysql_time.h
@@ -33,6 +33,18 @@ enum enum_mysql_timestamp_type
};
+/*
+ Structure which is used to represent datetime values inside MySQL.
+
+ We assume that values in this structure are normalized, i.e. year <= 9999,
+ month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
+ in server such as my_system_gmt_sec() or make_time() family of functions
+ rely on this (actually now usage of make_*() family relies on a bit weaker
+ restriction). Also functions that produce MYSQL_TIME as result ensure this.
+ There is one exception to this rule though if this structure holds time
+ value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
+ bigger values.
+*/
typedef struct st_mysql_time
{
unsigned int year, month, day, hour, minute, second;
diff --git a/include/mysys_err.h b/include/mysys_err.h
index 230be5f4720..19106dc3553 100644
--- a/include/mysys_err.h
+++ b/include/mysys_err.h
@@ -21,7 +21,7 @@ extern "C" {
#endif
#define GLOB 0 /* Error maps */
-#define GLOBERRS 28 /* Max number of error messages in map's */
+#define GLOBERRS 29 /* Max number of error messages in map's */
#define EE(X) globerrs[ X ] /* Defines to add error to right map */
extern const char * NEAR globerrs[]; /* my_error_messages is here */
@@ -54,6 +54,7 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
#define EE_CANT_SYMLINK 25
#define EE_REALPATH 26
#define EE_SYNC 27
+#define EE_UNKNOWN_COLLATION 28
/* exit codes for all MySQL programs */
diff --git a/include/raid.h b/include/raid.h
index b5a5e665824..04c54393e54 100644
--- a/include/raid.h
+++ b/include/raid.h
@@ -32,9 +32,6 @@ C_MODE_END
#endif
#if defined(USE_RAID)
-#ifdef __GNUC__
-#pragma interface /* gcc class implementation */
-#endif
#include "my_dir.h"
/* Trap all occurences of my_...() in source and use our wrapper around this function */
@@ -92,6 +89,10 @@ extern "C" {
#ifdef __cplusplus
}
+#ifdef __GNUC__
+#pragma interface /* gcc class implementation */
+#endif
+
class RaidName {
public:
RaidName(const char *FileName);
diff --git a/include/violite.h b/include/violite.h
index ba7de3ee175..855d8a3d490 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -39,16 +39,17 @@ enum enum_vio_type
Vio* vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost);
#ifdef __WIN__
-Vio* vio_new_win32pipe(HANDLE hPipe);
-Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
- HANDLE handle_map,
- HANDLE event_server_wrote,
- HANDLE event_server_read,
- HANDLE event_client_wrote,
- HANDLE event_client_read);
-int vio_read_pipe(Vio *vio, gptr buf, int size);
-int vio_write_pipe(Vio *vio, const gptr buf, int size);
-int vio_close_pipe(Vio * vio);
+Vio* vio_new_win32pipe(HANDLE hPipe);
+Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
+ HANDLE handle_map,
+ HANDLE event_server_wrote,
+ HANDLE event_server_read,
+ HANDLE event_client_wrote,
+ HANDLE event_client_read,
+ HANDLE event_conn_closed);
+int vio_read_pipe(Vio *vio, gptr buf, int size);
+int vio_write_pipe(Vio *vio, const gptr buf, int size);
+int vio_close_pipe(Vio * vio);
#else
#define HANDLE void *
#endif /* __WIN__ */
@@ -197,6 +198,7 @@ struct st_vio
HANDLE event_server_read;
HANDLE event_client_wrote;
HANDLE event_client_read;
+ HANDLE event_conn_closed;
long shared_memory_remain;
char *shared_memory_pos;
NET *net;