Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6e899642
Commit
6e899642
authored
Mar 11, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move rocksdb specific changes into rocksdb
parent
9ce639af
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
26 deletions
+27
-26
include/mysql/plugin.h
include/mysql/plugin.h
+0
-17
sql/handler.cc
sql/handler.cc
+0
-8
sql/handler.h
sql/handler.h
+0
-1
storage/rocksdb/build_rocksdb.cmake
storage/rocksdb/build_rocksdb.cmake
+6
-0
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+20
-0
storage/rocksdb/ha_rocksdb.h
storage/rocksdb/ha_rocksdb.h
+1
-0
No files found.
include/mysql/plugin.h
View file @
6e899642
...
@@ -393,23 +393,6 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
...
@@ -393,23 +393,6 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def, min, max, blk }
#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) \
#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
...
...
sql/handler.cc
View file @
6e899642
...
@@ -2728,14 +2728,6 @@ int handler::ha_index_first(uchar * buf)
...
@@ -2728,14 +2728,6 @@ int handler::ha_index_first(uchar * buf)
return
result
;
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
handler
::
ha_index_last
(
uchar
*
buf
)
{
{
int
result
;
int
result
;
...
...
sql/handler.h
View file @
6e899642
...
@@ -3193,7 +3193,6 @@ class handler :public Sql_alloc
...
@@ -3193,7 +3193,6 @@ class handler :public Sql_alloc
size_t
size
)
size_t
size
)
{
return
0
;
}
{
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
,
virtual
int
read_range_first
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
const
key_range
*
end_key
,
bool
eq_range
,
bool
sorted
);
bool
eq_range
,
bool
sorted
);
...
...
storage/rocksdb/build_rocksdb.cmake
View file @
6e899642
...
@@ -29,6 +29,12 @@ else()
...
@@ -29,6 +29,12 @@ else()
endif
()
endif
()
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.
# Optional compression libraries.
foreach
(
compression_lib LZ4 BZIP2 ZSTD snappy
)
foreach
(
compression_lib LZ4 BZIP2 ZSTD snappy
)
...
...
storage/rocksdb/ha_rocksdb.cc
View file @
6e899642
...
@@ -454,6 +454,18 @@ const int64 RDB_DEFAULT_BLOCK_CACHE_SIZE = 512 * 1024 * 1024;
...
@@ -454,6 +454,18 @@ const int64 RDB_DEFAULT_BLOCK_CACHE_SIZE = 512 * 1024 * 1024;
const
int64
RDB_MIN_BLOCK_CACHE_SIZE
=
1024
;
const
int64
RDB_MIN_BLOCK_CACHE_SIZE
=
1024
;
const
int
RDB_MAX_CHECKSUMS_PCT
=
100
;
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?
// 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
,
static
MYSQL_THDVAR_ULONG
(
lock_wait_timeout
,
PLUGIN_VAR_RQCMDARG
,
"Number of seconds to wait for lock"
,
nullptr
,
"Number of seconds to wait for lock"
,
nullptr
,
...
@@ -5922,6 +5934,14 @@ int ha_rocksdb::secondary_index_read(const int keyno, uchar *const buf) {
...
@@ -5922,6 +5934,14 @@ int ha_rocksdb::secondary_index_read(const int keyno, uchar *const buf) {
return
HA_ERR_END_OF_FILE
;
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.
ha_rocksdb::read_range_first overrides handler::read_range_first.
The only difference from handler::read_range_first is that
The only difference from handler::read_range_first is that
...
...
storage/rocksdb/ha_rocksdb.h
View file @
6e899642
...
@@ -866,6 +866,7 @@ class ha_rocksdb : public my_core::handler {
...
@@ -866,6 +866,7 @@ class ha_rocksdb : public my_core::handler {
const
key_range
*
end_key
)
const
key_range
*
end_key
)
MY_ATTRIBUTE
((
__warn_unused_result__
));
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
,
int
read_range_first
(
const
key_range
*
const
start_key
,
const
key_range
*
const
end_key
,
bool
eq_range
,
const
key_range
*
const
end_key
,
bool
eq_range
,
bool
sorted
)
override
bool
sorted
)
override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment