summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-02-20 18:51:43 +0200
committerMichael Widenius <monty@askmonty.org>2011-02-20 18:51:43 +0200
commit58bb0769bdf13a9747e900aa2f0955137738ce9d (patch)
tree1b46ea0f72dce27532f0c87c60ba8a1baa453fa0 /include
parent7e497abcfb3e761ba5a368316192ae930fb58f6b (diff)
parentde3c4428b8c759e85631d8d70b5845c872de5400 (diff)
downloadmariadb-git-58bb0769bdf13a9747e900aa2f0955137738ce9d.tar.gz
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am4
-rw-r--r--include/config-netware.h1
-rw-r--r--include/config-win.h1
-rw-r--r--include/m_ctype.h2
-rw-r--r--include/m_string.h4
-rw-r--r--include/my_compiler.h7
-rw-r--r--include/my_dbug.h3
-rw-r--r--include/my_global.h1
-rw-r--r--include/my_pthread.h6
-rw-r--r--include/my_stacktrace.h2
-rw-r--r--include/my_sys.h1
-rw-r--r--include/mysql_embed.h1
-rw-r--r--include/mysys_err.h7
13 files changed, 26 insertions, 14 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 659adff848e..0181695ab59 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,11 +1,11 @@
# Copyright (C) 2000-2006 MySQL AB
#
-# This library is free software; you can redistribute it and/or
+# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
-# This library is distributed in the hope that it will be useful,
+# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
diff --git a/include/config-netware.h b/include/config-netware.h
index 4b9e1437170..156b1eff0e4 100644
--- a/include/config-netware.h
+++ b/include/config-netware.h
@@ -122,6 +122,7 @@ extern "C" {
#define CANT_DELETE_OPEN_FILES 1
#define FN_LIBCHAR '\\'
+#define FN_DIRSEP "/\\" /* Valid directory separators */
#define FN_ROOTDIR "\\"
#define FN_DEVCHAR ':'
diff --git a/include/config-win.h b/include/config-win.h
index 3d83871270d..b4958243abc 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -364,6 +364,7 @@ inline ulonglong double2ulonglong(double d)
/* File name handling */
#define FN_LIBCHAR '\\'
+#define FN_DIRSEP "/\\" /* Valid directory separators */
#define FN_ROOTDIR "\\"
#define FN_DEVCHAR ':'
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 6229a82ee9c..6a8179c7d50 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -483,6 +483,8 @@ extern my_bool my_parse_charset_xml(const char *bug, size_t len,
int (*add)(CHARSET_INFO *cs));
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
pchar c);
+extern size_t my_strcspn(CHARSET_INFO *cs, const char *str, const char *end,
+ const char *accept);
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
diff --git a/include/m_string.h b/include/m_string.h
index 3331089a54c..ebed8b8ba1f 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -77,7 +77,9 @@ extern "C" {
extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *);
-#if defined(HAVE_STPCPY)
+#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
+#define strmov(A,B) __builtin_stpcpy((A),(B))
+#elif defined(HAVE_STPCPY)
#define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
diff --git a/include/my_compiler.h b/include/my_compiler.h
index c7d334999d0..b5ccdb212d6 100644
--- a/include/my_compiler.h
+++ b/include/my_compiler.h
@@ -1,7 +1,7 @@
#ifndef MY_COMPILER_INCLUDED
#define MY_COMPILER_INCLUDED
-/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -76,6 +76,11 @@
/**
Generic (compiler-independent) features.
*/
+
+#ifndef MY_GNUC_PREREQ
+# define MY_GNUC_PREREQ(maj, min) (0)
+#endif
+
#ifndef MY_ALIGNOF
# ifdef __cplusplus
template<typename type> struct my_alignof_helper { char m1; type m2; };
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 3c1eb820028..ef30c95e32a 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -157,7 +157,8 @@ extern void _db_flush_();
#ifdef __WIN__
#define DBUG_SUICIDE() DBUG_ABORT()
#else
-#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause())
+extern void _db_suicide_();
+#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
#endif
#else /* No debugger */
diff --git a/include/my_global.h b/include/my_global.h
index 5f917cc110e..13945367e97 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -773,6 +773,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
#ifndef FN_LIBCHAR
#define FN_LIBCHAR '/'
+#define FN_DIRSEP "/" /* Valid directory separators */
#define FN_ROOTDIR "/"
#endif
#define MY_NFILE 64 /* This is only used to save filenames */
diff --git a/include/my_pthread.h b/include/my_pthread.h
index f1b9320a075..1f5be847da6 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc,
+ 2010-2011 Oracle and/or its affiliates, 2009-2010 Monty Program Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -125,10 +126,9 @@ int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void));
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
-
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#ifndef ETIMEDOUT
-#define ETIMEDOUT 145 /* Win32 doesn't have this */
+#define ETIMEDOUT 145 /* Win32 might not have this */
#endif
#define getpid() GetCurrentThreadId()
#define HAVE_LOCALTIME_R 1
diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h
index 9250fd4579e..b64d5d798a5 100644
--- a/include/my_stacktrace.h
+++ b/include/my_stacktrace.h
@@ -47,7 +47,7 @@ C_MODE_START
#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
void my_init_stacktrace();
void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
-void my_safe_print_str(const char* name, const char* val, int max_len);
+void my_safe_print_str(const char* val, int max_len);
void my_write_core(int sig);
#if BACKTRACE_DEMANGLE
char *my_demangle(const char *mangled_name, int *status);
diff --git a/include/my_sys.h b/include/my_sys.h
index 6f5e0328fe9..93f413092e0 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -669,6 +669,7 @@ extern void init_glob_errs(void);
extern void wait_for_free_space(const char *filename, int errors);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
+extern FILE *my_freopen(const char *path, const char *mode, FILE *stream);
extern int my_fclose(FILE *fd,myf MyFlags);
extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
extern int my_chmod(const char *name, mode_t mode, myf my_flags);
diff --git a/include/mysql_embed.h b/include/mysql_embed.h
index 4a7fd3ef63c..a7d6e610918 100644
--- a/include/mysql_embed.h
+++ b/include/mysql_embed.h
@@ -20,7 +20,6 @@
/* Things we don't need in the embedded version of MySQL */
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
-#undef HAVE_PSTACK /* No stacktrace */
#undef HAVE_OPENSSL
#undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
diff --git a/include/mysys_err.h b/include/mysys_err.h
index bbb7f6de7d8..215863462cc 100644
--- a/include/mysys_err.h
+++ b/include/mysys_err.h
@@ -64,10 +64,11 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
#define EE_FILE_NOT_CLOSED 30
#define EE_CHANGE_OWNERSHIP 31
#define EE_CHANGE_PERMISSIONS 32
-#define EE_CANT_CHMOD 33
-#define EE_CANT_SEEK 34
+#define EE_CANT_SEEK 33
+#define EE_CANT_CHMOD 34
#define EE_CANT_COPY_OWNERSHIP 35
#define EE_ERROR_LAST 35 /* Copy last error nr */
+
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
/* exit codes for all MySQL programs */
@@ -86,9 +87,7 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
#define EXIT_OPTION_DISABLED 12
#define EXIT_ARGUMENT_INVALID 13
-
#ifdef __cplusplus
}
#endif
#endif
-