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
8b09db8b
Commit
8b09db8b
authored
Aug 24, 2016
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes/improvements in galera test suite
parent
1b7c5ded
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
131 additions
and
78 deletions
+131
-78
mysql-test/suite/galera/include/auto_increment_offset_restore.inc
...st/suite/galera/include/auto_increment_offset_restore.inc
+35
-0
mysql-test/suite/galera/include/auto_increment_offset_save.inc
...-test/suite/galera/include/auto_increment_offset_save.inc
+37
-0
mysql-test/suite/galera/t/galera_ist_restart_joiner.test
mysql-test/suite/galera/t/galera_ist_restart_joiner.test
+6
-10
mysql-test/suite/galera/t/galera_pc_ignore_sb.test
mysql-test/suite/galera/t/galera_pc_ignore_sb.test
+7
-10
mysql-test/suite/galera/t/galera_restart_nochanges.test
mysql-test/suite/galera/t/galera_restart_nochanges.test
+7
-10
mysql-test/suite/galera/t/galera_split_brain.test
mysql-test/suite/galera/t/galera_split_brain.test
+9
-12
mysql-test/suite/galera/t/galera_suspend_slave.test
mysql-test/suite/galera/t/galera_suspend_slave.test
+5
-10
mysql-test/suite/galera/t/galera_var_dirty_reads.test
mysql-test/suite/galera/t/galera_var_dirty_reads.test
+4
-12
mysql-test/suite/galera/t/mysql-wsrep#31.test
mysql-test/suite/galera/t/mysql-wsrep#31.test
+14
-0
mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
...-test/suite/galera_3nodes/t/galera_certification_ccc.test
+7
-14
No files found.
mysql-test/suite/galera/include/auto_increment_offset_restore.inc
0 → 100644
View file @
8b09db8b
# See auto_increment_offset_restore.inc for details.
if
(
!
$node_1
)
{
--
die
ERROR
IN
TEST
:
$node_1
must
be
set
before
sourcing
auto_increment_offset_save
.
inc
}
if
(
!
$node_2
)
{
--
die
ERROR
IN
TEST
:
$node_2
must
be
set
before
sourcing
auto_increment_offset_save
.
inc
}
if
(
!
$auto_increment_offset_node_1
)
{
--
die
ERROR
IN
TEST
:
$auto_increment_offset_node_1
must
be
set
before
sourcing
auto_increment_offset_save
.
inc
}
if
(
!
$auto_increment_offset_node_2
)
{
--
die
ERROR
IN
TEST
:
$auto_increment_offset_node_2
must
be
set
before
sourcing
auto_increment_offset_save
.
inc
}
# Restore original auto_increment_offset values.
--
disable_query_log
--
connection
$node_1
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
connection
$node_2
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
if
(
$node_3
)
{
--
connection
$node_3
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_3
;
}
--
enable_query_log
mysql-test/suite/galera/include/auto_increment_offset_save.inc
0 → 100644
View file @
8b09db8b
# This file can be used to save the @@global.auto_increment_offset value at
# the beginning of any test that intends to restart any of the participating
# nodes. This is required as the node may get auto-assigned a different
# auto_increment_offset value on restart, which could cause MTR's internal
# post-check to fail. auto_increment_offset_restore.inc can be used at the
# end of the test to restore these saved values.
# Parameters
# ----------
# $node_1
# Connection handle for 1st node
# $node_2
# Connection handle for 2nd node
# $node_3 (optional)
# Connection handle for 3rd node
if
(
!
$node_1
)
{
--
die
ERROR
IN
TEST
:
$node_1
must
be
set
before
sourcing
auto_increment_offset_save
.
inc
}
if
(
!
$node_2
)
{
--
die
ERROR
IN
TEST
:
$node_2
must
be
set
before
sourcing
auto_increment_offset_save
.
inc
}
--
connection
$node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
connection
$node_2
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
if
(
$node_3
)
{
--
connection
$node_3
let
$auto_increment_offset_node_3
=
`SELECT @@global.auto_increment_offset`
;
}
mysql-test/suite/galera/t/galera_ist_restart_joiner.test
View file @
8b09db8b
...
@@ -10,10 +10,9 @@
...
@@ -10,10 +10,9 @@
--
source
suite
/
galera
/
include
/
galera_have_debug_sync
.
inc
--
source
suite
/
galera
/
include
/
galera_have_debug_sync
.
inc
# Save original auto_increment_offset values.
# Save original auto_increment_offset values.
--
connection
node_1
--
let
$node_1
=
node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
let
$node_2
=
node_2
--
connection
node_2
--
source
include
/
auto_increment_offset_save
.
inc
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
,
f2
CHAR
(
1
));
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
,
f2
CHAR
(
1
));
INSERT
INTO
t1
VALUES
(
1
,
'a'
),
(
2
,
'a'
),
(
3
,
'a'
),
(
4
,
'a'
),
(
5
,
'a'
),(
6
,
'a'
);
INSERT
INTO
t1
VALUES
(
1
,
'a'
),
(
2
,
'a'
),
(
3
,
'a'
),
(
4
,
'a'
),
(
5
,
'a'
),(
6
,
'a'
);
...
@@ -114,10 +113,7 @@ SELECT COUNT(*) = 0 FROM t3;
...
@@ -114,10 +113,7 @@ SELECT COUNT(*) = 0 FROM t3;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
# Restore original auto_increment_offset values.
# Restore original auto_increment_offset values.
--
disable_query_log
--
source
include
/
auto_increment_offset_restore
.
inc
--
connection
node_1
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
source
include
/
galera_end
.
inc
--
connection
node_2
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
--
enable_query_log
mysql-test/suite/galera/t/galera_pc_ignore_sb.test
View file @
8b09db8b
...
@@ -6,10 +6,9 @@
...
@@ -6,10 +6,9 @@
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
# Save original auto_increment_offset values.
# Save original auto_increment_offset values.
--
connection
node_1
--
let
$node_1
=
node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
let
$node_2
=
node_2
--
connection
node_2
--
source
include
/
auto_increment_offset_save
.
inc
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
--
connection
node_1
--
connection
node_1
--
let
$wsrep_cluster_address_orig
=
`SELECT @@wsrep_cluster_address`
--
let
$wsrep_cluster_address_orig
=
`SELECT @@wsrep_cluster_address`
...
@@ -40,10 +39,8 @@ SET GLOBAL wsrep_cluster_address = '';
...
@@ -40,10 +39,8 @@ SET GLOBAL wsrep_cluster_address = '';
--
source
include
/
start_mysqld
.
inc
--
source
include
/
start_mysqld
.
inc
--
source
include
/
wait_until_connected_again
.
inc
--
source
include
/
wait_until_connected_again
.
inc
--
disable_query_log
# Restore original auto_increment_offset values.
# Restore original auto_increment_offset values.
--
connection
node_1
--
source
include
/
auto_increment_offset_restore
.
inc
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
connection
node_2
--
source
include
/
galera_end
.
inc
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
--
enable_query_log
mysql-test/suite/galera/t/galera_restart_nochanges.test
View file @
8b09db8b
...
@@ -6,10 +6,9 @@
...
@@ -6,10 +6,9 @@
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
# Save original auto_increment_offset values.
# Save original auto_increment_offset values.
--
connection
node_1
--
let
$node_1
=
node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
let
$node_2
=
node_2
--
connection
node_2
--
source
include
/
auto_increment_offset_save
.
inc
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
--
connection
node_1
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
...
@@ -33,11 +32,9 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
...
@@ -33,11 +32,9 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
disable_query_log
# Restore original auto_increment_offset values.
# Restore original auto_increment_offset values.
--
connection
node_1
--
let
$node_2
=
node_2a
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
source
include
/
auto_increment_offset_restore
.
inc
--
connection
node_2a
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
--
source
include
/
galera_end
.
inc
--
enable_query_log
mysql-test/suite/galera/t/galera_split_brain.test
View file @
8b09db8b
...
@@ -6,17 +6,16 @@
...
@@ -6,17 +6,16 @@
--
source
include
/
galera_cluster
.
inc
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
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
call
mtr
.
add_suppression
(
"WSREP: TO isolation failed for: "
);
call
mtr
.
add_suppression
(
"WSREP: TO isolation failed for: "
);
--
connection
node_1
--
connection
node_1
--
let
$wsrep_cluster_address_orig
=
`SELECT @@wsrep_cluster_address`
--
let
$wsrep_cluster_address_orig
=
`SELECT @@wsrep_cluster_address`
# Save original auto_increment_offset values.
--
connection
node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
connection
node_2
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
--
connection
node_2
--
connection
node_2
--
source
include
/
kill_galera
.
inc
--
source
include
/
kill_galera
.
inc
...
@@ -44,10 +43,8 @@ SET GLOBAL wsrep_cluster_address = '';
...
@@ -44,10 +43,8 @@ SET GLOBAL wsrep_cluster_address = '';
--
source
include
/
wait_until_connected_again
.
inc
--
source
include
/
wait_until_connected_again
.
inc
# Restore original auto_increment_offset values.
# Restore original auto_increment_offset values.
--
disable_query_log
--
let
$node_2
=
node_2a
--
connection
node_1
--
source
include
/
auto_increment_offset_restore
.
inc
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
connection
node_2a
--
source
include
/
galera_end
.
inc
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
--
enable_query_log
mysql-test/suite/galera/t/galera_suspend_slave.test
View file @
8b09db8b
...
@@ -8,10 +8,9 @@
...
@@ -8,10 +8,9 @@
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
# Save original auto_increment_offset values.
# Save original auto_increment_offset values.
--
connection
node_1
--
let
$node_1
=
node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
let
$node_2
=
node_2
--
connection
node_2
--
source
include
/
auto_increment_offset_save
.
inc
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
--
connection
node_1
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
...
@@ -56,11 +55,7 @@ SELECT COUNT(*) = 1 FROM t1;
...
@@ -56,11 +55,7 @@ SELECT COUNT(*) = 1 FROM t1;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
disable_query_log
# Restore original auto_increment_offset values.
# Restore original auto_increment_offset values.
--
connection
node_1
--
let
$node_2
=
node_2a
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
source
include
/
auto_increment_offset_restore
.
inc
--
connection
node_2a
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
--
enable_query_log
mysql-test/suite/galera/t/galera_var_dirty_reads.test
View file @
8b09db8b
...
@@ -5,13 +5,10 @@
...
@@ -5,13 +5,10 @@
--
source
include
/
galera_cluster
.
inc
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
--
disable_query_log
# Save original auto_increment_offset values.
# Save original auto_increment_offset values.
--
connection
node_1
--
let
$node_1
=
node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
let
$node_2
=
node_2
--
connection
node_2
--
source
include
/
auto_increment_offset_save
.
inc
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
--
enable_query_log
--
connection
node_2
--
connection
node_2
--
let
$wsrep_cluster_address_saved
=
`SELECT @@global.wsrep_cluster_address`
--
let
$wsrep_cluster_address_saved
=
`SELECT @@global.wsrep_cluster_address`
...
@@ -49,13 +46,8 @@ SELECT * FROM t1;
...
@@ -49,13 +46,8 @@ SELECT * FROM t1;
# Cleanup
# Cleanup
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
disable_query_log
# Restore original auto_increment_offset values.
# Restore original auto_increment_offset values.
--
connection
node_1
--
source
include
/
auto_increment_offset_restore
.
inc
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
connection
node_2
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
--
enable_query_log
--
source
include
/
galera_end
.
inc
--
source
include
/
galera_end
.
inc
--
echo
# End of test
--
echo
# End of test
...
...
mysql-test/suite/galera/t/mysql-wsrep#31.test
View file @
8b09db8b
--
source
include
/
galera_cluster
.
inc
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
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
--
connection
node_1
CREATE
TABLE
t1
(
f1
CHAR
(
255
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t1
(
f1
CHAR
(
255
))
ENGINE
=
InnoDB
;
...
@@ -36,4 +41,13 @@ if ($galera_wsrep_start_position != $expected_position)
...
@@ -36,4 +41,13 @@ if ($galera_wsrep_start_position != $expected_position)
DROP
TABLE
t1
;
DROP
TABLE
t1
;
DROP
DATABASE
db
;
DROP
DATABASE
db
;
--
connect
node_2a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_2
--
source
include
/
wait_until_connected_again
.
inc
# Restore original auto_increment_offset values.
--
let
$node_2
=
node_2a
--
source
include
/
auto_increment_offset_restore
.
inc
--
source
include
/
galera_end
.
inc
mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
View file @
8b09db8b
...
@@ -10,12 +10,10 @@
...
@@ -10,12 +10,10 @@
--
source
include
/
galera_connect
.
inc
--
source
include
/
galera_connect
.
inc
# Save original auto_increment_offset values.
# Save original auto_increment_offset values.
--
connection
node_1
--
let
$node_1
=
node_1
let
$auto_increment_offset_node_1
=
`SELECT @@global.auto_increment_offset`
;
--
let
$node_2
=
node_2
--
connection
node_2
--
let
$node_3
=
node_3
let
$auto_increment_offset_node_2
=
`SELECT @@global.auto_increment_offset`
;
--
source
../
galera
/
include
/
auto_increment_offset_save
.
inc
--
connection
node_3
let
$auto_increment_offset_node_3
=
`SELECT @@global.auto_increment_offset`
;
--
connection
node_1
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
...
@@ -49,12 +47,7 @@ SELECT COUNT(*) = 2 FROM t1;
...
@@ -49,12 +47,7 @@ SELECT COUNT(*) = 2 FROM t1;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
# Restore original auto_increment_offset values.
# Restore original auto_increment_offset values.
--
disable_query_log
--
source
../
galera
/
include
/
auto_increment_offset_restore
.
inc
--
connection
node_1
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_1
;
--
source
include
/
galera_end
.
inc
--
connection
node_2
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_2
;
--
connection
node_3
--
eval
SET
@@
global
.
auto_increment_offset
=
$auto_increment_offset_node_3
;
--
enable_query_log
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