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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
86551362
Commit
86551362
authored
Jan 08, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove wsrep_hton dependency from innodb/xtradb
parent
4ce39dca
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
17 deletions
+12
-17
include/mysql/service_wsrep.h
include/mysql/service_wsrep.h
+3
-3
include/service_versions.h
include/service_versions.h
+1
-1
sql/wsrep_dummy.cc
sql/wsrep_dummy.cc
+1
-1
sql/wsrep_hton.cc
sql/wsrep_hton.cc
+3
-7
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+2
-2
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+2
-3
No files found.
include/mysql/service_wsrep.h
View file @
86551362
...
...
@@ -80,7 +80,7 @@ extern struct wsrep_service_st {
int
(
*
wsrep_on_func
)(
MYSQL_THD
);
void
(
*
wsrep_post_commit_func
)(
THD
*
thd
,
bool
all
);
bool
(
*
wsrep_prepare_key_func
)(
const
unsigned
char
*
,
size_t
,
const
unsigned
char
*
,
size_t
,
struct
wsrep_buf
*
,
size_t
*
);
enum
wsrep_trx_status
(
*
wsrep_run_wsrep_commit_func
)(
THD
*
thd
,
handlerton
*
hton
,
bool
all
);
enum
wsrep_trx_status
(
*
wsrep_run_wsrep_commit_func
)(
THD
*
thd
,
bool
all
);
void
(
*
wsrep_thd_LOCK_func
)(
THD
*
thd
);
void
(
*
wsrep_thd_UNLOCK_func
)(
THD
*
thd
);
void
(
*
wsrep_thd_awake_func
)(
THD
*
thd
,
my_bool
signal
);
...
...
@@ -119,7 +119,7 @@ extern struct wsrep_service_st {
#define wsrep_on(X) wsrep_service->wsrep_on_func(X)
#define wsrep_post_commit(T,A) wsrep_service->wsrep_post_commit_func(T,A)
#define wsrep_prepare_key(A,B,C,D,E,F) wsrep_service->wsrep_prepare_key_func(A,B,C,D,E,F)
#define wsrep_run_wsrep_commit(T,
H,A) wsrep_service->wsrep_run_wsrep_commit_func(T,H
,A)
#define wsrep_run_wsrep_commit(T,
A) wsrep_service->wsrep_run_wsrep_commit_func(T
,A)
#define wsrep_thd_LOCK(T) wsrep_service->wsrep_thd_LOCK_func(T)
#define wsrep_thd_UNLOCK(T) wsrep_service->wsrep_thd_UNLOCK_func(T)
#define wsrep_thd_awake(T,S) wsrep_service->wsrep_thd_awake_func(T,S)
...
...
@@ -167,7 +167,7 @@ enum wsrep_conflict_state wsrep_thd_conflict_state(MYSQL_THD thd, my_bool sync);
enum
wsrep_conflict_state
wsrep_thd_get_conflict_state
(
MYSQL_THD
thd
);
enum
wsrep_exec_mode
wsrep_thd_exec_mode
(
THD
*
thd
);
enum
wsrep_query_state
wsrep_thd_query_state
(
THD
*
thd
);
enum
wsrep_trx_status
wsrep_run_wsrep_commit
(
THD
*
thd
,
handlerton
*
hton
,
bool
all
);
enum
wsrep_trx_status
wsrep_run_wsrep_commit
(
THD
*
thd
,
bool
all
);
int
wsrep_is_wsrep_xid
(
const
struct
xid_t
*
xid
);
int
wsrep_on
(
MYSQL_THD
thd
);
int
wsrep_thd_retry_counter
(
THD
*
thd
);
...
...
include/service_versions.h
View file @
86551362
...
...
@@ -30,7 +30,7 @@
#define VERSION_thd_timezone 0x0100
#define VERSION_my_sha1 0x0101
#define VERSION_my_md5 0x0100
#define VERSION_wsrep 0x0
1
00
#define VERSION_wsrep 0x0
2
00
#define VERSION_logger 0x0100
#define VERSION_thd_autoinc 0x0100
#define VERSION_thd_error_context 0x0100
...
...
sql/wsrep_dummy.cc
View file @
86551362
...
...
@@ -71,7 +71,7 @@ int wsrep_on(THD *thd)
void
wsrep_post_commit
(
THD
*
,
bool
)
{
}
enum
wsrep_trx_status
wsrep_run_wsrep_commit
(
THD
*
,
handlerton
*
,
bool
)
enum
wsrep_trx_status
wsrep_run_wsrep_commit
(
THD
*
,
bool
)
{
return
WSREP_TRX_ERROR
;
}
void
wsrep_thd_LOCK
(
THD
*
)
...
...
sql/wsrep_hton.cc
View file @
86551362
...
...
@@ -27,9 +27,6 @@ extern ulonglong thd_to_trx_id(THD *thd);
extern
"C"
int
thd_binlog_format
(
const
MYSQL_THD
thd
);
// todo: share interface with ha_innodb.c
enum
wsrep_trx_status
wsrep_run_wsrep_commit
(
THD
*
thd
,
handlerton
*
hton
,
bool
all
);
/*
Cleanup after local transaction commit/rollback, replay or TOI.
*/
...
...
@@ -157,7 +154,7 @@ static int wsrep_prepare(handlerton *hton, THD *thd, bool all)
!
thd_test_options
(
thd
,
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
))
&&
(
thd
->
variables
.
wsrep_on
&&
!
wsrep_trans_cache_is_empty
(
thd
)))
{
int
res
=
wsrep_run_wsrep_commit
(
thd
,
hton
,
all
);
int
res
=
wsrep_run_wsrep_commit
(
thd
,
all
);
if
(
res
!=
0
)
{
if
(
res
==
WSREP_TRX_SIZE_EXCEEDED
)
...
...
@@ -281,20 +278,19 @@ extern Rpl_filter* binlog_filter;
extern
my_bool
opt_log_slave_updates
;
enum
wsrep_trx_status
wsrep_run_wsrep_commit
(
THD
*
thd
,
handlerton
*
hton
,
bool
all
)
wsrep_run_wsrep_commit
(
THD
*
thd
,
bool
all
)
{
int
rcode
=
-
1
;
size_t
data_len
=
0
;
IO_CACHE
*
cache
;
int
replay_round
=
0
;
DBUG_ENTER
(
"wsrep_run_wsrep_commit"
);
if
(
thd
->
get_stmt_da
()
->
is_error
())
{
WSREP_ERROR
(
"commit issue, error: %d %s"
,
thd
->
get_stmt_da
()
->
sql_errno
(),
thd
->
get_stmt_da
()
->
message
());
}
DBUG_ENTER
(
"wsrep_run_wsrep_commit"
);
if
(
thd
->
slave_thread
&&
!
opt_log_slave_updates
)
DBUG_RETURN
(
WSREP_TRX_OK
);
if
(
thd
->
wsrep_exec_mode
==
REPL_RECV
)
{
...
...
storage/innobase/handler/ha_innodb.cc
View file @
86551362
...
...
@@ -7641,7 +7641,7 @@ no_commit:
}
else
if
(
src_table
==
prebuilt
->
table
)
{
#ifdef WITH_WSREP
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
1
))
{
case
WSREP_TRX_OK
:
break
;
...
...
@@ -7668,7 +7668,7 @@ no_commit:
}
else
{
#ifdef WITH_WSREP
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
1
))
{
case
WSREP_TRX_OK
:
break
;
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
86551362
...
...
@@ -145,7 +145,6 @@ wsrep_ws_handle(THD* thd, const trx_t* trx) {
(
wsrep_trx_id_t
)
trx
->
id
);
}
extern
handlerton
*
wsrep_hton
;
extern
TC_LOG
*
tc_log
;
extern
void
wsrep_cleanup_transaction
(
THD
*
thd
);
static
int
...
...
@@ -8102,7 +8101,7 @@ no_commit:
}
else
if
(
src_table
==
prebuilt
->
table
)
{
#ifdef WITH_WSREP
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
1
))
{
case
WSREP_TRX_OK
:
break
;
...
...
@@ -8129,7 +8128,7 @@ no_commit:
}
else
{
#ifdef WITH_WSREP
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
1
))
{
case
WSREP_TRX_OK
:
break
;
...
...
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