Skip to content

Commit 75dce25

Browse files
Davi ArnautDavi Arnaut
authored andcommitted
Post-merge fix: header is used by the client API. Obvious in retrospect.
Also, update a few cases missed by the initial patch.
1 parent 5dec0c9 commit 75dce25

5 files changed

Lines changed: 17 additions & 8 deletions

File tree

client/mysqltest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum {
8787
OPT_SKIP_SAFEMALLOC=OPT_MAX_CLIENT_OPTION,
8888
OPT_PS_PROTOCOL, OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
8989
OPT_MAX_CONNECT_RETRIES, OPT_MAX_CONNECTIONS, OPT_MARK_PROGRESS,
90-
OPT_LOG_DIR, OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION,
90+
OPT_LOG_DIR, OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION
9191
};
9292

9393
static int record= 0, opt_sleep= -1;

include/my_alloc.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
#define ALLOC_MAX_BLOCK_TO_DROP 4096
2424
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
2525

26-
C_MODE_START
26+
#ifdef __cplusplus
27+
extern "C" {
28+
#endif
2729

2830
typedef struct st_used_mem
2931
{ /* struct for once_alloc (block) */
@@ -51,6 +53,8 @@ typedef struct st_mem_root
5153
void (*error_handler)(void);
5254
} MEM_ROOT;
5355

54-
C_MODE_END
56+
#ifdef __cplusplus
57+
}
58+
#endif
5559

5660
#endif

include/mysql.h.pp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@
202202
typedef unsigned long long my_ulonglong;
203203
#include "typelib.h"
204204
#include "my_alloc.h"
205-
C_MODE_START
206205
typedef struct st_used_mem
207206
{
208207
struct st_used_mem *next;
@@ -220,7 +219,6 @@
220219
unsigned int first_block_usage;
221220
void (*error_handler)(void);
222221
} MEM_ROOT;
223-
C_MODE_END
224222
typedef struct st_typelib {
225223
unsigned int count;
226224
const char *name;

plugin/semisync/semisync_master.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class TranxNodeAllocator
153153
int free_nodes_before(TranxNode* node)
154154
{
155155
Block *block;
156-
Block *prev_block;
156+
Block *prev_block= NULL;
157157

158158
block= first_block;
159159
while (block != current_block->next)

sql/debug_sync.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,13 @@ static st_debug_sync_globals debug_sync_global; /* All globals in one object */
387387
*/
388388
extern "C" void (*debug_sync_C_callback_ptr)(const char *, size_t);
389389

390+
/**
391+
Callbacks from C files.
392+
*/
393+
C_MODE_START
394+
static void debug_sync_C_callback(const char *, size_t);
395+
static int debug_sync_qsort_cmp(const void *, const void *);
396+
C_MODE_END
390397

391398
/**
392399
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);
422429
static void debug_sync_C_callback(const char *sync_point_name,
423430
size_t name_len)
424431
{
425-
if (unlikely(opt_debug_sync_timeout))
426-
debug_sync(current_thd, sync_point_name, name_len);
432+
if (unlikely(opt_debug_sync_timeout))
433+
debug_sync(current_thd, sync_point_name, name_len);
427434
}
428435

429436
#ifdef HAVE_PSI_INTERFACE

0 commit comments

Comments
 (0)