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
0a1d31c8
Commit
0a1d31c8
authored
Dec 31, 2019
by
Jan Lindström
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'codership-10.4-MDEV-20793' into 10.4
parents
59d4f2a3
ad0eed87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
4 deletions
+116
-4
mysql-test/suite/galera/r/MDEV-20793.result
mysql-test/suite/galera/r/MDEV-20793.result
+39
-0
mysql-test/suite/galera/t/MDEV-20793.test
mysql-test/suite/galera/t/MDEV-20793.test
+75
-0
sql/wsrep_high_priority_service.cc
sql/wsrep_high_priority_service.cc
+1
-3
wsrep-lib
wsrep-lib
+1
-1
No files found.
mysql-test/suite/galera/r/MDEV-20793.result
0 → 100644
View file @
0a1d31c8
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT);
INSERT INTO t1 VALUES (1, 0), (5, 0);
connection node_1_ctrl;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_slave_threads = 2;
connection node_1;
SET SESSION wsrep_retry_autocommit = 0;
START TRANSACTION;
UPDATE t1 SET f2 = 1;
SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue";
connection node_1_ctrl;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
INSERT INTO t1 VALUES (2, 2);
connection node_1_ctrl;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_slave_enter_sync';
connection node_2;
UPDATE t1 SET f2 = 2 WHERE f1 = 5;
connection node_1_ctrl;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
connection node_1;
COMMIT;
connection node_1_ctrl;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET SESSION debug_sync = "now WAIT_FOR reached";
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION debug_sync = "now SIGNAL continue";
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET debug_sync = "RESET";
DROP TABLE t1;
SET GLOBAL wsrep_slave_threads = 1;
mysql-test/suite/galera/t/MDEV-20793.test
0 → 100644
View file @
0a1d31c8
#
# MDEV-20793 Assertion after certification failure during replay.
#
# The test outline:
# In order to produce certification failure three transactions
# are needed. One transaction is executing on node_1 and two others
# on node_2. The first transaction from node_2 BF aborts the transaction
# on node_1, but does not cause certification conflict. The second
# transaction from node_2 will cause conflict and the transaction on
# node_1 fails in certification during replay.
#
--
source
include
/
galera_cluster
.
inc
CREATE
TABLE
t1
(
f1
INT
PRIMARY
KEY
,
f2
INT
);
INSERT
INTO
t1
VALUES
(
1
,
0
),
(
5
,
0
);
--
let
galera_connection_name
=
node_1_ctrl
--
let
galera_server_number
=
1
--
source
include
/
galera_connect
.
inc
--
connection
node_1_ctrl
SET
SESSION
wsrep_sync_wait
=
0
;
SET
GLOBAL
wsrep_slave_threads
=
2
;
--
connection
node_1
# Start transaction which takes gap lock 1 - 5
SET
SESSION
wsrep_retry_autocommit
=
0
;
START
TRANSACTION
;
UPDATE
t1
SET
f2
=
1
;
SET
SESSION
debug_sync
=
"wsrep_before_replay SIGNAL reached WAIT_FOR continue"
;
--
connection
node_1_ctrl
--
let
$galera_sync_point
=
apply_monitor_slave_enter_sync
--
source
include
/
galera_set_sync_point
.
inc
--
connection
node_2
# Insert into gap from other node. This generates BF abort but does not
# conflict with update.
INSERT
INTO
t1
VALUES
(
2
,
2
);
--
connection
node_1_ctrl
--
source
include
/
galera_wait_sync_point
.
inc
--
source
include
/
galera_clear_sync_point
.
inc
--
let
$galera_sync_point
=
local_monitor_slave_enter_sync
--
source
include
/
galera_set_sync_point
.
inc
# Make an update which will conflict with update on node_1
--
connection
node_2
UPDATE
t1
SET
f2
=
2
WHERE
f1
=
5
;
--
connection
node_1_ctrl
--
let
$galera_sync_point
=
apply_monitor_slave_enter_sync
local_monitor_slave_enter_sync
--
source
include
/
galera_wait_sync_point
.
inc
--
connection
node_1
--
send
COMMIT
--
connection
node_1_ctrl
--
let
$galera_sync_point
=
apply_monitor_slave_enter_sync
--
source
include
/
galera_signal_sync_point
.
inc
SET
SESSION
debug_sync
=
"now WAIT_FOR reached"
;
--
let
$galera_sync_point
=
local_monitor_slave_enter_sync
--
source
include
/
galera_signal_sync_point
.
inc
--
source
include
/
galera_clear_sync_point
.
inc
SET
SESSION
debug_sync
=
"now SIGNAL continue"
;
--
connection
node_1
--
error
ER_LOCK_DEADLOCK
--
reap
SET
debug_sync
=
"RESET"
;
DROP
TABLE
t1
;
SET
GLOBAL
wsrep_slave_threads
=
1
;
sql/wsrep_high_priority_service.cc
View file @
0a1d31c8
...
...
@@ -598,9 +598,7 @@ Wsrep_replayer_service::~Wsrep_replayer_service()
THD
*
replayer_thd
=
m_thd
;
THD
*
orig_thd
=
m_orig_thd
;
/* Store replay result/state to original thread wsrep client
state and switch execution context back to original. */
orig_thd
->
wsrep_cs
().
after_replay
(
replayer_thd
->
wsrep_trx
());
/* Switch execution context back to original. */
wsrep_after_apply
(
replayer_thd
);
wsrep_after_command_ignore_result
(
replayer_thd
);
wsrep_close
(
replayer_thd
);
...
...
wsrep-lib
@
76f7249b
Subproject commit
90157ed1b0f8b3f0d1eb3d60ac93ce6d8da7ad77
Subproject commit
76f7249b8df209a2a3cefd7d4bbf31f6c72812f1
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