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
5ad30e8a
Commit
5ad30e8a
authored
Oct 16, 2015
by
Teemu Ollakka
Committed by
Nirbhay Choubey
Feb 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MTR test for checking correctness of fragmentation over CCs
parent
cf436201
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
0 deletions
+94
-0
mysql-test/suite/galera/r/galera_gcs_fragment.result
mysql-test/suite/galera/r/galera_gcs_fragment.result
+25
-0
mysql-test/suite/galera/t/galera_gcs_fragment.cnf
mysql-test/suite/galera/t/galera_gcs_fragment.cnf
+5
-0
mysql-test/suite/galera/t/galera_gcs_fragment.test
mysql-test/suite/galera/t/galera_gcs_fragment.test
+64
-0
No files found.
mysql-test/suite/galera/r/galera_gcs_fragment.result
0 → 100644
View file @
5ad30e8a
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 TEXT);
SET GLOBAL wsrep_cluster_address='';
SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'dbug=d,gcs_core_after_frag_send';
SET SESSION wsrep_retry_autocommit=0;
INSERT INTO t1 VALUES (1, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_cluster_address = 'gcomm://127.0.0.1:13001';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
SET GLOBAL wsrep_provider_options = 'signal=gcs_core_after_frag_send';
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
INSERT INTO t1 VALUES (3, "cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
SELECT * FROM t1;
f1 f2
2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SELECT * FROM t1;
f1 f2
2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
mysql-test/suite/galera/t/galera_gcs_fragment.cnf
0 → 100644
View file @
5ad30e8a
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=64'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=64'
mysql-test/suite/galera/t/galera_gcs_fragment.test
0 → 100644
View file @
5ad30e8a
# Test fragmentation over configuration changes
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
# Prepare table
CREATE
TABLE
t1
(
f1
INT
PRIMARY
KEY
,
f2
TEXT
);
# Stop node2
# Disconnect node_2 from group
--
connection
node_2
--
let
$wsrep_cluster_address_orig
=
`select @@wsrep_cluster_address`
SET
GLOBAL
wsrep_cluster_address
=
''
;
# Connection for sync points
--
connect
node_1a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_1
SET
SESSION
wsrep_sync_wait
=
0
;
# Set breakpoint in gcs after first fragment send
--
let
$galera_sync_point
=
gcs_core_after_frag_send
--
source
include
/
galera_set_sync_point
.
inc
--
connection
node_1
SET
SESSION
wsrep_retry_autocommit
=
0
;
--
send
INSERT
INTO
t1
VALUES
(
1
,
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
)
--
connection
node_1a
--
source
include
/
galera_wait_sync_point
.
inc
--
source
include
/
galera_clear_sync_point
.
inc
# Restart node_2, wait until it joins the group and then make INSERT
--
connection
node_2
--
eval
SET
GLOBAL
wsrep_cluster_address
=
'$wsrep_cluster_address_orig'
SET
SESSION
wsrep_on
=
0
;
--
source
include
/
galera_wait_ready
.
inc
SET
SESSION
wsrep_on
=
1
;
INSERT
INTO
t1
VALUES
(
2
,
"bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
);
# Signal node_1 to continue
--
connection
node_1a
--
source
include
/
galera_signal_sync_point
.
inc
# Deadlock error should be returned since write set send was
# interrupted by gcs
--
connection
node_1
--
error
ER_LOCK_DEADLOCK
--
reap
# Do additional insert to verify that node_1 remain operational
INSERT
INTO
t1
VALUES
(
3
,
"cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
);
# Nodes node_1 and node_2 should now contain rows 2 and 3
SELECT
*
FROM
t1
;
--
connection
node_2
SELECT
*
FROM
t1
;
--
connection
node_1
DROP
TABLE
t1
;
\ No newline at end of file
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