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
98d4c9f9
Commit
98d4c9f9
authored
Dec 03, 2019
by
Jan Lindström
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'codership-10.4-MDEV-20848' into 10.4
parents
0b8b11b0
f9f3529a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
23 deletions
+19
-23
include/mysql/service_wsrep.h
include/mysql/service_wsrep.h
+2
-2
include/thr_lock.h
include/thr_lock.h
+1
-1
mysql-test/suite/galera_sr/disabled.def
mysql-test/suite/galera_sr/disabled.def
+0
-2
sql/service_wsrep.cc
sql/service_wsrep.cc
+1
-9
sql/wsrep_dummy.cc
sql/wsrep_dummy.cc
+1
-1
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+9
-3
sql/wsrep_thd.cc
sql/wsrep_thd.cc
+2
-2
sql/wsrep_thd.h
sql/wsrep_thd.h
+3
-3
No files found.
include/mysql/service_wsrep.h
View file @
98d4c9f9
...
...
@@ -74,7 +74,7 @@ extern struct wsrep_service_st {
const
char
*
(
*
wsrep_thd_client_mode_str_func
)(
const
MYSQL_THD
thd
);
const
char
*
(
*
wsrep_thd_transaction_state_str_func
)(
const
MYSQL_THD
thd
);
query_id_t
(
*
wsrep_thd_transaction_id_func
)(
const
MYSQL_THD
thd
);
my_bool
(
*
wsrep_thd_bf_abort_func
)(
const
MYSQL_THD
bf_thd
,
my_bool
(
*
wsrep_thd_bf_abort_func
)(
MYSQL_THD
bf_thd
,
MYSQL_THD
victim_thd
,
my_bool
signal
);
my_bool
(
*
wsrep_thd_order_before_func
)(
const
MYSQL_THD
left
,
const
MYSQL_THD
right
);
...
...
@@ -190,7 +190,7 @@ extern "C" void wsrep_handle_SR_rollback(MYSQL_THD BF_thd, MYSQL_THD victim_thd)
/* Return thd retry counter */
extern
"C"
int
wsrep_thd_retry_counter
(
const
MYSQL_THD
thd
);
/* BF abort victim_thd */
extern
"C"
my_bool
wsrep_thd_bf_abort
(
const
MYSQL_THD
bf_thd
,
extern
"C"
my_bool
wsrep_thd_bf_abort
(
MYSQL_THD
bf_thd
,
MYSQL_THD
victim_thd
,
my_bool
signal
);
/* Return true if left thd is ordered before right thd */
...
...
include/thr_lock.h
View file @
98d4c9f9
...
...
@@ -169,7 +169,7 @@ void thr_set_lock_wait_callback(void (*before_wait)(void),
#ifdef WITH_WSREP
typedef
my_bool
(
*
wsrep_thd_is_brute_force_fun
)(
const
MYSQL_THD
,
my_bool
);
typedef
my_bool
(
*
wsrep_abort_thd_fun
)(
const
MYSQL_THD
,
MYSQL_THD
,
my_bool
);
typedef
my_bool
(
*
wsrep_abort_thd_fun
)(
MYSQL_THD
,
MYSQL_THD
,
my_bool
);
typedef
my_bool
(
*
wsrep_on_fun
)(
const
MYSQL_THD
);
void
wsrep_thr_lock_init
(
wsrep_thd_is_brute_force_fun
bf_fun
,
wsrep_abort_thd_fun
abort_fun
,
...
...
mysql-test/suite/galera_sr/disabled.def
View file @
98d4c9f9
galera_sr_table_contents : missing file
GCF-437 : test relies on InnoDB redo log size limitation
GCF-1060 : MDEV-20848 Galera test failure on galera_sr.GCF_1060
galera_sr_ddl_master : MDEV-20780 Galera test failure on galera_sr.galera_sr_ddl_master
GCF-1043A : MDEV-21170 Galera test failure on galera_sr.GCF-1043A
sql/service_wsrep.cc
View file @
98d4c9f9
...
...
@@ -196,18 +196,10 @@ extern "C" void wsrep_handle_SR_rollback(THD *bf_thd,
}
}
extern
"C"
my_bool
wsrep_thd_bf_abort
(
const
THD
*
bf_thd
,
THD
*
victim_thd
,
extern
"C"
my_bool
wsrep_thd_bf_abort
(
THD
*
bf_thd
,
THD
*
victim_thd
,
my_bool
signal
)
{
/* Note: do not store/reset globals before wsrep_bf_abort() call
to avoid losing BF thd context. */
if
(
WSREP
(
victim_thd
)
&&
!
victim_thd
->
wsrep_trx
().
active
())
{
WSREP_DEBUG
(
"BF abort for non active transaction"
);
wsrep_start_transaction
(
victim_thd
,
victim_thd
->
wsrep_next_trx_id
());
}
my_bool
ret
=
wsrep_bf_abort
(
bf_thd
,
victim_thd
);
wsrep_store_threadvars
((
THD
*
)
bf_thd
);
/*
Send awake signal if victim was BF aborted or does not
have wsrep on. Note that this should never interrupt RSU
...
...
sql/wsrep_dummy.cc
View file @
98d4c9f9
...
...
@@ -115,7 +115,7 @@ const char* wsrep_thd_transaction_state_str(const THD*)
query_id_t
wsrep_thd_transaction_id
(
const
THD
*
)
{
return
0
;
}
my_bool
wsrep_thd_bf_abort
(
const
THD
*
,
THD
*
,
my_bool
)
my_bool
wsrep_thd_bf_abort
(
THD
*
,
THD
*
,
my_bool
)
{
return
0
;
}
my_bool
wsrep_thd_order_before
(
const
THD
*
,
const
THD
*
)
...
...
sql/wsrep_mysqld.cc
View file @
98d4c9f9
...
...
@@ -2101,12 +2101,18 @@ void wsrep_handle_mdl_conflict(MDL_context *requestor_ctx,
if
(
wsrep_thd_is_toi
(
granted_thd
)
||
wsrep_thd_is_applying
(
granted_thd
))
{
if
(
wsrep_thd_is_SR
(
granted_thd
)
&&
!
wsrep_thd_is_SR
(
request_thd
))
if
(
wsrep_thd_is_aborting
(
granted_thd
))
{
WSREP_DEBUG
(
"BF thread waiting for SR in aborting state"
);
ticket
->
wsrep_report
(
wsrep_debug
);
mysql_mutex_unlock
(
&
granted_thd
->
LOCK_thd_data
);
}
else
if
(
wsrep_thd_is_SR
(
granted_thd
)
&&
!
wsrep_thd_is_SR
(
request_thd
))
{
WSREP_MDL_LOG
(
INFO
,
"MDL conflict, DDL vs SR"
,
schema
,
schema_len
,
request_thd
,
granted_thd
);
mysql_mutex_unlock
(
&
granted_thd
->
LOCK_thd_data
);
wsrep_abort_thd
(
(
void
*
)
request_thd
,
(
void
*
)
granted_thd
,
1
);
wsrep_abort_thd
(
request_thd
,
granted_thd
,
1
);
}
else
{
...
...
@@ -2130,7 +2136,7 @@ void wsrep_handle_mdl_conflict(MDL_context *requestor_ctx,
wsrep_thd_transaction_state_str
(
granted_thd
));
ticket
->
wsrep_report
(
wsrep_debug
);
mysql_mutex_unlock
(
&
granted_thd
->
LOCK_thd_data
);
wsrep_abort_thd
(
(
void
*
)
request_thd
,
(
void
*
)
granted_thd
,
1
);
wsrep_abort_thd
(
request_thd
,
granted_thd
,
1
);
}
else
{
...
...
sql/wsrep_thd.cc
View file @
98d4c9f9
...
...
@@ -345,7 +345,7 @@ void wsrep_fire_rollbacker(THD *thd)
}
int
wsrep_abort_thd
(
void
*
bf_thd_ptr
,
void
*
victim_thd_ptr
,
my_bool
signal
)
int
wsrep_abort_thd
(
THD
*
bf_thd_ptr
,
THD
*
victim_thd_ptr
,
my_bool
signal
)
{
DBUG_ENTER
(
"wsrep_abort_thd"
);
THD
*
victim_thd
=
(
THD
*
)
victim_thd_ptr
;
...
...
@@ -373,7 +373,7 @@ int wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr, my_bool signal)
bool
wsrep_bf_abort
(
const
THD
*
bf_thd
,
THD
*
victim_thd
)
{
WSREP_LOG_THD
(
(
THD
*
)
bf_thd
,
"BF aborter before"
);
WSREP_LOG_THD
(
bf_thd
,
"BF aborter before"
);
WSREP_LOG_THD
(
victim_thd
,
"victim before"
);
wsrep
::
seqno
bf_seqno
(
bf_thd
->
wsrep_trx
().
ws_meta
().
seqno
());
...
...
sql/wsrep_thd.h
View file @
98d4c9f9
...
...
@@ -88,8 +88,8 @@ void wsrep_create_appliers(long threads);
void
wsrep_create_rollbacker
();
bool
wsrep_bf_abort
(
const
THD
*
,
THD
*
);
int
wsrep_abort_thd
(
void
*
bf_thd_ptr
,
void
*
victim_thd_ptr
,
my_bool
signal
);
int
wsrep_abort_thd
(
THD
*
bf_thd_ptr
,
THD
*
victim_thd_ptr
,
my_bool
signal
);
extern
void
wsrep_thd_set_PA_safe
(
void
*
thd_ptr
,
my_bool
safe
);
/*
...
...
@@ -262,7 +262,7 @@ static inline void wsrep_override_error(THD* thd,
@param message Optional message
@param function Function where the call was made from
*/
static
inline
void
wsrep_log_thd
(
THD
*
thd
,
static
inline
void
wsrep_log_thd
(
const
THD
*
thd
,
const
char
*
message
,
const
char
*
function
)
{
...
...
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