summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-18 16:46:57 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-18 16:46:57 +0200
commit5f6380adde2dac3f32b40339b9b702c0135eb7d6 (patch)
tree31068acc0b39c208d35d524688a5985831af0447 /include
parent8a23ae088dc38f591efeab9eccdef5eb9094add9 (diff)
parent97e640b9ae83e07b444fceede6b0524256c7a3cc (diff)
downloadmariadb-git-5f6380adde2dac3f32b40339b9b702c0135eb7d6.tar.gz
10.0-base merge
Diffstat (limited to 'include')
-rw-r--r--include/base64.h2
-rw-r--r--include/lf.h23
-rw-r--r--include/maria.h2
-rw-r--r--include/my_bitmap.h2
-rw-r--r--include/my_compare.h2
-rw-r--r--include/my_context.h13
-rw-r--r--include/my_global.h8
-rw-r--r--include/my_md5.h2
-rw-r--r--include/my_net.h2
-rw-r--r--include/my_pthread.h2
-rw-r--r--include/my_sys.h9
-rw-r--r--include/my_time.h15
-rw-r--r--include/my_user.h2
-rw-r--r--include/my_xml.h2
-rw-r--r--include/myisam.h2
-rw-r--r--include/mysql.h9
-rw-r--r--include/mysql.h.pp5
-rw-r--r--include/mysql_com.h6
-rw-r--r--include/mysql_time.h2
-rw-r--r--include/t_ctype.h2
-rw-r--r--include/typelib.h2
21 files changed, 61 insertions, 53 deletions
diff --git a/include/base64.h b/include/base64.h
index e19da8762cb..1069c286a7a 100644
--- a/include/base64.h
+++ b/include/base64.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef __BASE64_H_INCLUDED__
#define __BASE64_H_INCLUDED__
diff --git a/include/lf.h b/include/lf.h
index 07769d10943..21cf65941ff 100644
--- a/include/lf.h
+++ b/include/lf.h
@@ -131,25 +131,12 @@ typedef struct {
#define lf_rwunlock_by_pins(PINS) \
my_atomic_rwlock_wrunlock(&(PINS)->pinbox->pinarray.lock)
-/*
- compile-time assert, to require "no less than N" pins
- it's enough if it'll fail on at least one compiler, so
- we'll enable it on GCC only, which supports zero-length arrays.
-*/
-#if defined(__GNUC__) && defined(MY_LF_EXTRA_DEBUG)
-#define LF_REQUIRE_PINS(N) \
- static const char require_pins[LF_PINBOX_PINS-N] \
- __attribute__ ((unused)); \
- static const int LF_NUM_PINS_IN_THIS_FILE= N;
+/* compile-time assert to make sure we have enough pins. */
#define _lf_pin(PINS, PIN, ADDR) \
- ( \
- assert(PIN < LF_NUM_PINS_IN_THIS_FILE), \
- my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR)) \
- )
-#else
-#define LF_REQUIRE_PINS(N)
-#define _lf_pin(PINS, PIN, ADDR) my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR))
-#endif
+ do { \
+ compile_time_assert(PIN < LF_PINBOX_PINS); \
+ my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR)); \
+ } while(0)
#define _lf_unpin(PINS, PIN) _lf_pin(PINS, PIN, NULL)
#define lf_pin(PINS, PIN, ADDR) \
diff --git a/include/maria.h b/include/maria.h
index 4dd007df74e..5812c543c1e 100644
--- a/include/maria.h
+++ b/include/maria.h
@@ -389,7 +389,7 @@ void maria_disable_indexes_for_rebuild(MARIA_HA *info, ha_rows rows,
my_bool maria_test_if_sort_rep(MARIA_HA *info, ha_rows rows, ulonglong key_map,
my_bool force);
-int maria_init_bulk_insert(MARIA_HA *info, ulong cache_size, ha_rows rows);
+int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows);
void maria_flush_bulk_insert(MARIA_HA *info, uint inx);
void maria_end_bulk_insert(MARIA_HA *info);
int maria_preload(MARIA_HA *info, ulonglong key_map, my_bool ignore_leaves);
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index a6cd874255a..06f43f79df8 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _my_bitmap_h_
#define _my_bitmap_h_
diff --git a/include/my_compare.h b/include/my_compare.h
index b47eb65199e..0db22b593f4 100644
--- a/include/my_compare.h
+++ b/include/my_compare.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _my_compare_h
#define _my_compare_h
diff --git a/include/my_context.h b/include/my_context.h
index 0abf49efd43..1bf13fd1903 100644
--- a/include/my_context.h
+++ b/include/my_context.h
@@ -27,12 +27,14 @@
#ifdef __WIN__
#define MY_CONTEXT_USE_WIN32_FIBERS 1
-#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__x86_64__)
+#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__x86_64__) && !defined(__ILP32__)
#define MY_CONTEXT_USE_X86_64_GCC_ASM
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
#define MY_CONTEXT_USE_I386_GCC_ASM
-#else
+#elif defined(HAVE_UCONTEXT)
#define MY_CONTEXT_USE_UCONTEXT
+#else
+#define MY_CONTEXT_DISABLE
#endif
#ifdef MY_CONTEXT_USE_WIN32_FIBERS
@@ -104,6 +106,13 @@ struct my_context {
#endif
+#ifdef MY_CONTEXT_DISABLE
+struct my_context {
+ int dummy;
+};
+#endif
+
+
/*
Initialize an asynchroneous context object.
Returns 0 on success, non-zero on failure.
diff --git a/include/my_global.h b/include/my_global.h
index 7f20cdc7632..95b69c96dd7 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/* This is the include file that should be included 'first' in every C file. */
@@ -96,6 +96,12 @@
#define IF_EMBEDDED(A,B) B
#endif
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+#define IF_PARTITIONING(A,B) A
+#else
+#define IF_PARTITIONING(A,B) B
+#endif
+
#if defined (_WIN32)
/*
off_t is 32 bit long. We do not use C runtime functions
diff --git a/include/my_md5.h b/include/my_md5.h
index b8633b7b1ab..1273616a19b 100644
--- a/include/my_md5.h
+++ b/include/my_md5.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/* See md5.c for explanation and copyright information. */
diff --git a/include/my_net.h b/include/my_net.h
index 60dcd1dead2..06e5a382b48 100644
--- a/include/my_net.h
+++ b/include/my_net.h
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/*
This file is also used to make handling of sockets and ioctl()
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 9e39c6565dc..ebbd666be70 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/* Defines to make different thread packages compatible */
diff --git a/include/my_sys.h b/include/my_sys.h
index 24a38656161..f5f0d61ab46 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _my_sys_h
#define _my_sys_h
@@ -632,13 +632,6 @@ extern int check_if_legal_filename(const char *path);
extern int check_if_legal_tablename(const char *path);
#ifdef _WIN32
-extern int nt_share_delete(const char *name,myf MyFlags);
-#define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags))
-#else
-#define my_delete_allow_opened(fname,flags) my_delete((fname),(flags))
-#endif
-
-#ifdef _WIN32
/* Windows-only functions (CRT equivalents)*/
extern HANDLE my_get_osfhandle(File fd);
extern void my_osmaperr(unsigned long last_error);
diff --git a/include/my_time.h b/include/my_time.h
index b0539939d8d..ea471fd6b0a 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -55,14 +55,17 @@ extern uchar days_in_month[];
#endif
/* Flags to str_to_datetime */
-#define TIME_FUZZY_DATE 1
+
+/*
+ TIME_FUZZY_DATES is used for the result will only be used for comparison
+ purposes. Conversion is as relaxed as possible.
+*/
+#define TIME_FUZZY_DATES 1
#define TIME_DATETIME_ONLY 2
#define TIME_TIME_ONLY 4
-/* Must be same as MODE_NO_ZERO_IN_DATE */
-#define TIME_NO_ZERO_IN_DATE (65536L*2*2*2*2*2*2*2)
-/* Must be same as MODE_NO_ZERO_DATE */
-#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2)
-#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2)
+#define TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */
+#define TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */
+#define TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */
#define MYSQL_TIME_WARN_TRUNCATED 1
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2
diff --git a/include/my_user.h b/include/my_user.h
index 067425a2b47..46eb11a500d 100644
--- a/include/my_user.h
+++ b/include/my_user.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/*
This is a header for libraries containing functions used in both server and
diff --git a/include/my_xml.h b/include/my_xml.h
index e97232c7039..aee301167ff 100644
--- a/include/my_xml.h
+++ b/include/my_xml.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _my_xml_h
diff --git a/include/myisam.h b/include/myisam.h
index b3b953b6e99..7952b091d93 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -410,7 +410,7 @@ void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, ulonglong key_map,
my_bool force);
-int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows);
+int mi_init_bulk_insert(MI_INFO *info, size_t cache_size, ha_rows rows);
void mi_flush_bulk_insert(MI_INFO *info, uint inx);
void mi_end_bulk_insert(MI_INFO *info);
int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map,
diff --git a/include/mysql.h b/include/mysql.h
index b070d50e966..56b2332342d 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -135,6 +135,7 @@ typedef unsigned long long my_ulonglong;
/* backward compatibility define - to be removed eventually */
#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
+#define WARN_PLUGIN_DELETE_BUILTIN ER_PLUGIN_DELETE_BUILTIN
typedef struct st_mysql_rows {
struct st_mysql_rows *next; /* list of rows */
@@ -169,9 +170,15 @@ enum mysql_option
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH,
MYSQL_OPT_BIND,
- MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT,
+ MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT,
MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER,
MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH,
+ MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD,
+ MYSQL_OPT_CONNECT_ATTR_DELETE,
+ MYSQL_SERVER_PUBLIC_KEY,
+ MYSQL_ENABLE_CLEARTEXT_PLUGIN,
+ MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS,
+
/* MariaDB options */
MYSQL_PROGRESS_CALLBACK=5999,
MYSQL_OPT_NONBLOCK,
diff --git a/include/mysql.h.pp b/include/mysql.h.pp
index 4b0edf56a72..2487a7cd6e2 100644
--- a/include/mysql.h.pp
+++ b/include/mysql.h.pp
@@ -270,6 +270,11 @@ enum mysql_option
MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT,
MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER,
MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH,
+ MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD,
+ MYSQL_OPT_CONNECT_ATTR_DELETE,
+ MYSQL_SERVER_PUBLIC_KEY,
+ MYSQL_ENABLE_CLEARTEXT_PLUGIN,
+ MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS,
MYSQL_PROGRESS_CALLBACK=5999,
MYSQL_OPT_NONBLOCK,
MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 07e13c71b2c..a9bba2f59a3 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -27,6 +27,8 @@
#define USERNAME_CHAR_LENGTH 128
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
+#define DEFINER_CHAR_LENGTH (USERNAME_CHAR_LENGTH + HOSTNAME_LENGTH + 1)
+#define DEFINER_LENGTH (USERNAME_LENGTH + HOSTNAME_LENGTH + 1)
#define MYSQL_AUTODETECT_CHARSET_NAME "auto"
@@ -52,12 +54,8 @@
pluggable authentication, so any version starting from "5.5.5-" and
claiming to support pluggable auth, must be using this fake prefix.
*/
-#ifdef EMBEDDED_LIBRARY
-#define RPL_VERSION_HACK ""
-#else
/* this version must be the one that *does not* support pluggable auth */
#define RPL_VERSION_HACK "5.5.5-"
-#endif
#define SERVER_VERSION_LENGTH 60
#define SQLSTATE_LENGTH 5
diff --git a/include/mysql_time.h b/include/mysql_time.h
index a1b7bdb9bec..24fd7ed6102 100644
--- a/include/mysql_time.h
+++ b/include/mysql_time.h
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _mysql_time_h_
#define _mysql_time_h_
diff --git a/include/t_ctype.h b/include/t_ctype.h
index 15600019cd6..162adc7531c 100644
--- a/include/t_ctype.h
+++ b/include/t_ctype.h
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/*
Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved.
diff --git a/include/typelib.h b/include/typelib.h
index 8aabc6fa059..4504bea4ff7 100644
--- a/include/typelib.h
+++ b/include/typelib.h
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _typelib_h