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
bae7c1eb
Commit
bae7c1eb
authored
Sep 28, 2018
by
zdrav1
Committed by
Jan Lindström
Nov 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added galera_autoinc_sst_mariabackup test
parent
de0eeb80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
155 additions
and
0 deletions
+155
-0
mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result
...test/suite/galera/r/galera_autoinc_sst_mariabackup.result
+47
-0
mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
+12
-0
mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
...l-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
+96
-0
No files found.
mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result
0 → 100644
View file @
bae7c1eb
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
CREATE PROCEDURE p1 ()
BEGIN
DECLARE x INT DEFAULT 1;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
WHILE 1 DO
INSERT INTO t1 VALUES (DEFAULT);
COMMIT;
END WHILE;
END|
CALL p1();;
connection node_2;
CALL p1();;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
Killing server ...
INSERT INTO t1 VALUES (DEFAULT);
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
INSERT INTO t1 VALUES (DEFAULT);
connection node_1;
Got one of the listed errors
connection node_2;
Got one of the listed errors
connection node_1a;
connection node_2a;
count_equal
1
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE
2
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
connection node_1a;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE
2
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
DROP PROCEDURE p1;
DROP TABLE t1;
CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
0 → 100644
View file @
bae7c1eb
!include ../galera_2nodes.cnf
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
0 → 100644
View file @
bae7c1eb
#
# Test that autoincrement works correctly while the cluster membership
# is changing and SST takes place.
#
--
source
include
/
big_test
.
inc
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_mariabackup
.
inc
--
connection
node_1
--
let
$connection_id
=
`SELECT CONNECTION_ID()`
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
AUTO_INCREMENT
)
ENGINE
=
InnoDB
;
# Issue an endless stream of autoincrement inserts
DELIMITER
|
;
CREATE
PROCEDURE
p1
()
BEGIN
DECLARE
x
INT
DEFAULT
1
;
DECLARE
CONTINUE
HANDLER
FOR
SQLEXCEPTION
BEGIN
END
;
WHILE
1
DO
INSERT
INTO
t1
VALUES
(
DEFAULT
);
COMMIT
;
END
WHILE
;
END
|
DELIMITER
;
|
--
send
CALL
p1
();
--
sleep
2
--
connection
node_2
--
send
CALL
p1
();
--
sleep
2
# Kill and restart node #2
--
connect
node_2a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_2
--
connection
node_2a
--
source
include
/
kill_galera
.
inc
--
sleep
10
--
source
include
/
start_mysqld
.
inc
--
sleep
25
--
source
include
/
wait_until_connected_again
.
inc
INSERT
INTO
t1
VALUES
(
DEFAULT
);
# Terminate the stored procedure
--
connect
node_1a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_1
--
connection
node_1a
--
disable_query_log
--
eval
KILL
CONNECTION
$connection_id
--
enable_query_log
INSERT
INTO
t1
VALUES
(
DEFAULT
);
--
connection
node_1
# CR_SERVER_LOST
--
error
2013
,
2006
--
reap
--
connection
node_2
# CR_SERVER_LOST
--
error
2013
,
2006
--
reap
--
sleep
10
# Confirm that the count is correct and that the cluster is intact
--
connection
node_1a
--
let
$count
=
`SELECT COUNT(*) FROM t1`
--
connection
node_2a
--
disable_query_log
--
eval
SELECT
COUNT
(
*
)
=
$count
AS
count_equal
FROM
t1
--
enable_query_log
CALL
mtr
.
add_suppression
(
"WSREP: Action message in non-primary configuration from member 0"
);
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
connection
node_1a
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
DROP
PROCEDURE
p1
;
DROP
TABLE
t1
;
CALL
mtr
.
add_suppression
(
"gcs_caused
\\
(
\\
) returned -1
\\
(Operation not permitted
\\
)"
);
CALL
mtr
.
add_suppression
(
"WSREP: Action message in non-primary configuration from member 0"
);
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