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
e22b271b
Commit
e22b271b
authored
Oct 21, 2016
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MariaRocks port: compilation fixes
parent
86d963eb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
25 deletions
+36
-25
sql/field.h
sql/field.h
+1
-1
storage/rocksdb/CMakeLists.txt
storage/rocksdb/CMakeLists.txt
+4
-1
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+4
-4
storage/rocksdb/rdb_i_s.cc
storage/rocksdb/rdb_i_s.cc
+8
-8
storage/rocksdb/rdb_i_s.h
storage/rocksdb/rdb_i_s.h
+8
-8
storage/rocksdb/rdb_mutex_wrapper.cc
storage/rocksdb/rdb_mutex_wrapper.cc
+10
-3
storage/rocksdb/tools/mysql_ldb.cc
storage/rocksdb/tools/mysql_ldb.cc
+1
-0
No files found.
sql/field.h
View file @
e22b271b
...
...
@@ -3275,7 +3275,7 @@ class Field_blob :public Field_longstr {
memcpy
(
ptr
,
length
,
packlength
);
memcpy
(
ptr
+
packlength
,
&
data
,
sizeof
(
char
*
));
}
void
set_ptr_offset
(
my_ptrdiff_t
ptr_diff
,
uint32
length
,
uchar
*
data
)
void
set_ptr_offset
(
my_ptrdiff_t
ptr_diff
,
uint32
length
,
const
uchar
*
data
)
{
uchar
*
ptr_ofs
=
ADD_TO_PTR
(
ptr
,
ptr_diff
,
uchar
*
);
store_length
(
ptr_ofs
,
packlength
,
length
);
...
...
storage/rocksdb/CMakeLists.txt
View file @
e22b271b
...
...
@@ -4,7 +4,7 @@ IF (NOT EXISTS "${CMAKE_SOURCE_DIR}/storage/rocksdb/rocksdb/Makefile")
MESSAGE
(
SEND_ERROR
"Missing Makefile in rocksdb directory. Try
\"
git submodule update
\"
."
)
ENDIF
()
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11
-frtti
"
)
# get a list of rocksdb library source files
# run with env -i to avoid passing variables
...
...
@@ -36,6 +36,9 @@ ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX
# (facebook/mysql-5.6 just compiles everything without -f*rtti, which means
# everything is compiled with -frtti)
#
# (also had to add -frtti above, because something that event_listener.cc
# includes requires it. So, now everything in MariaRocks is compiled with
# -frtti)
set_source_files_properties
(
${
ROCKSDB_LIB_SOURCES
}
PROPERTIES COMPILE_FLAGS -frtti
)
SET
(
ROCKSDB_SOURCES
...
...
storage/rocksdb/ha_rocksdb.cc
View file @
e22b271b
...
...
@@ -10780,7 +10780,7 @@ double ha_rocksdb::read_time(uint index, uint ranges, ha_rows rows)
struct
st_mysql_storage_engine
rocksdb_storage_engine
=
{
MYSQL_HANDLERTON_INTERFACE_VERSION
};
m
ysql
_declare_plugin
(
rocksdb_se
)
m
aria
_declare_plugin
(
rocksdb_se
)
{
MYSQL_STORAGE_ENGINE_PLUGIN
,
/* Plugin Type */
&
rocksdb_storage_engine
,
/* Plugin Descriptor */
...
...
@@ -10793,8 +10793,8 @@ mysql_declare_plugin(rocksdb_se)
0x0001
,
/* version number (0.1) */
myrocks
::
rocksdb_status_vars
,
/* status variables */
myrocks
::
rocksdb_system_variables
,
/* system variables */
nullptr
,
/* config options
*/
0
,
/* flags
*/
"1.0"
,
/* string version
*/
MariaDB_PLUGIN_MATURITY_ALPHA
/* maturity
*/
},
myrocks
::
rdb_i_s_cfstats
,
myrocks
::
rdb_i_s_dbstats
,
...
...
@@ -10804,4 +10804,4 @@ myrocks::rdb_i_s_cfoptions,
myrocks
::
rdb_i_s_global_info
,
myrocks
::
rdb_i_s_ddl
,
myrocks
::
rdb_i_s_index_file_map
m
ysql
_declare_plugin_end
;
m
aria
_declare_plugin_end
;
storage/rocksdb/rdb_i_s.cc
View file @
e22b271b
...
...
@@ -1052,7 +1052,7 @@ static int rdb_i_s_deinit(void *p __attribute__((__unused__)))
static
struct
st_mysql_information_schema
rdb_i_s_info
=
{
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
};
struct
st_m
ysql
_plugin
rdb_i_s_cfstats
=
struct
st_m
aria
_plugin
rdb_i_s_cfstats
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
@@ -1069,7 +1069,7 @@ struct st_mysql_plugin rdb_i_s_cfstats=
0
,
/* flags */
};
struct
st_m
ysql
_plugin
rdb_i_s_dbstats
=
struct
st_m
aria
_plugin
rdb_i_s_dbstats
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
@@ -1086,7 +1086,7 @@ struct st_mysql_plugin rdb_i_s_dbstats=
0
,
/* flags */
};
struct
st_m
ysql
_plugin
rdb_i_s_perf_context
=
struct
st_m
aria
_plugin
rdb_i_s_perf_context
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
@@ -1103,7 +1103,7 @@ struct st_mysql_plugin rdb_i_s_perf_context=
0
,
/* flags */
};
struct
st_m
ysql
_plugin
rdb_i_s_perf_context_global
=
struct
st_m
aria
_plugin
rdb_i_s_perf_context_global
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
@@ -1120,7 +1120,7 @@ struct st_mysql_plugin rdb_i_s_perf_context_global=
0
,
/* flags */
};
struct
st_m
ysql
_plugin
rdb_i_s_cfoptions
=
struct
st_m
aria
_plugin
rdb_i_s_cfoptions
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
@@ -1137,7 +1137,7 @@ struct st_mysql_plugin rdb_i_s_cfoptions=
0
,
/* flags */
};
struct
st_m
ysql
_plugin
rdb_i_s_global_info
=
struct
st_m
aria
_plugin
rdb_i_s_global_info
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
@@ -1154,7 +1154,7 @@ struct st_mysql_plugin rdb_i_s_global_info=
0
,
/* flags */
};
struct
st_m
ysql
_plugin
rdb_i_s_ddl
=
struct
st_m
aria
_plugin
rdb_i_s_ddl
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
@@ -1171,7 +1171,7 @@ struct st_mysql_plugin rdb_i_s_ddl=
0
,
/* flags */
};
struct
st_m
ysql
_plugin
rdb_i_s_index_file_map
=
struct
st_m
aria
_plugin
rdb_i_s_index_file_map
=
{
MYSQL_INFORMATION_SCHEMA_PLUGIN
,
&
rdb_i_s_info
,
...
...
storage/rocksdb/rdb_i_s.h
View file @
e22b271b
...
...
@@ -21,14 +21,14 @@ namespace myrocks {
Declare INFORMATION_SCHEMA (I_S) plugins needed by MyRocks storage engine.
*/
extern
struct
st_m
ysql
_plugin
rdb_i_s_cfstats
;
extern
struct
st_m
ysql
_plugin
rdb_i_s_dbstats
;
extern
struct
st_m
ysql
_plugin
rdb_i_s_perf_context
;
extern
struct
st_m
ysql
_plugin
rdb_i_s_perf_context_global
;
extern
struct
st_m
ysql
_plugin
rdb_i_s_cfoptions
;
extern
struct
st_m
ysql
_plugin
rdb_i_s_global_info
;
extern
struct
st_m
ysql
_plugin
rdb_i_s_ddl
;
extern
struct
st_m
ysql
_plugin
rdb_i_s_index_file_map
;
extern
struct
st_m
aria
_plugin
rdb_i_s_cfstats
;
extern
struct
st_m
aria
_plugin
rdb_i_s_dbstats
;
extern
struct
st_m
aria
_plugin
rdb_i_s_perf_context
;
extern
struct
st_m
aria
_plugin
rdb_i_s_perf_context_global
;
extern
struct
st_m
aria
_plugin
rdb_i_s_cfoptions
;
extern
struct
st_m
aria
_plugin
rdb_i_s_global_info
;
extern
struct
st_m
aria
_plugin
rdb_i_s_ddl
;
extern
struct
st_m
aria
_plugin
rdb_i_s_index_file_map
;
}
// namespace myrocks
storage/rocksdb/rdb_mutex_wrapper.cc
View file @
e22b271b
...
...
@@ -19,10 +19,17 @@
/* This C++ file's header file */
#include "./rdb_mutex_wrapper.h"
/* The following are for THD_ENTER_COND: */
#define MYSQL_SERVER 1
#include "sql_priv.h"
#include "my_decimal.h"
#include "sql_class.h"
/* MyRocks header files */
#include "./ha_rocksdb.h"
#include "./rdb_utils.h"
// Internal MySQL APIs not exposed in any header.
extern
"C"
{
...
...
@@ -92,8 +99,8 @@ Rdb_cond_var::WaitFor(std::shared_ptr<TransactionDBMutex> mutex_arg,
if
(
current_thd
&&
mutex_obj
->
m_old_stage_info
.
count
(
current_thd
)
==
0
)
{
my_core
::
thd_enter_cond
(
current_thd
,
&
m_cond
,
mutex_ptr
,
&
stage_waiting_on_row_lock2
,
&
old_stage
);
THD_ENTER_COND
(
current_thd
,
&
m_cond
,
mutex_ptr
,
&
stage_waiting_on_row_lock2
,
&
old_stage
);
/*
After the mysql_cond_timedwait we need make this call
...
...
@@ -226,7 +233,7 @@ void Rdb_mutex::UnLock() {
std
::
shared_ptr
<
PSI_stage_info
>
old_stage
=
m_old_stage_info
[
current_thd
];
m_old_stage_info
.
erase
(
current_thd
);
/* The following will call mysql_mutex_unlock */
my_core
::
thd_exit_cond
(
current_thd
,
old_stage
.
get
());
THD_EXIT_COND
(
current_thd
,
old_stage
.
get
());
return
;
}
#endif
...
...
storage/rocksdb/tools/mysql_ldb.cc
View file @
e22b271b
...
...
@@ -3,6 +3,7 @@
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
#include <my_config.h>
#include "rocksdb/ldb_tool.h"
#include "../rdb_comparator.h"
...
...
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