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
d74e3a56
Commit
d74e3a56
authored
May 29, 2020
by
Julius Goryavsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'codership-10.4-MDEV-22666-v2' into 10.4
parents
2fbf7514
e04999c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
6 deletions
+71
-6
mysql-test/suite/galera/r/galera_bf_kill.result
mysql-test/suite/galera/r/galera_bf_kill.result
+17
-0
mysql-test/suite/galera/t/galera_bf_kill.test
mysql-test/suite/galera/t/galera_bf_kill.test
+47
-0
mysql-test/suite/galera/t/galera_bf_lock_wait.test
mysql-test/suite/galera/t/galera_bf_lock_wait.test
+1
-0
sql/service_wsrep.cc
sql/service_wsrep.cc
+1
-0
storage/innobase/trx/trx0trx.cc
storage/innobase/trx/trx0trx.cc
+5
-6
No files found.
mysql-test/suite/galera/r/galera_bf_kill.result
View file @
d74e3a56
...
...
@@ -70,3 +70,20 @@ a b
2 1
disconnect node_2a;
drop table t1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
CREATE TABLE t1 (i int primary key);
SET DEBUG_SYNC = "before_wsrep_ordered_commit SIGNAL bwoc_reached WAIT_FOR bwoc_continue";
INSERT INTO t1 VALUES (1);
connection node_2;
SET DEBUG_SYNC = "now WAIT_FOR bwoc_reached";
SET DEBUG_SYNC = "now SIGNAL bwoc_continue";
SET DEBUG_SYNC='RESET';
connection node_2a;
connection node_2;
select * from t1;
i
1
disconnect node_2a;
connection node_2;
drop table t1;
mysql-test/suite/galera/t/galera_bf_kill.test
View file @
d74e3a56
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug
.
inc
--
source
include
/
have_debug_sync
.
inc
#
# Test case 1: Start a transaction on node_2a and kill it
...
...
@@ -140,4 +143,48 @@ select * from t1;
drop
table
t1
;
#
# Test case 7:
# run a transaction in node 2, and set a sync point to pause the transaction
# in commit phase.
# Through another connection to node 2, kill the committing transaction by
# KILL QUERY command
#
--
connect
node_2a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_2
--
connection
node_2a
--
let
$connection_id
=
`SELECT CONNECTION_ID()`
CREATE
TABLE
t1
(
i
int
primary
key
);
# Set up sync point
SET
DEBUG_SYNC
=
"before_wsrep_ordered_commit SIGNAL bwoc_reached WAIT_FOR bwoc_continue"
;
# Send insert which will block in the sync point above
--
send
INSERT
INTO
t1
VALUES
(
1
)
--
connection
node_2
SET
DEBUG_SYNC
=
"now WAIT_FOR bwoc_reached"
;
--
disable_query_log
--
disable_result_log
# victim has passed the point of no return, kill is not possible anymore
--
eval
KILL
QUERY
$connection_id
--
enable_result_log
--
enable_query_log
SET
DEBUG_SYNC
=
"now SIGNAL bwoc_continue"
;
SET
DEBUG_SYNC
=
'RESET'
;
--
connection
node_2a
--
error
0
,
1213
--
reap
--
connection
node_2
# victim was able to complete the INSERT
select
*
from
t1
;
--
disconnect
node_2a
--
connection
node_2
drop
table
t1
;
mysql-test/suite/galera/t/galera_bf_lock_wait.test
View file @
d74e3a56
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
big_test
.
inc
--
connection
node_1
...
...
sql/service_wsrep.cc
View file @
d74e3a56
...
...
@@ -299,6 +299,7 @@ extern "C" void wsrep_commit_ordered(THD *thd)
thd
->
wsrep_trx
().
state
()
==
wsrep
::
transaction
::
s_committing
&&
!
wsrep_commit_will_write_binlog
(
thd
))
{
DEBUG_SYNC
(
thd
,
"before_wsrep_ordered_commit"
);
thd
->
wsrep_cs
().
ordered_commit
();
}
}
storage/innobase/trx/trx0trx.cc
View file @
d74e3a56
...
...
@@ -1511,12 +1511,6 @@ inline void trx_t::commit_in_memory(const mtr_t *mtr)
if
(
fts_trx
)
trx_finalize_for_fts
(
this
,
undo_no
!=
0
);
trx_mutex_enter
(
this
);
dict_operation
=
TRX_DICT_OP_NONE
;
DBUG_LOG
(
"trx"
,
"Commit in memory: "
<<
this
);
state
=
TRX_STATE_NOT_STARTED
;
#ifdef WITH_WSREP
/* Serialization history has been written and the transaction is
committed in memory, which makes this commit ordered. Release commit
...
...
@@ -1528,6 +1522,11 @@ inline void trx_t::commit_in_memory(const mtr_t *mtr)
}
lock
.
was_chosen_as_wsrep_victim
=
false
;
#endif
/* WITH_WSREP */
trx_mutex_enter
(
this
);
dict_operation
=
TRX_DICT_OP_NONE
;
DBUG_LOG
(
"trx"
,
"Commit in memory: "
<<
this
);
state
=
TRX_STATE_NOT_STARTED
;
assert_freed
();
trx_init
(
this
);
...
...
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