move rocksdb specific changes into rocksdb
This commit is contained in:
parent
9ce639af52
commit
6e899642fe
@ -393,23 +393,6 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
|
||||
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
|
||||
#name, comment, check, update, &varname, def, min, max, blk }
|
||||
|
||||
#define MYSQL_SYSVAR_UINT64_T(name, varname, opt, comment, check, update, def, min, max, blk) \
|
||||
DECLARE_MYSQL_SYSVAR_SIMPLE(name, uint64_t) = { \
|
||||
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
|
||||
#name, comment, check, update, &varname, def, min, max, blk }
|
||||
|
||||
#ifdef _WIN64
|
||||
#define MYSQL_SYSVAR_SIZE_T(name, varname, opt, comment, check, update, def, min, max, blk) \
|
||||
DECLARE_MYSQL_SYSVAR_SIMPLE(name, size_t) = { \
|
||||
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
|
||||
#name, comment, check, update, &varname, def, min, max, blk }
|
||||
#else
|
||||
#define MYSQL_SYSVAR_SIZE_T(name, varname, opt, comment, check, update, def, min, max, blk) \
|
||||
DECLARE_MYSQL_SYSVAR_SIMPLE(name, size_t) = { \
|
||||
PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
|
||||
#name, comment, check, update, &varname, def, min, max, blk }
|
||||
#endif
|
||||
|
||||
#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
|
||||
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
|
||||
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
|
||||
|
@ -2728,14 +2728,6 @@ int handler::ha_index_first(uchar * buf)
|
||||
return result;
|
||||
}
|
||||
|
||||
bool handler::is_using_full_key(key_part_map keypart_map,
|
||||
uint actual_key_parts)
|
||||
{
|
||||
return (keypart_map == HA_WHOLE_KEY) ||
|
||||
(keypart_map == ((key_part_map(1) << actual_key_parts)
|
||||
- 1));
|
||||
}
|
||||
|
||||
int handler::ha_index_last(uchar * buf)
|
||||
{
|
||||
int result;
|
||||
|
@ -3193,7 +3193,6 @@ public:
|
||||
size_t size)
|
||||
{ return 0; }
|
||||
|
||||
bool is_using_full_key(key_part_map keypart_map, uint actual_key_parts);
|
||||
virtual int read_range_first(const key_range *start_key,
|
||||
const key_range *end_key,
|
||||
bool eq_range, bool sorted);
|
||||
|
@ -29,6 +29,12 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include (CheckTypeSize)
|
||||
check_type_size(size_t SIZEOF_SIZE_T)
|
||||
check_type_size(uint64_t SIZEOF_UINT64_T)
|
||||
set_property(SOURCE ha_rocksdb.cc APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
SIZEOF_SIZE_T=${SIZEOF_SIZE_T} SIZEOF_UINT64_T=${SIZEOF_UINT64_T})
|
||||
|
||||
# Optional compression libraries.
|
||||
|
||||
foreach(compression_lib LZ4 BZIP2 ZSTD snappy)
|
||||
|
@ -454,6 +454,18 @@ const int64 RDB_DEFAULT_BLOCK_CACHE_SIZE = 512 * 1024 * 1024;
|
||||
const int64 RDB_MIN_BLOCK_CACHE_SIZE = 1024;
|
||||
const int RDB_MAX_CHECKSUMS_PCT = 100;
|
||||
|
||||
#if SIZEOF_ULONG == SIZEOF_SIZE_T
|
||||
#define MYSQL_SYSVAR_SIZE_T MYSQL_SYSVAR_ULONG
|
||||
#else
|
||||
#define MYSQL_SYSVAR_SIZE_T MYSQL_SYSVAR_ULONGLONG
|
||||
#endif
|
||||
|
||||
#if SIZEOF_ULONG == SIZEOF_UINT64_T
|
||||
#define MYSQL_SYSVAR_UINT64_T MYSQL_SYSVAR_ULONG
|
||||
#else
|
||||
#define MYSQL_SYSVAR_UINT64_T MYSQL_SYSVAR_ULONGLONG
|
||||
#endif
|
||||
|
||||
// TODO: 0 means don't wait at all, and we don't support it yet?
|
||||
static MYSQL_THDVAR_ULONG(lock_wait_timeout, PLUGIN_VAR_RQCMDARG,
|
||||
"Number of seconds to wait for lock", nullptr,
|
||||
@ -5922,6 +5934,14 @@ int ha_rocksdb::secondary_index_read(const int keyno, uchar *const buf) {
|
||||
return HA_ERR_END_OF_FILE;
|
||||
}
|
||||
|
||||
bool ha_rocksdb::is_using_full_key(key_part_map keypart_map,
|
||||
uint actual_key_parts)
|
||||
{
|
||||
return (keypart_map == HA_WHOLE_KEY) ||
|
||||
(keypart_map == ((key_part_map(1) << actual_key_parts)
|
||||
- 1));
|
||||
}
|
||||
|
||||
/*
|
||||
ha_rocksdb::read_range_first overrides handler::read_range_first.
|
||||
The only difference from handler::read_range_first is that
|
||||
|
@ -866,6 +866,7 @@ public:
|
||||
const key_range *end_key)
|
||||
MY_ATTRIBUTE((__warn_unused_result__));
|
||||
|
||||
bool is_using_full_key(key_part_map keypart_map, uint actual_key_parts);
|
||||
int read_range_first(const key_range *const start_key,
|
||||
const key_range *const end_key, bool eq_range,
|
||||
bool sorted) override
|
||||
|
Loading…
x
Reference in New Issue
Block a user