summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hash.h5
-rw-r--r--include/keycache.h2
-rw-r--r--include/m_ctype.h8
-rw-r--r--include/m_string.h6
-rw-r--r--include/my_atomic.h2
-rw-r--r--include/my_bit.h2
-rw-r--r--include/my_bitmap.h3
-rw-r--r--include/my_global.h7
-rw-r--r--include/my_pthread.h14
-rw-r--r--include/my_sys.h12
-rw-r--r--include/my_valgrind.h2
-rw-r--r--include/myisamchk.h2
-rw-r--r--include/mysql.h.pp2
-rw-r--r--include/mysql/plugin.h2
-rw-r--r--include/mysql/plugin_audit.h.pp29
-rw-r--r--include/mysql/plugin_auth.h.pp45
-rw-r--r--include/mysql/plugin_ftparser.h10
-rw-r--r--include/mysql/plugin_ftparser.h.pp29
-rw-r--r--include/mysql/psi/mysql_thread.h8
-rw-r--r--include/mysql_com.h3
-rw-r--r--include/thr_lock.h4
-rw-r--r--include/wqueue.h2
22 files changed, 123 insertions, 76 deletions
diff --git a/include/hash.h b/include/hash.h
index f3d9d82f187..ae3f017a03e 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -27,11 +27,6 @@
typedef declarations, even when identical, the definition may not be
repeated.
*/
-#ifndef CHARSET_INFO_DEFINED
-#define CHARSET_INFO_DEFINED
-typedef struct charset_info_st CHARSET_INFO;
-#endif /* CHARSET_INFO_DEFINED */
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/keycache.h b/include/keycache.h
index 6220f6266fa..bc14bdef0bf 100644
--- a/include/keycache.h
+++ b/include/keycache.h
@@ -195,7 +195,7 @@ extern my_bool multi_key_cache_set(const uchar *key, uint length,
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);
+ KEY_CACHE *key_cache, void *);
extern int repartition_key_cache(KEY_CACHE *keycache,
uint key_cache_block_size,
size_t use_mem,
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 93c7e84e8a0..6332962f000 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -54,7 +54,6 @@ extern "C" {
#define MY_PUT_MB2(s, code) { (s)[0]= code >> 8; (s)[1]= code & 0xFF; }
#endif
-typedef const struct charset_info_st CHARSET_INFO;
typedef const struct my_charset_handler_st MY_CHARSET_HANDLER;
typedef const struct my_collation_handler_st MY_COLLATION_HANDLER;
@@ -286,13 +285,6 @@ struct my_charset_handler_st
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
-
-/*
- We define this CHARSET_INFO_DEFINED here to prevent a repeat of the
- typedef in hash.c, which will cause a compiler error.
-*/
-#define CHARSET_INFO_DEFINED
-
/* See strings/CHARSET_INFO.txt about information on this structure */
struct charset_info_st
{
diff --git a/include/m_string.h b/include/m_string.h
index c8200ba33ed..e2d649d0bcd 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -207,13 +207,7 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
}
#endif
-/*
- LEX_STRING -- a pair of a C-string and its length.
- (it's part of the plugin API as a MYSQL_LEX_STRING)
-*/
-
#include <mysql/plugin.h>
-typedef struct st_mysql_lex_string LEX_STRING;
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
diff --git a/include/my_atomic.h b/include/my_atomic.h
index 48bbe8c2946..849b54f3532 100644
--- a/include/my_atomic.h
+++ b/include/my_atomic.h
@@ -1,3 +1,5 @@
+#ifndef MY_ATOMIC_INCLUDED
+#define MY_ATOMIC_INCLUDED
/* Copyright (C) 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
diff --git a/include/my_bit.h b/include/my_bit.h
index b396b84b0d8..7e733d9d581 100644
--- a/include/my_bit.h
+++ b/include/my_bit.h
@@ -1,6 +1,8 @@
#ifndef MY_BIT_INCLUDED
#define MY_BIT_INCLUDED
+#include <my_global.h>
+
/*
Some useful bit functions
*/
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index cd082cc1ada..c92f28630e2 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -19,6 +19,9 @@
#define MY_BIT_NONE (~(uint) 0)
#include <m_string.h>
+#ifdef THREAD
+#include <my_pthread.h>
+#endif
typedef uint32 my_bitmap_map;
diff --git a/include/my_global.h b/include/my_global.h
index ad8607de2a3..5d874d9f5f8 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -880,6 +880,7 @@ typedef long long my_ptrdiff_t;
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A), sizeof(double)))
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
+#define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1))
/*
Custom version of standard offsetof() macro which can be used to get
@@ -1007,6 +1008,10 @@ typedef unsigned long my_off_t;
typedef ulonglong table_map; /* Used for table bits in join */
typedef ulong nesting_map; /* Used for flags of nesting constructs */
+/* often used type names - opaque declarations */
+typedef const struct charset_info_st CHARSET_INFO;
+typedef struct st_mysql_lex_string LEX_STRING;
+
#if defined(__WIN__)
#define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR
@@ -1444,6 +1449,8 @@ do { doubleget_union _tmp; \
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
+#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
+
/*
Only Linux is known to need an explicit sync of the directory to make sure a
file creation/deletion/renaming in(from,to) this directory durable.
diff --git a/include/my_pthread.h b/include/my_pthread.h
index ddf1d58ff8f..8a7976bb334 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -480,8 +480,7 @@ typedef struct st_safe_mutex_info_t
#endif /* SAFE_MUTEX_DETECT_DESTROY */
int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
- const char *name, myf my_flags,
- const char *file, uint line);
+ const char *name, const char *file, uint line);
int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
uint line);
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
@@ -509,10 +508,8 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
#undef pthread_cond_wait
#undef pthread_cond_timedwait
#undef pthread_mutex_trylock
-#define my_pthread_mutex_init(A,B,C,D) safe_mutex_init((A),(B),(C),(D),__FILE__,__LINE__)
-#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),#A,0,__FILE__,__LINE__)
-#define pthread_mutex_lock(A) safe_mutex_lock((A), 0, __FILE__, __LINE__)
-#define my_pthread_mutex_lock(A,B) safe_mutex_lock((A), (B), __FILE__, __LINE__)
+#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),#A,__FILE__,__LINE__)
+#define pthread_mutex_lock(A) safe_mutex_lock((A),0,__FILE__, __LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
@@ -527,7 +524,6 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
! pthread_equal(pthread_self(), (mp)->thread))
#else
#define my_pthread_mutex_init(A,B,C,D) pthread_mutex_init((A),(B))
-#define my_pthread_mutex_lock(A,B) pthread_mutex_lock(A)
#define safe_mutex_assert_owner(mp) do {} while(0)
#define safe_mutex_assert_not_owner(mp) do {} while(0)
#define safe_mutex_free_deadlock_data(mp) do {} while(0)
@@ -767,11 +763,9 @@ struct st_my_thread_var
my_bool init;
struct st_my_thread_var *next,**prev;
void *opt_info;
- //uint lock_type; /* used by conditional release the queue */
+ uint lock_type; /* used by conditional release the queue */
void *stack_ends_here;
safe_mutex_t *mutex_in_use;
- void (*scheduler_before_lock_wait)(void);
- void (*scheduler_after_lock_wait)(void);
#ifndef DBUG_OFF
void *dbug;
char name[THREAD_NAME_SIZE+1];
diff --git a/include/my_sys.h b/include/my_sys.h
index e3aa7ed8d7c..ecb478818ac 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -17,6 +17,7 @@
#define _my_sys_h
#include "my_global.h" /* C_MODE_START, C_MODE_END */
+#include "my_valgrind.h"
C_MODE_START
@@ -102,7 +103,9 @@ extern int my_errno; /* Last error in mysys */
#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
#define ME_COLOUR2 ((2 << ME_HIGHBYTE))
#define ME_COLOUR3 ((3 << ME_HIGHBYTE))
-#define ME_FATALERROR 1024 /* Fatal statement error */
+#define ME_JUST_INFO 1024 /**< not error but just info */
+#define ME_JUST_WARNING 2048 /**< not error but just warning */
+#define ME_FATALERROR 4096 /* Fatal statement error */
/* Bits in last argument to fn_format */
#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */
@@ -191,7 +194,7 @@ extern void my_large_free(uchar *ptr);
#endif /* HAVE_ALLOCA */
#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
-#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? (void)0 : my_free(ptr)
+#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? (void)0 : my_free(ptr))
#ifndef errno /* did we already get it? */
#ifdef HAVE_ERRNO_AS_DEFINE
@@ -547,7 +550,7 @@ my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
*(info)->current_pos)
typedef uint32 ha_checksum;
-extern ha_checksum my_crc_dbug_check;
+extern ulong my_crc_dbug_check;
/* Define the type of function to be passed to process_default_option_files */
typedef int (*Process_option_func)(void *ctx, const char *group_name,
@@ -764,9 +767,6 @@ extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length);
extern my_off_t my_b_filelength(IO_CACHE *info);
extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...);
extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
-extern int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
- const char *default_val);
-extern int init_intvar_from_file(int* var, IO_CACHE* f, int default_val);
extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
const char *prefix, size_t cache_size,
myf cache_myflags);
diff --git a/include/my_valgrind.h b/include/my_valgrind.h
index 63e185ebc53..dd8f4b22e21 100644
--- a/include/my_valgrind.h
+++ b/include/my_valgrind.h
@@ -29,7 +29,7 @@
#define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
#define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
#else /* HAVE_VALGRIND */
-# define MEM_UNDEFINED(a,len) bfill(A, B, 0x8F)
+# define MEM_UNDEFINED(a,len) bfill(a, len, 0x8F)
# define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
diff --git a/include/myisamchk.h b/include/myisamchk.h
index f6acaa7cf00..ca81c689f3d 100644
--- a/include/myisamchk.h
+++ b/include/myisamchk.h
@@ -155,7 +155,7 @@ typedef struct st_handler_check_param
IO_CACHE read_cache;
enum_handler_stats_method stats_method;
#ifdef THREAD
- pthread_mutex_t print_msg_mutex;
+ mysql_mutex_t print_msg_mutex;
my_bool need_print_msg_lock;
#endif
} HA_CHECK;
diff --git a/include/mysql.h.pp b/include/mysql.h.pp
index a2300dca112..31c4f5e5781 100644
--- a/include/mysql.h.pp
+++ b/include/mysql.h.pp
@@ -28,7 +28,7 @@ typedef struct st_net {
unsigned char reading_or_writing;
char save_char;
char net_skip_rest_factor;
- my_bool unused;
+ my_bool unused1;
my_bool compress;
my_bool unused3;
unsigned char *unused;
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 04463c19090..f77dfbcc8d5 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -591,7 +591,7 @@ char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length,
void thd_inc_row_count(MYSQL_THD thd);
#define thd_proc_info(thd, msg) set_thd_proc_info(thd, msg, __func__, __FILE__, __LINE__)
-const char *set_thd_proc_info(MYSQL_THD, const char * info, const char *func,
+const char *set_thd_proc_info(void *, const char * info, const char *func,
const char *file, const unsigned int line);
/**
diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp
index b48cbca2e87..ad8ca389d34 100644
--- a/include/mysql/plugin_audit.h.pp
+++ b/include/mysql/plugin_audit.h.pp
@@ -95,6 +95,22 @@ struct st_mysql_plugin
struct st_mysql_sys_var **system_vars;
void * __reserved1;
};
+struct st_maria_plugin
+{
+ int type;
+ void *info;
+ const char *name;
+ const char *author;
+ const char *descr;
+ int license;
+ int (*init)(void *);
+ int (*deinit)(void *);
+ unsigned int version;
+ struct st_mysql_show_var *status_vars;
+ struct st_mysql_sys_var **system_vars;
+ const char *version_info;
+ unsigned int maturity;
+};
#include "plugin_ftparser.h"
#include "plugin.h"
enum enum_ftparser_mode
@@ -124,16 +140,16 @@ typedef struct st_mysql_ftparser_boolean_info
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
- char *doc, int doc_len);
+ const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
- char *word, int word_len,
+ const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
- struct charset_info_st *cs;
- char *doc;
+ const struct charset_info_st *cs;
+ const char *doc;
int length;
- int flags;
+ unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;
struct st_mysql_ftparser
@@ -171,13 +187,14 @@ int thd_in_lock_tables(const void* thd);
int thd_tablespace_op(const void* thd);
long long thd_test_options(const void* thd, long long test_options);
int thd_sql_command(const void* thd);
-const char *thd_proc_info(void* thd, const char *info);
void **thd_ha_data(const void* thd, const struct handlerton *hton);
void thd_storage_lock_wait(void* thd, long long value);
int thd_tx_isolation(const void* thd);
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
void thd_inc_row_count(void* thd);
+const char *set_thd_proc_info(void*, const char * info, const char *func,
+ const char *file, const unsigned int line);
int mysql_tmpfile(const char *prefix);
int thd_killed(const void* thd);
unsigned long thd_get_thread_id(const void* thd);
diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp
index b0d5daf4c64..bbd91a84f33 100644
--- a/include/mysql/plugin_auth.h.pp
+++ b/include/mysql/plugin_auth.h.pp
@@ -31,6 +31,27 @@ void *thd_memdup(void* thd, const void* str, unsigned int size);
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
const char *str, unsigned int size,
int allocate_lex_string);
+#include <mysql/service_thd_wait.h>
+typedef enum _thd_wait_type_e {
+ THD_WAIT_MUTEX= 1,
+ THD_WAIT_DISKIO= 2,
+ THD_WAIT_ROW_TABLE_LOCK= 3,
+ THD_WAIT_GLOBAL_LOCK= 4
+} thd_wait_type;
+extern struct thd_wait_service_st {
+ void (*thd_wait_begin_func)(void*, thd_wait_type);
+ void (*thd_wait_end_func)(void*);
+} *thd_wait_service;
+void thd_wait_begin(void* thd, thd_wait_type wait_type);
+void thd_wait_end(void* thd);
+#include <mysql/service_thread_scheduler.h>
+struct scheduler_functions;
+extern struct my_thread_scheduler_service {
+ int (*set)(struct scheduler_functions *scheduler);
+ int (*reset)();
+} *my_thread_scheduler_service;
+int my_thread_scheduler_set(struct scheduler_functions *scheduler);
+int my_thread_scheduler_reset();
struct st_mysql_xid {
long formatID;
long gtrid_length;
@@ -90,6 +111,8 @@ struct st_maria_plugin
const char *version_info;
unsigned int maturity;
};
+#include "plugin_ftparser.h"
+#include "plugin.h"
enum enum_ftparser_mode
{
MYSQL_FTPARSER_SIMPLE_MODE= 0,
@@ -114,19 +137,18 @@ typedef struct st_mysql_ftparser_boolean_info
char prev;
char *quot;
} MYSQL_FTPARSER_BOOLEAN_INFO;
-typedef int mysql_ft_size_t;
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
- const unsigned char *doc, mysql_ft_size_t doc_len);
+ const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
- const unsigned char *word, mysql_ft_size_t word_len,
+ const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
const struct charset_info_st *cs;
- const unsigned char *doc;
- mysql_ft_size_t length;
+ const char *doc;
+ int length;
unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;
@@ -137,31 +159,36 @@ struct st_mysql_ftparser
int (*init)(MYSQL_FTPARSER_PARAM *param);
int (*deinit)(MYSQL_FTPARSER_PARAM *param);
};
-struct st_mysql_storage_engine
+struct st_mysql_daemon
{
int interface_version;
};
-struct handlerton;
-struct st_mysql_daemon
+struct st_mysql_information_schema
{
int interface_version;
};
-struct st_mysql_information_schema
+struct st_mysql_storage_engine
{
int interface_version;
};
+struct handlerton;
+ struct Mysql_replication {
+ int interface_version;
+ };
struct st_mysql_value
{
int (*value_type)(struct st_mysql_value *);
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
int (*val_real)(struct st_mysql_value *, double *realbuf);
int (*val_int)(struct st_mysql_value *, long long *intbuf);
+ int (*is_unsigned)(struct st_mysql_value *);
};
int thd_in_lock_tables(const void* thd);
int thd_tablespace_op(const void* thd);
long long thd_test_options(const void* thd, long long test_options);
int thd_sql_command(const void* thd);
void **thd_ha_data(const void* thd, const struct handlerton *hton);
+void thd_storage_lock_wait(void* thd, long long value);
int thd_tx_isolation(const void* thd);
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
diff --git a/include/mysql/plugin_ftparser.h b/include/mysql/plugin_ftparser.h
index 7f9bde3a6a0..37bc96b0e08 100644
--- a/include/mysql/plugin_ftparser.h
+++ b/include/mysql/plugin_ftparser.h
@@ -177,16 +177,16 @@ typedef struct st_mysql_ftparser_boolean_info
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
- char *doc, int doc_len);
+ const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
- char *word, int word_len,
+ const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
- struct charset_info_st *cs;
- char *doc;
+ const struct charset_info_st *cs;
+ const char *doc;
int length;
- int flags;
+ unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;
diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp
index 2c2c1adbf88..0d6a70ec19c 100644
--- a/include/mysql/plugin_ftparser.h.pp
+++ b/include/mysql/plugin_ftparser.h.pp
@@ -95,6 +95,22 @@ struct st_mysql_plugin
struct st_mysql_sys_var **system_vars;
void * __reserved1;
};
+struct st_maria_plugin
+{
+ int type;
+ void *info;
+ const char *name;
+ const char *author;
+ const char *descr;
+ int license;
+ int (*init)(void *);
+ int (*deinit)(void *);
+ unsigned int version;
+ struct st_mysql_show_var *status_vars;
+ struct st_mysql_sys_var **system_vars;
+ const char *version_info;
+ unsigned int maturity;
+};
#include "plugin_ftparser.h"
struct st_mysql_daemon
{
@@ -124,13 +140,14 @@ int thd_in_lock_tables(const void* thd);
int thd_tablespace_op(const void* thd);
long long thd_test_options(const void* thd, long long test_options);
int thd_sql_command(const void* thd);
-const char *thd_proc_info(void* thd, const char *info);
void **thd_ha_data(const void* thd, const struct handlerton *hton);
void thd_storage_lock_wait(void* thd, long long value);
int thd_tx_isolation(const void* thd);
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
void thd_inc_row_count(void* thd);
+const char *set_thd_proc_info(void*, const char * info, const char *func,
+ const char *file, const unsigned int line);
int mysql_tmpfile(const char *prefix);
int thd_killed(const void* thd);
unsigned long thd_get_thread_id(const void* thd);
@@ -168,16 +185,16 @@ typedef struct st_mysql_ftparser_boolean_info
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
- char *doc, int doc_len);
+ const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
- char *word, int word_len,
+ const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
- struct charset_info_st *cs;
- char *doc;
+ const struct charset_info_st *cs;
+ const char *doc;
int length;
- int flags;
+ unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;
struct st_mysql_ftparser
diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h
index 60b4f5d6ef4..389c73d09e9 100644
--- a/include/mysql/psi/mysql_thread.h
+++ b/include/mysql/psi/mysql_thread.h
@@ -235,7 +235,7 @@ typedef struct st_mysql_cond mysql_cond_t;
#ifdef HAVE_PSI_INTERFACE
#ifdef SAFE_MUTEX
#define mysql_mutex_init(K, M, A) \
- inline_mysql_mutex_init(K, M, A, __FILE__, __LINE__)
+ inline_mysql_mutex_init(K, M, A, #M, __FILE__, __LINE__)
#else
#define mysql_mutex_init(K, M, A) \
inline_mysql_mutex_init(K, M, A)
@@ -243,7 +243,7 @@ typedef struct st_mysql_cond mysql_cond_t;
#else
#ifdef SAFE_MUTEX
#define mysql_mutex_init(K, M, A) \
- inline_mysql_mutex_init(M, A, __FILE__, __LINE__)
+ inline_mysql_mutex_init(M, A, #M, __FILE__, __LINE__)
#else
#define mysql_mutex_init(K, M, A) \
inline_mysql_mutex_init(M, A)
@@ -585,7 +585,7 @@ static inline int inline_mysql_mutex_init(
mysql_mutex_t *that,
const pthread_mutexattr_t *attr
#ifdef SAFE_MUTEX
- , const char *src_file, uint src_line
+ , const char *src_name, const char *src_file, uint src_line
#endif
)
{
@@ -596,7 +596,7 @@ static inline int inline_mysql_mutex_init(
that->m_psi= NULL;
#endif
#ifdef SAFE_MUTEX
- return safe_mutex_init(&that->m_mutex, attr, src_file, src_line);
+ return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line);
#else
return pthread_mutex_init(&that->m_mutex, attr);
#endif
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 19888a492ed..4154b620208 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -474,9 +474,6 @@ struct my_rnd_struct;
enum Item_result
{
STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT
-#ifdef MYSQL_SERVER
- ,IMPOSSIBLE_RESULT /* Yes, we know this is ugly, don't tell us */
-#endif
};
typedef struct st_udf_args
diff --git a/include/thr_lock.h b/include/thr_lock.h
index 562ed30afd7..531575e9e9f 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -149,8 +149,6 @@ enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
uint count, THR_LOCK_INFO *owner,
ulong lock_wait_timeout);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count, uint unlock_flags);
-#error keep both thr_merge* or what?
-void thr_lock_merge_status(THR_LOCK_DATA **data, uint count);
void thr_merge_locks(THR_LOCK_DATA **data, uint org_count, uint new_count);
void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
@@ -162,6 +160,8 @@ void thr_downgrade_write_lock(THR_LOCK_DATA *data,
enum thr_lock_type new_lock_type);
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data,
ulong lock_wait_timeout);
+void thr_set_lock_wait_callback(void (*before_wait)(void),
+ void (*after_wait)(void));
#ifdef __cplusplus
}
#endif
diff --git a/include/wqueue.h b/include/wqueue.h
index 658f3d66f12..96115c4db3c 100644
--- a/include/wqueue.h
+++ b/include/wqueue.h
@@ -18,7 +18,7 @@ void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
void wqueue_add_and_wait(WQUEUE *wqueue,
struct st_my_thread_var *thread,
- pthread_mutex_t *lock);
+ mysql_mutex_t *lock);
void wqueue_release_queue(WQUEUE *wqueue);
void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue);