summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-03-04 09:03:07 +0100
committerunknown <knielsen@knielsen-hq.org>2010-03-04 09:03:07 +0100
commit4bf849c23c2fe2174016da630705a362f76d3922 (patch)
treef39b89f218ff81ceb62349eb225a455d52c3ba78 /include
parentf04cf03f75ffca0b99562c027c1c57340d375f66 (diff)
parent62db6839b82d824567979ef3e05caccd67ed11ec (diff)
downloadmariadb-git-4bf849c23c2fe2174016da630705a362f76d3922.tar.gz
Merge MySQL 5.1.44 into MariaDB.
Diffstat (limited to 'include')
-rw-r--r--include/config-win.h2
-rw-r--r--include/m_string.h9
-rw-r--r--include/my_global.h2
-rw-r--r--include/my_no_pthread.h8
-rw-r--r--include/my_pthread.h10
-rw-r--r--include/my_stacktrace.h2
-rw-r--r--include/my_sys.h1
-rw-r--r--include/myisam.h3
8 files changed, 24 insertions, 13 deletions
diff --git a/include/config-win.h b/include/config-win.h
index 4fd00b38e1d..3d83871270d 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -192,7 +192,7 @@ typedef SSIZE_T ssize_t;
#define isnan(X) _isnan(X)
#define finite(X) _finite(X)
-#ifndef UNDEF_THREAD_HACK
+#ifndef MYSQL_CLIENT_NO_THREADS
#define THREAD
#endif
#define VOID_SIGHANDLER
diff --git a/include/m_string.h b/include/m_string.h
index 42161171eef..a86a2d66135 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -95,13 +95,7 @@ extern char NEAR _dig_vec_lower[];
/* Defined in strtod.c */
extern const double log_10[309];
-#ifdef BAD_STRING_COMPILER
-#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
-#else
extern char *strmov_overlapp(char *dest, const char *src);
-/* Warning: the following is likely not to work: */
-#define strmake_overlapp(A,B,C) strmake(A,B,C)
-#endif
#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
@@ -162,9 +156,6 @@ extern size_t strinstr(const char *str,const char *search);
extern size_t r_strinstr(const char *str, size_t from, const char *search);
extern char *strkey(char *dst,char *head,char *tail,char *flags);
extern char *strmake(char *dst,const char *src,size_t length);
-#ifndef strmake_overlapp
-extern char *strmake_overlapp(char *dst,const char *src, size_t length);
-#endif
#ifndef strmov
extern char *strmov(char *dst,const char *src);
diff --git a/include/my_global.h b/include/my_global.h
index ef056d0249c..01bd6a9ba9e 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -889,7 +889,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define FLT_MAX ((float)3.40282346638528860e+38)
#endif
#ifndef SIZE_T_MAX
-#define SIZE_T_MAX ~((size_t) 0)
+#define SIZE_T_MAX (~((size_t) 0))
#endif
#ifndef isfinite
diff --git a/include/my_no_pthread.h b/include/my_no_pthread.h
index b11dbff42f0..511fac407d5 100644
--- a/include/my_no_pthread.h
+++ b/include/my_no_pthread.h
@@ -47,4 +47,12 @@
#define rw_unlock(A)
#define rwlock_destroy(A)
+typedef int my_pthread_once_t;
+#define MY_PTHREAD_ONCE_INIT 0
+#define MY_PTHREAD_ONCE_DONE 1
+
+#define my_pthread_once(C,F) do { \
+ if (*(C) != MY_PTHREAD_ONCE_DONE) { F(); *(C)= MY_PTHREAD_ONCE_DONE; } \
+ } while(0)
+
#endif
diff --git a/include/my_pthread.h b/include/my_pthread.h
index d7a5a30bd73..9b01146cdde 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -69,6 +69,11 @@ typedef int pthread_mutexattr_t;
#define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *);
+typedef volatile LONG my_pthread_once_t;
+#define MY_PTHREAD_ONCE_INIT 0
+#define MY_PTHREAD_ONCE_INPROGRESS 1
+#define MY_PTHREAD_ONCE_DONE 2
+
/*
Struct and macros to be used in combination with the
windows implementation of pthread_cond_timedwait
@@ -116,6 +121,7 @@ int pthread_attr_init(pthread_attr_t *connect_att);
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
int pthread_attr_setprio(pthread_attr_t *connect_att,int priority);
int pthread_attr_destroy(pthread_attr_t *connect_att);
+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);
@@ -215,6 +221,10 @@ extern int my_pthread_getprio(pthread_t thread_id);
#define pthread_handler_t EXTERNC void *
typedef void *(* pthread_handler)(void *);
+#define my_pthread_once_t pthread_once_t
+#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define my_pthread_once(C,F) pthread_once(C,F)
+
/* Test first for RTS or FSU threads */
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h
index e7ce42c1f4f..9250fd4579e 100644
--- a/include/my_stacktrace.h
+++ b/include/my_stacktrace.h
@@ -23,7 +23,7 @@
(defined(__alpha__) && defined(__GNUC__))
#define HAVE_STACKTRACE 1
#endif
-#elif defined(__WIN__)
+#elif defined(__WIN__) || defined(HAVE_PRINTSTACK)
#define HAVE_STACKTRACE 1
#endif
diff --git a/include/my_sys.h b/include/my_sys.h
index fcd319d3e95..4ef6a80b67f 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -998,7 +998,6 @@ extern my_bool resolve_collation(const char *cl_name,
CHARSET_INFO *default_cl,
CHARSET_INFO **cl);
-extern void free_charsets(void);
extern char *get_charsets_dir(char *buf);
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
extern my_bool init_compiled_charsets(myf flags);
diff --git a/include/myisam.h b/include/myisam.h
index 5a5d21e999e..3d2a326363d 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -251,6 +251,8 @@ extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
/* usually used to check if a symlink points into the mysql data home */
/* which is normally forbidden */
extern int (*myisam_test_invalid_symlink)(const char *filename);
+extern ulonglong myisam_mmap_size, myisam_mmap_used;
+extern pthread_mutex_t THR_LOCK_myisam_mmap;
/* Prototypes for myisam-functions */
@@ -296,6 +298,7 @@ extern int mi_delete_all_rows(struct st_myisam_info *info);
extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
extern uint mi_get_pointer_length(ulonglong file_length, uint def);
+#define MEMMAP_EXTRA_MARGIN 7 /* Write this as a suffix for mmap file */
/* this is used to pass to mysql_myisamchk_table */
#define MYISAMCHK_REPAIR 1 /* equivalent to myisamchk -r */