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
e156ea1b
Commit
e156ea1b
authored
Dec 09, 2016
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests.
parent
55b45796
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
84 deletions
+60
-84
mysql-test/suite/galera/r/galera_split_brain.result
mysql-test/suite/galera/r/galera_split_brain.result
+0
-1
mysql-test/suite/galera/r/galera_var_cluster_address.result
mysql-test/suite/galera/r/galera_var_cluster_address.result
+12
-24
mysql-test/suite/galera/r/galera_var_dirty_reads.result
mysql-test/suite/galera/r/galera_var_dirty_reads.result
+9
-6
mysql-test/suite/galera/suite.pm
mysql-test/suite/galera/suite.pm
+1
-0
mysql-test/suite/galera/t/galera_split_brain.test
mysql-test/suite/galera/t/galera_split_brain.test
+1
-4
mysql-test/suite/galera/t/galera_var_cluster_address.test
mysql-test/suite/galera/t/galera_var_cluster_address.test
+28
-46
mysql-test/suite/galera/t/galera_var_dirty_reads.test
mysql-test/suite/galera/t/galera_var_dirty_reads.test
+9
-3
No files found.
mysql-test/suite/galera/r/galera_split_brain.result
View file @
e156ea1b
...
...
@@ -2,4 +2,3 @@ call mtr.add_suppression("WSREP: TO isolation failed for: ");
Killing server ...
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET GLOBAL wsrep_cluster_address = '';
mysql-test/suite/galera/r/galera_var_cluster_address.result
View file @
e156ea1b
SET GLOBAL wsrep_cluster_address = 'foo://';
SET SESSION wsrep_sync_wait=0;
SELECT
*
FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
SELECT
COUNT(*) > 0
FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
ERROR 08S01: WSREP has not yet prepared node for application use
SHOW STATUS LIKE 'wsrep_ready';
Variable_name Value
...
...
@@ -20,32 +20,20 @@ VARIABLE_VALUE = 1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SET GLOBAL wsrep_cluster_address = 'gcomm://192.0.2.1';
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
ERROR 08S01: WSREP has not yet prepared node for application use
SHOW STATUS LIKE 'wsrep_ready';
Variable_name Value
wsrep_ready OFF
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
SHOW STATUS LIKE 'wsrep_local_state';
Variable_name Value
wsrep_local_state 0
SHOW STATUS LIKE 'wsrep_local_state_comment';
Variable_name Value
wsrep_local_state_comment Initialized
SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
CALL mtr.add_suppression("Backend not supported: foo");
CALL mtr.add_suppression("Failed to initialize backend using 'foo");
CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo");
CALL mtr.add_suppression("gcs connect failed: Socket type not supported");
CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)");
CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110");
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
# End of test
mysql-test/suite/galera/r/galera_var_dirty_reads.result
View file @
e156ea1b
...
...
@@ -18,19 +18,22 @@ SET @@session.wsrep_dirty_reads=ON;
SELECT * FROM t1;
i
1
#
# MDEV-11016: wsrep_node_is_ready() check is too strict
#
SET @@session.wsrep_dirty_reads=OFF;
SELECT 2;
2
2
SELECT @@max_allowed_packet;
@@max_allowed_packet
4194304
SELECT 2+2 from DUAL;
2+2
4
SELECT sysdate() from DUAL;
sysdate()
2016-10-28 23:13:06
SET @VAR=1;
SELECT @VAR;
@VAR
1
SELECT @@max_allowed_packet;
SELECT SYSDATE() from DUAL;
SELECT * FROM t1;
i
1
...
...
mysql-test/suite/galera/suite.pm
View file @
e156ea1b
...
...
@@ -68,6 +68,7 @@ push @::global_suppressions,
qr|WSREP: gcs_caused\(\) returned .*|
,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|
,
qr(WSREP: Action message in non-primary configuration from member [0-9]*)
,
qr(WSREP: discarding established .*)
,
);
...
...
mysql-test/suite/galera/t/galera_split_brain.test
View file @
e156ea1b
...
...
@@ -25,11 +25,8 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
# Reset the master and restart the slave so that post-test checks can run
SET
GLOBAL
wsrep_cluster_address
=
''
;
--
disable_query_log
--
eval
SET
GLOBAL
wsrep_cluster_address
=
'$wsrep_cluster_address_orig'
;
--
enable_query_log
--
connection
node_2
--
source
include
/
start_mysqld
.
inc
--
sleep
5
--
source
include
/
wait_until_connected_again
.
inc
...
...
mysql-test/suite/galera/t/galera_var_cluster_address.test
View file @
e156ea1b
...
...
@@ -5,12 +5,17 @@
--
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
#
# Set to invalid value
#
--
connection
node_
1
--
let
$wsrep_cluster_address_node
1
=
`SELECT @@wsrep_cluster_address`
--
connection
node_
2
--
let
$wsrep_cluster_address_node
2
=
`SELECT @@wsrep_cluster_address`
SET
GLOBAL
wsrep_cluster_address
=
'foo://'
;
# With wsrep_sync_wait, this returns an error
...
...
@@ -20,7 +25,7 @@ SET GLOBAL wsrep_cluster_address = 'foo://';
SET
SESSION
wsrep_sync_wait
=
0
;
--
error
ER_UNKNOWN_COM_ERROR
SELECT
*
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
;
SELECT
COUNT
(
*
)
>
0
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
;
# Must return 'OFF'
SHOW
STATUS
LIKE
'wsrep_ready'
;
...
...
@@ -32,9 +37,9 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
SHOW
STATUS
LIKE
'wsrep_local_state'
;
SHOW
STATUS
LIKE
'wsrep_local_state_comment'
;
--
connection
node_
2
--
connection
node_
1
--
sleep
1
# Node #
2
thinks that it is now part of a single-node primary cluster
# Node #
1
thinks that it is now part of a single-node primary cluster
SELECT
VARIABLE_VALUE
=
1
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
SELECT
VARIABLE_VALUE
=
'Primary'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_status'
;
...
...
@@ -42,54 +47,31 @@ SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VA
# Reset everything as it was
#
--
connection
node_
1
--
connection
node_
2
--
disable_query_log
--
eval
SET
GLOBAL
wsrep_cluster_address
=
'$wsrep_cluster_address_node
1
'
;
--
eval
SET
GLOBAL
wsrep_cluster_address
=
'$wsrep_cluster_address_node
2
'
;
--
enable_query_log
--
connection
node_2
SET
GLOBAL
wsrep_cluster_address
=
@@
wsrep_cluster_address
;
--
source
include
/
wait_until_connected_again
.
inc
--
connection
node_1
SELECT
VARIABLE_VALUE
=
'Primary'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_status'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
#
# Set to invalid host
#
--
connection
node_1
SET
GLOBAL
wsrep_cluster_address
=
'gcomm://192.0.2.1'
;
--
error
ER_UNKNOWN_COM_ERROR
SELECT
*
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
;
# Must return 'OFF'
SHOW
STATUS
LIKE
'wsrep_ready'
;
# Must return 'Non-primary'
SHOW
STATUS
LIKE
'wsrep_cluster_status'
;
# Must return 0 = 'Initialized'
SHOW
STATUS
LIKE
'wsrep_local_state'
;
SHOW
STATUS
LIKE
'wsrep_local_state_comment'
;
#
# Reset everything as it was
#
--
connection
node_1
--
disable_query_log
--
eval
SET
GLOBAL
wsrep_cluster_address
=
'$wsrep_cluster_address_node1'
;
--
enable_query_log
--
connection
node_2
SET
GLOBAL
wsrep_cluster_address
=
@@
wsrep_cluster_address
;
--
sleep
1
--
connection
node_1
SELECT
VARIABLE_VALUE
=
'Primary'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_status'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
CALL
mtr
.
add_suppression
(
"Backend not supported: foo"
);
CALL
mtr
.
add_suppression
(
"Failed to initialize backend using 'foo"
);
CALL
mtr
.
add_suppression
(
"Failed to open channel 'my_wsrep_cluster' at 'foo"
);
CALL
mtr
.
add_suppression
(
"gcs connect failed: Socket type not supported"
);
CALL
mtr
.
add_suppression
(
"wsrep::connect
\\
(
\\
) failed: 7"
);
CALL
mtr
.
add_suppression
(
"gcs_caused
\\
(
\\
) returned -103
\\
(Software caused connection abort
\\
)"
);
CALL
mtr
.
add_suppression
(
"failed to open gcomm backend connection: 110: failed to reach primary view: 110"
);
CALL
mtr
.
add_suppression
(
"Failed to open backend connection: -110
\\
(Connection timed out
\\
)"
);
CALL
mtr
.
add_suppression
(
"gcs connect failed: Connection timed out"
);
CALL
mtr
.
add_suppression
(
"WSREP: wsrep::connect
\\
(foo://
\\
) failed: 7"
);
# Restore original auto_increment_offset values.
--
source
include
/
auto_increment_offset_restore
.
inc
--
source
include
/
galera_end
.
inc
--
echo
# End of test
mysql-test/suite/galera/t/galera_var_dirty_reads.test
View file @
e156ea1b
...
...
@@ -36,12 +36,18 @@ SET @@session.wsrep_dirty_reads=ON;
SELECT
*
FROM
t1
;
#Select query which does not access table should be allowed MDEV-11016
--
echo
#
--
echo
# MDEV-11016: wsrep_node_is_ready() check is too strict
--
echo
#
SET
@@
session
.
wsrep_dirty_reads
=
OFF
;
SELECT
2
;
SELECT
@@
max_allowed_packet
;
SELECT
2
+
2
from
DUAL
;
SELECT
sysdate
()
from
DUAL
;
SET
@
VAR
=
1
;
SELECT
@
VAR
;
--
disable_result_log
SELECT
@@
max_allowed_packet
;
SELECT
SYSDATE
()
from
DUAL
;
--
enable_result_log
--
disable_query_log
--
eval
SET
@@
global
.
wsrep_cluster_address
=
'$wsrep_cluster_address_saved'
...
...
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