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
9e3aa83f
Commit
9e3aa83f
authored
Jan 12, 2021
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-24443 : galera.lp1376747-4 MTR fails: Result length mismatch
Use debug_sync to force FTWRL to pause in correct state.
parent
db9b54f1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
mysql-test/suite/galera/r/lp1376747-4.result
mysql-test/suite/galera/r/lp1376747-4.result
+6
-7
mysql-test/suite/galera/t/lp1376747-4.test
mysql-test/suite/galera/t/lp1376747-4.test
+19
-11
No files found.
mysql-test/suite/galera/r/lp1376747-4.result
View file @
9e3aa83f
...
...
@@ -3,26 +3,23 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
SET session wsrep_sync_wait=0;
SET session wsrep_causal_reads=OFF;
Warnings:
Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead
FLUSH TABLE WITH READ LOCK;
FLUSH TABLES WITH READ LOCK;
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
INSERT INTO t1 VALUES (2,3);
connection node_2a;
SET session wsrep_sync_wait=0;
SET session wsrep_causal_reads=OFF;
Warnings:
Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2';
FLUSH TABLES t1 WITH READ LOCK;;
connection node_2;
SET debug_sync='now WAIT_FOR parked2';
SET debug_sync='now SIGNAL go2';
UNLOCK TABLES;
SHOW CREATE TABLE t1;
Table Create Table
...
...
@@ -30,8 +27,10 @@ t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
set debug_sync= 'RESET';
connection node_2a;
UNLOCK TABLES;
SET SESSION wsrep_sync_wait = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
mysql-test/suite/galera/t/lp1376747-4.test
View file @
9e3aa83f
...
...
@@ -5,7 +5,8 @@
# after provider is unpaused
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug
.
inc
--
source
include
/
have_debug_sync
.
inc
--
let
$galera_connection_name
=
node_2a
--
let
$galera_server_number
=
2
...
...
@@ -17,8 +18,7 @@ INSERT INTO t1 VALUES (1);
--
connection
node_2
SET
session
wsrep_sync_wait
=
0
;
SET
session
wsrep_causal_reads
=
OFF
;
FLUSH
TABLE
WITH
READ
LOCK
;
FLUSH
TABLES
WITH
READ
LOCK
;
--
connection
node_1
ALTER
TABLE
t1
ADD
COLUMN
f2
INTEGER
;
...
...
@@ -26,25 +26,33 @@ INSERT INTO t1 VALUES (2,3);
--
connection
node_2a
SET
session
wsrep_sync_wait
=
0
;
SET
session
wsrep_causal_reads
=
OFF
;
SHOW
CREATE
TABLE
t1
;
SET
debug_sync
=
'flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2'
;
--
send
FLUSH
TABLES
t1
WITH
READ
LOCK
;
--
connection
node_2
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
USER
=
'system user'
AND
STATE
LIKE
'committed%'
;
--
source
include
/
wait_condition
.
inc
SET
debug_sync
=
'now WAIT_FOR parked2'
;
# let the flush table wait in pause state before we unlock
# table otherwise there is window where-in flush table is
# yet to wait in pause and unlock allows alter table to proceed.
# this is because send is asynchronous.
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
Info
LIKE
'FLUSH TABLES t1 WITH READ LOCK'
;
--
let
$wait_condition_on_error_output
=
SHOW
PROCESSLIST
--
source
include
/
wait_condition_with_debug
.
inc
SET
debug_sync
=
'now SIGNAL go2'
;
# this will release existing lock but will not resume
# the cluster as there is new FTRL that is still pausing it.
UNLOCK
TABLES
;
SHOW
CREATE
TABLE
t1
;
set
debug_sync
=
'RESET'
;
--
connection
node_2a
--
reap
UNLOCK
TABLES
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
2
FROM
t1
;
--
source
include
/
wait_condition
.
inc
SET
SESSION
wsrep_sync_wait
=
DEFAULT
;
SHOW
CREATE
TABLE
t1
;
SELECT
*
from
t1
;
...
...
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