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
74abc32d
Commit
74abc32d
authored
Apr 30, 2018
by
Jan Lindström
Committed by
GitHub
Apr 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #731 from codership/MDEV-15803
MDEV-15803 Fix and re-enable test galera_var_auto_inc_control_on
parents
89a7ad63
cf333b7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
30 deletions
+18
-30
mysql-test/suite/galera/disabled.def
mysql-test/suite/galera/disabled.def
+0
-1
mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
...test/suite/galera/r/galera_var_auto_inc_control_on.result
+2
-16
mysql-test/suite/galera/t/galera_var_auto_inc_control_on.test
...l-test/suite/galera/t/galera_var_auto_inc_control_on.test
+16
-13
No files found.
mysql-test/suite/galera/disabled.def
View file @
74abc32d
...
...
@@ -26,5 +26,4 @@ galera_gcache_recover_manytrx : MDEV-13549 Galera test failures
galera_ssl_upgrade : MDEV-13549 Galera test failures
galera.MW-329 : wsrep_local_replays not stable
galera.MW-328A : have_deadlocks test not stable
galera_var_auto_inc_control_on : MDEV-15803 Test failure on galera.galera_var_auto_inc_control_on
query_cache : MDEV-15805 Test failure on galera.query_cache
mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
View file @
74abc32d
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, node VARCHAR(10)) ENGINE=InnoDB;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE
2
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index';
VARIABLE_VALUE
0
SELECT @@auto_increment_increment = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size');
@@auto_increment_increment = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size')
1
SELECT @@global.auto_increment_offset = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index') + 1;
@@global.auto_increment_offset = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index') + 1
auto_increment_offset_differ
1
INSERT INTO t1 VALUES (DEFAULT, 'node1');;
INSERT INTO t1 VALUES (DEFAULT, 'node2');;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE
2
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index';
VARIABLE_VALUE
1
SELECT @@auto_increment_increment = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size');
@@auto_increment_increment = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size')
1
SELECT @@global.auto_increment_offset = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index') + 1;
@@global.auto_increment_offset = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index') + 1
auto_increment_offset_differ
1
INSERT INTO t1 VALUES (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2'), (DEFAULT, 'node2');;
INSERT INTO t1 VALUES (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1'), (DEFAULT, 'node1');;
...
...
mysql-test/suite/galera/t/galera_var_auto_inc_control_on.test
View file @
74abc32d
...
...
@@ -5,24 +5,21 @@
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
include
/
auto_increment_offset_save
.
inc
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
AUTO_INCREMENT
PRIMARY
KEY
,
node
VARCHAR
(
10
))
ENGINE
=
InnoDB
;
--
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
# auto_increment_increment is equal to the number of nodes
# auto_increment_offset is equal to the ID of the node
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_index'
;
SELECT
@@
auto_increment_increment
=
(
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
);
SELECT
@@
global
.
auto_increment_offset
=
(
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_index'
)
+
1
;
--
connection
node_2
--
disable_query_log
--
eval
SELECT
@@
global
.
auto_increment_offset
!=
$auto_increment_offset_node_1
AS
auto_increment_offset_differ
;
--
enable_query_log
# Expect no conflicts
--
connection
node_1
--
send
INSERT
INTO
t1
VALUES
(
DEFAULT
,
'node1'
);
--
connection
node_2
...
...
@@ -34,12 +31,18 @@ SELECT @@global.auto_increment_offset = (SELECT VARIABLE_VALUE FROM INFORMATION_
--
connection
node_2
--
reap
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_index'
;
--
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
# auto_increment_increment is equal to the number of nodes
SELECT
@@
auto_increment_increment
=
(
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
);
SELECT
@@
global
.
auto_increment_offset
=
(
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_index'
)
+
1
;
--
connection
node_1
--
disable_query_log
--
eval
SELECT
@@
global
.
auto_increment_offset
!=
$auto_increment_offset_node_2
AS
auto_increment_offset_differ
;
--
enable_query_log
# Expect no conflicts
--
connection
node_2
--
send
INSERT
INTO
t1
VALUES
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
),
(
DEFAULT
,
'node2'
);
--
connection
node_1
...
...
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