Commit 75dce25c authored by Davi Arnaut's avatar Davi Arnaut

Post-merge fix: header is used by the client API. Obvious in retrospect.

Also, update a few cases missed by the initial patch.
parent 5dec0c96
...@@ -87,7 +87,7 @@ enum { ...@@ -87,7 +87,7 @@ enum {
OPT_SKIP_SAFEMALLOC=OPT_MAX_CLIENT_OPTION, OPT_SKIP_SAFEMALLOC=OPT_MAX_CLIENT_OPTION,
OPT_PS_PROTOCOL, OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL, OPT_PS_PROTOCOL, OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
OPT_MAX_CONNECT_RETRIES, OPT_MAX_CONNECTIONS, OPT_MARK_PROGRESS, OPT_MAX_CONNECT_RETRIES, OPT_MAX_CONNECTIONS, OPT_MARK_PROGRESS,
OPT_LOG_DIR, OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION, OPT_LOG_DIR, OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION
}; };
static int record= 0, opt_sleep= -1; static int record= 0, opt_sleep= -1;
......
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
#define ALLOC_MAX_BLOCK_TO_DROP 4096 #define ALLOC_MAX_BLOCK_TO_DROP 4096
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 #define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
C_MODE_START #ifdef __cplusplus
extern "C" {
#endif
typedef struct st_used_mem typedef struct st_used_mem
{ /* struct for once_alloc (block) */ { /* struct for once_alloc (block) */
...@@ -51,6 +53,8 @@ typedef struct st_mem_root ...@@ -51,6 +53,8 @@ typedef struct st_mem_root
void (*error_handler)(void); void (*error_handler)(void);
} MEM_ROOT; } MEM_ROOT;
C_MODE_END #ifdef __cplusplus
}
#endif
#endif #endif
...@@ -202,7 +202,6 @@ typedef unsigned int MYSQL_FIELD_OFFSET; ...@@ -202,7 +202,6 @@ typedef unsigned int MYSQL_FIELD_OFFSET;
typedef unsigned long long my_ulonglong; typedef unsigned long long my_ulonglong;
#include "typelib.h" #include "typelib.h"
#include "my_alloc.h" #include "my_alloc.h"
C_MODE_START
typedef struct st_used_mem typedef struct st_used_mem
{ {
struct st_used_mem *next; struct st_used_mem *next;
...@@ -220,7 +219,6 @@ typedef struct st_mem_root ...@@ -220,7 +219,6 @@ typedef struct st_mem_root
unsigned int first_block_usage; unsigned int first_block_usage;
void (*error_handler)(void); void (*error_handler)(void);
} MEM_ROOT; } MEM_ROOT;
C_MODE_END
typedef struct st_typelib { typedef struct st_typelib {
unsigned int count; unsigned int count;
const char *name; const char *name;
......
...@@ -153,7 +153,7 @@ class TranxNodeAllocator ...@@ -153,7 +153,7 @@ class TranxNodeAllocator
int free_nodes_before(TranxNode* node) int free_nodes_before(TranxNode* node)
{ {
Block *block; Block *block;
Block *prev_block; Block *prev_block= NULL;
block= first_block; block= first_block;
while (block != current_block->next) while (block != current_block->next)
......
...@@ -387,6 +387,13 @@ static st_debug_sync_globals debug_sync_global; /* All globals in one object */ ...@@ -387,6 +387,13 @@ static st_debug_sync_globals debug_sync_global; /* All globals in one object */
*/ */
extern "C" void (*debug_sync_C_callback_ptr)(const char *, size_t); extern "C" void (*debug_sync_C_callback_ptr)(const char *, size_t);
/**
Callbacks from C files.
*/
C_MODE_START
static void debug_sync_C_callback(const char *, size_t);
static int debug_sync_qsort_cmp(const void *, const void *);
C_MODE_END
/** /**
Callback for debug sync, to be used by C files. See thr_lock.c for example. Callback for debug sync, to be used by C files. See thr_lock.c for example.
...@@ -422,8 +429,8 @@ extern "C" void (*debug_sync_C_callback_ptr)(const char *, size_t); ...@@ -422,8 +429,8 @@ extern "C" void (*debug_sync_C_callback_ptr)(const char *, size_t);
static void debug_sync_C_callback(const char *sync_point_name, static void debug_sync_C_callback(const char *sync_point_name,
size_t name_len) size_t name_len)
{ {
if (unlikely(opt_debug_sync_timeout)) if (unlikely(opt_debug_sync_timeout))
debug_sync(current_thd, sync_point_name, name_len); debug_sync(current_thd, sync_point_name, name_len);
} }
#ifdef HAVE_PSI_INTERFACE #ifdef HAVE_PSI_INTERFACE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment