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
5a002adb
Commit
5a002adb
authored
Jun 26, 2015
by
Philip Stoev
Committed by
Nirbhay Choubey
Sep 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Galera MTR Tests: various tests and test fixes
parent
f1a00ed5
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
379 additions
and
5 deletions
+379
-5
mysql-test/std_data/galera-upgrade-ca-cert.pem
mysql-test/std_data/galera-upgrade-ca-cert.pem
+40
-0
mysql-test/std_data/galera-upgrade-server-cert.pem
mysql-test/std_data/galera-upgrade-server-cert.pem
+20
-0
mysql-test/std_data/galera-upgrade-server-key.pem
mysql-test/std_data/galera-upgrade-server-key.pem
+28
-0
mysql-test/suite/galera/r/galera_gcs_fc_limit.result
mysql-test/suite/galera/r/galera_gcs_fc_limit.result
+0
-3
mysql-test/suite/galera/r/galera_prepared_statement.result
mysql-test/suite/galera/r/galera_prepared_statement.result
+33
-0
mysql-test/suite/galera/r/galera_ssl_upgrade.result
mysql-test/suite/galera/r/galera_ssl_upgrade.result
+24
-0
mysql-test/suite/galera/r/galera_status_local_index.result
mysql-test/suite/galera/r/galera_status_local_index.result
+13
-0
mysql-test/suite/galera/r/galera_var_node_address.result
mysql-test/suite/galera/r/galera_var_node_address.result
+9
-0
mysql-test/suite/galera/r/lp1438990.result
mysql-test/suite/galera/r/lp1438990.result
+21
-0
mysql-test/suite/galera/t/galera_gcs_fc_limit.test
mysql-test/suite/galera/t/galera_gcs_fc_limit.test
+3
-2
mysql-test/suite/galera/t/galera_prepared_statement.test
mysql-test/suite/galera/t/galera_prepared_statement.test
+44
-0
mysql-test/suite/galera/t/galera_ssl_upgrade.cnf
mysql-test/suite/galera/t/galera_ssl_upgrade.cnf
+7
-0
mysql-test/suite/galera/t/galera_ssl_upgrade.test
mysql-test/suite/galera/t/galera_ssl_upgrade.test
+46
-0
mysql-test/suite/galera/t/galera_status_local_index.test
mysql-test/suite/galera/t/galera_status_local_index.test
+21
-0
mysql-test/suite/galera/t/galera_var_node_address.cnf
mysql-test/suite/galera/t/galera_var_node_address.cnf
+10
-0
mysql-test/suite/galera/t/galera_var_node_address.test
mysql-test/suite/galera/t/galera_var_node_address.test
+22
-0
mysql-test/suite/galera/t/lp1438990.test
mysql-test/suite/galera/t/lp1438990.test
+38
-0
No files found.
mysql-test/std_data/galera-upgrade-ca-cert.pem
0 → 100644
View file @
5a002adb
-----BEGIN CERTIFICATE-----
MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
B3lcoKXXJgMnWw0WGrt0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SngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
-----END CERTIFICATE-----
mysql-test/std_data/galera-upgrade-server-cert.pem
0 → 100644
View file @
5a002adb
-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwNjI2MD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S6z4tcGGx43aHqzzNBZdnQnqhYL1CvlLwhkgX6oQCo
woXqyfMNKJkCgYEA63gD1NGPwWkcVBSlQxpDup8JeZE0Fux6++kUP+u0Y39LqLuH
7IXtHBkAvY9JXv8HPvHQWw/og2/97VNQFFQYhqPiRgBfIX9bPpx8c4l6YQISI8GL
G4CsglgZ7hK2/LJ8PAascWnD3xYJVqyaPNFMB90VCaW/Qx+2IKAKTaHtfskCgYBu
1f5C4pMqrCpeTXj4Cvis1wE4PwB5QnnH7SrakOVl/N4huLn8O2948lEa8Zwbd4UP
ffR1Gwh4iuzBjQQhpZBt30/QFBphv5RnVy7uzLMfsfF0hEqBFdcoubMGXqGnSzTN
nhfLO9thQJxTzFnH0xzr0FTDOAYH/h0g/eZ8r0JmuQKBgQDjhXM+hJ3Pkwua+Fnl
nZfY5MeSzkJki/9iwVo8rSDwmZS9Nsc83oZnddM7c2x63t+zYOAcMxsVCiByMDzo
5IB781HWRBGcU8TnW1b0bAnZimjKp/qsZ/Szr38rvImqG8TjzbcSD7w0SpyRQ/Ot
A7SZFkWYfem8/q/VImjU/CNbOQ==
-----END PRIVATE KEY-----
mysql-test/suite/galera/r/galera_gcs_fc_limit.result
View file @
5a002adb
...
...
@@ -6,9 +6,6 @@ INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'query end' AND INFO = 'INSERT INTO t1 VALUES (5)';
COUNT(*) = 1
1
UNLOCK TABLES;
INSERT INTO t1 VALUES (6);
SELECT COUNT(*) = 6 FROM t1;
...
...
mysql-test/suite/galera/r/galera_prepared_statement.result
0 → 100644
View file @
5a002adb
CREATE TABLE t1 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t2 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t3 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t4 (f1 CHAR(5)) ENGINE=InnoDB;
SET SESSION sql_mode='STRICT_ALL_TABLES';
PREPARE st1 FROM 'INSERT INTO t1 VALUES ("abc")';
PREPARE st2 FROM 'INSERT INTO t2 VALUES ("abc")';
PREPARE st3 FROM 'INSERT INTO t3 VALUES ("abc")';
PREPARE st4 FROM 'INSERT INTO t4 VALUES ("abc")';
EXECUTE st1;
EXECUTE st2;
EXECUTE st3;
EXECUTE st4;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t3;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t4;
COUNT(*) = 1
1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
ALTER TABLE t1 DROP COLUMN f1;
EXECUTE st1;
ERROR HY000: Incorrect integer value: 'abc' for column 'f2' at row 1
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
mysql-test/suite/galera/r/galera_ssl_upgrade.result
0 → 100644
View file @
5a002adb
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
mysql-test/suite/galera/r/galera_status_local_index.result
0 → 100644
View file @
5a002adb
CREATE TABLE wsrep_local_indexes (wsrep_local_index INTEGER);
INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index'));
INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index'));
SELECT COUNT(*) = 2 FROM wsrep_local_indexes;
COUNT(*) = 2
1
SELECT COUNT(DISTINCT wsrep_local_index) = 2 FROM wsrep_local_indexes;
COUNT(DISTINCT wsrep_local_index) = 2
1
SELECT COUNT(*) = 0 FROM wsrep_local_indexes WHERE wsrep_local_index NOT IN (0, 1);
COUNT(*) = 0
1
DROP TABLE wsrep_local_indexes;
mysql-test/suite/galera/r/galera_var_node_address.result
0 → 100644
View file @
5a002adb
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
mysql-test/suite/galera/r/lp1438990.result
0 → 100644
View file @
5a002adb
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t3 (f1 INTEGER PRIMARY KEY);
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CALL p1(NEW.f1);
CREATE PROCEDURE p1 (IN x INT)
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK TO event_logging;
INSERT t3 VALUES (x);
END;
SAVEPOINT event_logging;
INSERT INTO t2 VALUES (x);
RELEASE SAVEPOINT event_logging;
END|
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
DROP PROCEDURE p1;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
mysql-test/suite/galera/t/galera_gcs_fc_limit.test
View file @
5a002adb
...
...
@@ -24,13 +24,14 @@ INSERT INTO t1 VALUES (4);
# This query will hang because flow control will kick in
--
send
INSERT
INTO
t1
VALUES
(
5
);
--
sleep
1
--
sleep
2
--
let
$galera_connection_name
=
node_1a
--
let
$galera_server_number
=
1
--
source
include
/
galera_connect
.
inc
--
connection
node_1a
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
STATE
=
'query end'
AND
INFO
=
'INSERT INTO t1 VALUES (5)'
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
STATE
=
'query end'
AND
INFO
=
'INSERT INTO t1 VALUES (5)'
;
--
source
include
/
wait_condition
.
inc
--
connection
node_2
# Unblock the slave applier thread
...
...
mysql-test/suite/galera/t/galera_prepared_statement.test
0 → 100644
View file @
5a002adb
#
# A simple test for PREPARE / EXECUTE -style prepared statements with Galera
#
# C-API-level prepared-statements can not be triggered from inside mysqltest, however
# can be exercised when running an MTR test suite with the --ps-protocol switch.
#
--
source
include
/
galera_cluster
.
inc
CREATE
TABLE
t1
(
f1
CHAR
(
5
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
f1
CHAR
(
5
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t3
(
f1
CHAR
(
5
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t4
(
f1
CHAR
(
5
))
ENGINE
=
InnoDB
;
SET
SESSION
sql_mode
=
'STRICT_ALL_TABLES'
;
PREPARE
st1
FROM
'INSERT INTO t1 VALUES ("abc")'
;
PREPARE
st2
FROM
'INSERT INTO t2 VALUES ("abc")'
;
PREPARE
st3
FROM
'INSERT INTO t3 VALUES ("abc")'
;
PREPARE
st4
FROM
'INSERT INTO t4 VALUES ("abc")'
;
EXECUTE
st1
;
EXECUTE
st2
;
EXECUTE
st3
;
EXECUTE
st4
;
--
connection
node_2
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
SELECT
COUNT
(
*
)
=
1
FROM
t2
;
SELECT
COUNT
(
*
)
=
1
FROM
t3
;
SELECT
COUNT
(
*
)
=
1
FROM
t4
;
ALTER
TABLE
t1
ADD
COLUMN
f2
INTEGER
;
ALTER
TABLE
t1
DROP
COLUMN
f1
;
--
connection
node_1
--
error
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
EXECUTE
st1
;
--
connection
node_1
DROP
TABLE
t1
;
DROP
TABLE
t2
;
DROP
TABLE
t3
;
DROP
TABLE
t4
;
mysql-test/suite/galera/t/galera_ssl_upgrade.cnf
0 → 100644
View file @
5a002adb
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
mysql-test/suite/galera/t/galera_ssl_upgrade.test
0 → 100644
View file @
5a002adb
#
# Test upgrading the SSL certificates in a rolling fashion.
#
# 1. The starting state with the old key and cert is is described in galera_ssl_upgrade.cnf
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
SELECT
VARIABLE_VALUE
=
'Synced'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_state_comment'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
# 2. Restart node #1 with a socket.ssl_ca that includes both the new and the old certificate
--
connection
node_1
--
source
include
/
shutdown_mysqld
.
inc
--
let
$start_mysqld_params
=
--
wsrep
-
cluster
-
address
=
gcomm
://
127.0
.
0.1
:
$NODE_GALERAPORT_2
--
wsrep_provider_options
=
base_port
=
$NODE_GALERAPORT_1
;
socket
.
ssl
=
yes
;
socket
.
ssl_ca
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
upgrade
-
ca
-
cert
.
pem
;
socket
.
ssl_cert
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
cert
.
pem
;
socket
.
ssl_key
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
key
.
pem
--
source
include
/
start_mysqld
.
inc
--
source
include
/
wait_until_connected_again
.
inc
SELECT
VARIABLE_VALUE
=
'Synced'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_state_comment'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
# 3. Restart node #2 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key
--
connection
node_2
--
source
include
/
shutdown_mysqld
.
inc
--
let
$start_mysqld_params
=
--
wsrep_provider_options
=
base_port
=
$NODE_GALERAPORT_2
;
socket
.
ssl
=
yes
;
socket
.
ssl_ca
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
upgrade
-
ca
-
cert
.
pem
;
socket
.
ssl_cert
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
upgrade
-
server
-
cert
.
pem
;
socket
.
ssl_key
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
upgrade
-
server
-
key
.
pem
--
source
include
/
start_mysqld
.
inc
--
source
include
/
wait_until_connected_again
.
inc
SELECT
VARIABLE_VALUE
=
'Synced'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_state_comment'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
# 4. Restart node #1 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key
--
connection
node_1
--
source
include
/
shutdown_mysqld
.
inc
--
let
$start_mysqld_params
=
--
wsrep
-
cluster
-
address
=
gcomm
://
127.0
.
0.1
:
$NODE_GALERAPORT_2
--
wsrep_provider_options
=
base_port
=
$NODE_GALERAPORT_1
;
socket
.
ssl
=
yes
;
socket
.
ssl_ca
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
upgrade
-
ca
-
cert
.
pem
;
socket
.
ssl_cert
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
upgrade
-
server
-
cert
.
pem
;
socket
.
ssl_key
=
$MYSQL_TEST_DIR
/
std_data
/
galera
-
upgrade
-
server
-
key
.
pem
--
source
include
/
start_mysqld
.
inc
--
source
include
/
wait_until_connected_again
.
inc
SELECT
VARIABLE_VALUE
=
'Synced'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_local_state_comment'
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
# Upgrade complete. Both nodes now use the new key and certificate
mysql-test/suite/galera/t/galera_status_local_index.test
0 → 100644
View file @
5a002adb
#
# Test that a two-node cluster has distinct values for wsrep_local_index for its nodes
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
connection
node_1
CREATE
TABLE
wsrep_local_indexes
(
wsrep_local_index
INTEGER
);
INSERT
INTO
wsrep_local_indexes
VALUES
((
SELECT
variable_value
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
variable_name
=
'wsrep_local_index'
));
--
connection
node_2
INSERT
INTO
wsrep_local_indexes
VALUES
((
SELECT
variable_value
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
variable_name
=
'wsrep_local_index'
));
--
connection
node_1
SELECT
COUNT
(
*
)
=
2
FROM
wsrep_local_indexes
;
SELECT
COUNT
(
DISTINCT
wsrep_local_index
)
=
2
FROM
wsrep_local_indexes
;
SELECT
COUNT
(
*
)
=
0
FROM
wsrep_local_indexes
WHERE
wsrep_local_index
NOT
IN
(
0
,
1
);
DROP
TABLE
wsrep_local_indexes
;
mysql-test/suite/galera/t/galera_var_node_address.cnf
0 → 100644
View file @
5a002adb
!include ../galera_4nodes.cnf
[mysqld.2]
wsrep_node_address=127.0.0.1
[mysqld.3]
wsrep_node_address=localhost
[mysqld.4]
wsrep_node_address=lo
mysql-test/suite/galera/t/galera_var_node_address.test
0 → 100644
View file @
5a002adb
#
# Test wsrep_node_address . The galera_var_node_address.cnf contains various settings for
# wsrep_node_address, so in this test we simply confirm that the cluster has started up correctly.
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
SELECT
VARIABLE_VALUE
=
4
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
);
--
connection
node_2
INSERT
INTO
t1
VALUES
(
1
);
--
connect
node_3
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_3
--
connection
node_3
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
--
connection
node_1
DROP
TABLE
t1
;
mysql-test/suite/galera/t/lp1438990.test
0 → 100644
View file @
5a002adb
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
);
CREATE
TABLE
t2
(
f1
INTEGER
PRIMARY
KEY
);
CREATE
TABLE
t3
(
f1
INTEGER
PRIMARY
KEY
);
CREATE
TRIGGER
tr1
AFTER
INSERT
ON
t1
FOR
EACH
ROW
CALL
p1
(
NEW
.
f1
);
DELIMITER
|
;
CREATE
PROCEDURE
p1
(
IN
x
INT
)
BEGIN
DECLARE
EXIT
HANDLER
FOR
SQLEXCEPTION
BEGIN
ROLLBACK
TO
event_logging
;
INSERT
t3
VALUES
(
x
);
END
;
SAVEPOINT
event_logging
;
INSERT
INTO
t2
VALUES
(
x
);
RELEASE
SAVEPOINT
event_logging
;
END
|
DELIMITER
;
|
INSERT
INTO
t2
VALUES
(
1
);
INSERT
INTO
t1
VALUES
(
1
);
DROP
PROCEDURE
p1
;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
DROP
TABLE
t3
;
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