summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/m_ctype.h11
-rw-r--r--include/m_string.h1
-rw-r--r--include/my_dbug.h4
-rw-r--r--include/my_global.h18
-rw-r--r--include/mysql.h7
-rw-r--r--include/mysql_com.h26
-rw-r--r--include/mysqld_error.h4
-rw-r--r--include/sql_state.h6
-rw-r--r--include/violite.h8
9 files changed, 64 insertions, 21 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 475f73f16c2..785fa431385 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -53,7 +53,6 @@ typedef struct unicase_info_st
#define MY_SEQ_SPACES 2
/* My charsets_list flags */
-#define MY_NO_SETS 0
#define MY_CS_COMPILED 1 /* compiled-in sets */
#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
#define MY_CS_INDEX 4 /* sets listed in the Index file */
@@ -62,7 +61,7 @@ typedef struct unicase_info_st
#define MY_CS_PRIMARY 32 /* if primary collation */
#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
-#define MY_CS_NONTEXT 256 /* if a charset is not sprintf() compatible */
+#define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
#define MY_CHARSET_UNDEFINED 0
@@ -102,6 +101,7 @@ struct charset_info_st;
typedef struct my_collation_handler_st
{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
/* Collation routines */
int (*strnncoll)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint, my_bool);
@@ -140,6 +140,7 @@ extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
typedef struct my_charset_handler_st
{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
/* Multibyte routines */
int (*ismbchar)(struct charset_info_st *, const char *, const char *);
int (*mbcharlen)(struct charset_info_st *, uint);
@@ -200,15 +201,17 @@ typedef struct charset_info_st
const char *csname;
const char *name;
const char *comment;
+ const char *tailoring;
uchar *ctype;
uchar *to_lower;
uchar *to_upper;
uchar *sort_order;
+ uint16 *contractions;
uint16 **sort_order_big;
uint16 *tab_to_uni;
MY_UNI_IDX *tab_from_uni;
- uchar state_map[256];
- uchar ident_map[256];
+ uchar *state_map;
+ uchar *ident_map;
uint strxfrm_multiply;
uint mbminlen;
uint mbmaxlen;
diff --git a/include/m_string.h b/include/m_string.h
index 7fc35dc2e48..0709dbaffb4 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -123,7 +123,6 @@ extern void bmove_align(gptr dst,const gptr src,uint len);
#endif
#ifdef HAVE_purify
-#include <assert.h>
#define memcpy_overlap(A,B,C) \
DBUG_ASSERT((A) <= (B) || ((B)+(C)) <= (A)); \
bmove((byte*) (A),(byte*) (B),(size_t) (C));
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 5c88e2e42db..bc90b91f1c7 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -16,6 +16,10 @@
#ifndef _dbug_h
#define _dbug_h
+#ifdef DBUG_OFF
+#define NDEBUG /* for assert.h */
+#endif
+#include <assert.h>
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/my_global.h b/include/my_global.h
index 3d1a770d877..70b5b1af819 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1102,6 +1102,14 @@ do { doubleget_union _tmp; \
#endif /* sint2korr */
/*
+ Macro for reading 32-bit integer from network byte order (big-endian)
+ from unaligned memory location.
+*/
+#define int4net(A) (int32) (((uint32) ((uchar) (A)[3])) |\
+ (((uint32) ((uchar) (A)[2])) << 8) |\
+ (((uint32) ((uchar) (A)[1])) << 16) |\
+ (((uint32) ((uchar) (A)[0])) << 24))
+/*
Define-funktions for reading and storing in machine format from/to
short/long to/from some place in memory V should be a (not
register) variable, M is a pointer to byte
@@ -1178,16 +1186,6 @@ do { doubleget_union _tmp; \
#define statistic_add(V,C,L) (V)+=(C)
#endif
-#ifdef HAVE_OPENSSL
-#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x0090700f
-#define DES_cblock des_cblock
-#define DES_key_schedule des_key_schedule
-#define DES_set_key_unchecked(k,ks) des_set_key_unchecked((k),*(ks))
-#define DES_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e) des_ede3_cbc_encrypt((i),(o),(l),*(k1),*(k2),*(k3),(iv),(e))
-#endif
-#endif
-
#ifdef HAVE_CHARSET_utf8
#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8"
#else
diff --git a/include/mysql.h b/include/mysql.h
index d7c47667d0c..931995fb1ac 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -453,7 +453,9 @@ int STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
const char* user,
const char* passwd);
-int STDCALL mysql_shutdown(MYSQL *mysql);
+int STDCALL mysql_shutdown(MYSQL *mysql,
+ enum enum_shutdown_level
+ shutdown_level);
int STDCALL mysql_dump_debug_info(MYSQL *mysql);
int STDCALL mysql_refresh(MYSQL *mysql,
unsigned int refresh_options);
@@ -558,7 +560,7 @@ typedef struct st_mysql_bind
enum enum_field_types buffer_type; /* buffer type */
unsigned long buffer_length; /* buffer length, must be set for str/binary */
- /* Following are for internal use. Set by mysql_bind_param */
+ /* Following are for internal use. Set by mysql_stmt_bind_param */
unsigned char *inter_buffer; /* for the current data position */
unsigned long offset; /* offset position for char/binary fetch */
unsigned long internal_length; /* Used if length is 0 */
@@ -710,6 +712,7 @@ void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
my_bool STDCALL mysql_commit(MYSQL * mysql);
my_bool STDCALL mysql_rollback(MYSQL * mysql);
diff --git a/include/mysql_com.h b/include/mysql_com.h
index d354a979cd1..47231ef31c6 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -223,6 +223,32 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
+enum enum_shutdown_level {
+ /*
+ We want levels to be in growing order of hardness. So we leave room
+ for future intermediate levels. For now, escalating one level is += 10;
+ later if we insert new levels in between we will need a function
+ next_shutdown_level(level). Note that DEFAULT does not respect the
+ growing property.
+ */
+ SHUTDOWN_DEFAULT= 0, /* mapped to WAIT_ALL_BUFFERS for now */
+ /*
+ Here is the list in growing order (the next does the previous plus
+ something). WAIT_ALL_BUFFERS is what we have now. Others are "this MySQL
+ server does not support this shutdown level yet".
+ */
+ SHUTDOWN_WAIT_CONNECTIONS= 10, /* wait for existing connections to finish */
+ SHUTDOWN_WAIT_TRANSACTIONS= 20, /* wait for existing trans to finish */
+ SHUTDOWN_WAIT_STATEMENTS= 30, /* wait for existing updating stmts to finish */
+ SHUTDOWN_WAIT_ALL_BUFFERS= 40, /* flush InnoDB buffers */
+ SHUTDOWN_WAIT_CRITICAL_BUFFERS= 50, /* flush MyISAM buffs (no corruption) */
+ /* Now the 2 levels of the KILL command */
+#if MYSQL_VERSION_ID >= 50000
+ KILL_QUERY= 254,
+#endif
+ KILL_CONNECTION= 255
+};
+
/* options for mysql_set_option */
enum enum_mysql_set_option
{
diff --git a/include/mysqld_error.h b/include/mysqld_error.h
index f341041fc75..0dcc09a173f 100644
--- a/include/mysqld_error.h
+++ b/include/mysqld_error.h
@@ -314,4 +314,6 @@
#define ER_UNSUPPORTED_PS 1295
#define ER_GET_ERRMSG 1296
#define ER_GET_TEMPORARY_ERRMSG 1297
-#define ER_ERROR_MESSAGES 298
+#define ER_UNKNOWN_TIME_ZONE 1298
+#define ER_WARN_INVALID_TIMESTAMP 1299
+#define ER_ERROR_MESSAGES 300
diff --git a/include/sql_state.h b/include/sql_state.h
index 5c4b1c50745..52a359405e1 100644
--- a/include/sql_state.h
+++ b/include/sql_state.h
@@ -23,10 +23,10 @@
the second column is the ODBC state (which the 4.1 server sends out by
default) and the last is the state used by the JDBC driver.
If the last column is "" then it means that the JDBC driver is using the
- ODBC state
+ ODBC state.
- The errors in this file is sorted in the same order as in mysqld_error.h
- to allow on to do binary searches for the sqlstate.
+ The errors in this file are sorted in the same order as in mysqld_error.h
+ to allow one to do binary searches for the sqlstate.
*/
ER_DUP_KEY, "23000", "",
diff --git a/include/violite.h b/include/violite.h
index b4b9f724d89..ba7de3ee175 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -83,6 +83,14 @@ my_bool vio_poll_read(Vio *vio,uint timeout);
void vio_timeout(Vio *vio,uint timeout);
#ifdef HAVE_OPENSSL
+#include <openssl/opensslv.h>
+#if OPENSSL_VERSION_NUMBER < 0x0090700f
+#define DES_cblock des_cblock
+#define DES_key_schedule des_key_schedule
+#define DES_set_key_unchecked(k,ks) des_set_key_unchecked((k),*(ks))
+#define DES_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e) des_ede3_cbc_encrypt((i),(o),(l),*(k1),*(k2),*(k3),(iv),(e))
+#endif
+
#define HEADER_DES_LOCL_H dummy_something
#include <openssl/ssl.h>
#include <openssl/err.h>