Skip to content

Commit 2be18d9

Browse files
committed
Fix the build on Windows.
Restore MYSQL_SYSVAR_UINT64_T and MYSQL_SYSVAR_SIZE_T in plugin.h
1 parent c35a588 commit 2be18d9

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

include/mysql/plugin.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,23 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
393393
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
394394
#name, comment, check, update, &varname, def, min, max, blk }
395395

396+
#define MYSQL_SYSVAR_UINT64_T(name, varname, opt, comment, check, update, def, min, max, blk) \
397+
DECLARE_MYSQL_SYSVAR_SIMPLE(name, uint64_t) = { \
398+
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
399+
#name, comment, check, update, &varname, def, min, max, blk }
400+
401+
#ifdef _WIN64
402+
#define MYSQL_SYSVAR_SIZE_T(name, varname, opt, comment, check, update, def, min, max, blk) \
403+
DECLARE_MYSQL_SYSVAR_SIMPLE(name, size_t) = { \
404+
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
405+
#name, comment, check, update, &varname, def, min, max, blk }
406+
#else
407+
#define MYSQL_SYSVAR_SIZE_T(name, varname, opt, comment, check, update, def, min, max, blk) \
408+
DECLARE_MYSQL_SYSVAR_SIMPLE(name, size_t) = { \
409+
PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
410+
#name, comment, check, update, &varname, def, min, max, blk }
411+
#endif
412+
396413
#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
397414
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
398415
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \

storage/rocksdb/ha_rocksdb.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -454,18 +454,6 @@ const int64 RDB_DEFAULT_BLOCK_CACHE_SIZE = 512 * 1024 * 1024;
454454
const int64 RDB_MIN_BLOCK_CACHE_SIZE = 1024;
455455
const int RDB_MAX_CHECKSUMS_PCT = 100;
456456

457-
#if SIZEOF_ULONG == SIZEOF_SIZE_T
458-
#define MYSQL_SYSVAR_SIZE_T MYSQL_SYSVAR_ULONG
459-
#else
460-
#define MYSQL_SYSVAR_SIZE_T MYSQL_SYSVAR_ULONGLONG
461-
#endif
462-
463-
#if SIZEOF_ULONG == SIZEOF_UINT64_T
464-
#define MYSQL_SYSVAR_UINT64_T MYSQL_SYSVAR_ULONG
465-
#else
466-
#define MYSQL_SYSVAR_UINT64_T MYSQL_SYSVAR_ULONGLONG
467-
#endif
468-
469457
// TODO: 0 means don't wait at all, and we don't support it yet?
470458
static MYSQL_THDVAR_ULONG(lock_wait_timeout, PLUGIN_VAR_RQCMDARG,
471459
"Number of seconds to wait for lock", nullptr,

0 commit comments

Comments
 (0)