Skip to content

Commit 3b1b665

Browse files
committed
Merge branch '10.2' into 10.3
2 parents a4ab66c + 3fb6d25 commit 3b1b665

13 files changed

+410
-168
lines changed

debian/autobake-deb.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ EOF
124124
sed -i -e "/-DPLUGIN_AWS_KEY_MANAGEMENT=NO/d" debian/rules
125125
fi
126126

127+
# Don't build cassandra package if thrift is not installed
128+
if [[ ! -f /usr/local/include/thrift/Thrift.h && ! -f /usr/include/thrift/Thrift.h ]]
129+
then
130+
sed '/Package: mariadb-plugin-cassandra/,/^$/d' -i debian/control
131+
fi
132+
127133
# Mroonga, TokuDB never built on Travis CI anyway, see build flags above
128134
if [[ $TRAVIS ]]
129135
then

debian/rules

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ override_dh_auto_install:
114114
dh_testdir
115115
dh_testroot
116116

117-
# If libthrift-dev was available (manually installed, as it is
118-
# not in Debian) and ha_cassandra.so was thus built, create package,
119-
# otherwise skip it.
120-
[ -f $(BUILDDIR)/storage/cassandra/ha_cassandra.so ] || sed -i -e "/Package: mariadb-plugin-cassandra/,+20d" debian/control
121-
122117
ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS)))
123118
# Copy systemd files to a location available for dh_installinit
124119
cp $(BUILDDIR)/support-files/mariadb.service debian/mariadb-server-10.3.mariadb.service

mysql-test/main/openssl_1.result

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,54 @@ drop table if exists t1;
44
create table t1(f1 int);
55
insert into t1 values (5);
66
grant select on test.* to ssl_user1@localhost require SSL;
7-
grant select on test.* to ssl_user2@localhost require cipher "AES256-SHA";
8-
grant select on test.* to ssl_user3@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
9-
grant select on test.* to ssl_user4@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
10-
grant select on test.* to ssl_user5@localhost require cipher "AES256-SHA" AND SUBJECT "xxx";
7+
grant select on test.* to ssl_user3@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
8+
grant select on test.* to ssl_user4@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
9+
grant select on test.* to ssl_user5@localhost require SUBJECT "xxx";
1110
flush privileges;
12-
connect con1,localhost,ssl_user1,,,,,SSL-CIPHER=AES256-SHA;
13-
connect(localhost,ssl_user2,,test,MASTER_PORT,MASTER_SOCKET);
14-
connect con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES128-SHA;
15-
ERROR 28000: Access denied for user 'ssl_user2'@'localhost' (using password: NO)
16-
connect con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES256-SHA;
17-
connect con3,localhost,ssl_user3,,,,,SSL-CIPHER=AES256-SHA;
18-
connect con4,localhost,ssl_user4,,,,,SSL-CIPHER=AES256-SHA;
11+
connect con1,localhost,ssl_user1,,,,,SSL;
12+
connect con3,localhost,ssl_user3,,,,,SSL;
13+
connect con4,localhost,ssl_user4,,,,,SSL;
1914
connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
20-
connect con5,localhost,ssl_user5,,,,,SSL-CIPHER=AES256-SHA;
15+
connect con5,localhost,ssl_user5,,,,,SSL;
2116
ERROR 28000: Access denied for user 'ssl_user5'@'localhost' (using password: NO)
2217
connection con1;
23-
SHOW STATUS LIKE 'Ssl_cipher';
24-
Variable_name Value
25-
Ssl_cipher AES256-SHA
18+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
19+
have_ssl
20+
1
2621
select * from t1;
2722
f1
2823
5
2924
delete from t1;
3025
ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 't1'
31-
connection con2;
32-
SHOW STATUS LIKE 'Ssl_cipher';
33-
Variable_name Value
34-
Ssl_cipher AES256-SHA
35-
select * from t1;
36-
f1
37-
5
38-
delete from t1;
39-
ERROR 42000: DELETE command denied to user 'ssl_user2'@'localhost' for table 't1'
4026
connection con3;
41-
SHOW STATUS LIKE 'Ssl_cipher';
42-
Variable_name Value
43-
Ssl_cipher AES256-SHA
27+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
28+
have_ssl
29+
1
4430
select * from t1;
4531
f1
4632
5
4733
delete from t1;
4834
ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 't1'
4935
connection con4;
50-
SHOW STATUS LIKE 'Ssl_cipher';
51-
Variable_name Value
52-
Ssl_cipher AES256-SHA
36+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
37+
have_ssl
38+
1
5339
select * from t1;
5440
f1
5541
5
5642
delete from t1;
5743
ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1'
5844
connection default;
5945
disconnect con1;
60-
disconnect con2;
6146
disconnect con3;
6247
disconnect con4;
63-
drop user ssl_user1@localhost, ssl_user2@localhost,
64-
ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
48+
drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
6549
drop table t1;
6650
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
6751
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
6852
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
6953
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
7054
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
71-
SHOW STATUS LIKE 'Ssl_cipher';
72-
Variable_name Value
73-
Ssl_cipher AES256-SHA
7455
have_ssl
7556
1
7657
End of 5.0 tests
@@ -94,13 +75,7 @@ SSL_ACCEPTS #
9475
SSL_CALLBACK_CACHE_HITS #
9576
DROP TABLE thread_status;
9677
SET GLOBAL event_scheduler=0;
97-
SHOW STATUS LIKE 'Ssl_cipher';
98-
Variable_name Value
99-
Ssl_cipher AES128-SHA
100-
SHOW STATUS LIKE 'Ssl_cipher';
101-
Variable_name Value
102-
Ssl_cipher AES128-SHA
103-
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxxCREATE TABLE t1(a int);
78+
CREATE TABLE t1(a int);
10479
INSERT INTO t1 VALUES (1), (2);
10580

10681
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
@@ -204,19 +179,12 @@ UNLOCK TABLES;
204179
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
205180
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
206181

207-
mysqldump: Got error: 2026: SSL connection error: xxxx
182+
mysqldump: Got error: 2026: "SSL connection error: xxxx
208183
DROP TABLE t1;
209-
Variable_name Value
210-
Ssl_cipher AES256-SHA
211-
Variable_name Value
212-
Ssl_cipher AES128-SHA
213-
select 'is still running; no cipher request crashed the server' as result from dual;
214-
result
215-
is still running; no cipher request crashed the server
216184
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
217185
FLUSH PRIVILEGES;
218186
connect con1,localhost,bug42158,,,,,SSL;
219-
SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
187+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
220188
have_ssl
221189
1
222190
disconnect con1;

mysql-test/main/openssl_1.test

Lines changed: 14 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -19,58 +19,45 @@ create table t1(f1 int);
1919
insert into t1 values (5);
2020

2121
grant select on test.* to ssl_user1@localhost require SSL;
22-
grant select on test.* to ssl_user2@localhost require cipher "AES256-SHA";
23-
grant select on test.* to ssl_user3@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
24-
grant select on test.* to ssl_user4@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
25-
grant select on test.* to ssl_user5@localhost require cipher "AES256-SHA" AND SUBJECT "xxx";
22+
grant select on test.* to ssl_user3@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
23+
grant select on test.* to ssl_user4@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
24+
grant select on test.* to ssl_user5@localhost require SUBJECT "xxx";
2625
flush privileges;
2726

28-
connect (con1,localhost,ssl_user1,,,,,SSL-CIPHER=AES256-SHA);
27+
connect (con1,localhost,ssl_user1,,,,,SSL);
2928
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
30-
--error ER_ACCESS_DENIED_ERROR
31-
connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES128-SHA);
32-
connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES256-SHA);
33-
connect (con3,localhost,ssl_user3,,,,,SSL-CIPHER=AES256-SHA);
34-
connect (con4,localhost,ssl_user4,,,,,SSL-CIPHER=AES256-SHA);
29+
connect (con3,localhost,ssl_user3,,,,,SSL);
30+
connect (con4,localhost,ssl_user4,,,,,SSL);
3531
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
3632
--error ER_ACCESS_DENIED_ERROR
37-
connect (con5,localhost,ssl_user5,,,,,SSL-CIPHER=AES256-SHA);
33+
connect (con5,localhost,ssl_user5,,,,,SSL);
3834

3935
connection con1;
4036
# Check ssl turned on
41-
SHOW STATUS LIKE 'Ssl_cipher';
42-
select * from t1;
43-
--error ER_TABLEACCESS_DENIED_ERROR
44-
delete from t1;
45-
46-
connection con2;
47-
# Check ssl turned on
48-
SHOW STATUS LIKE 'Ssl_cipher';
37+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
4938
select * from t1;
5039
--error ER_TABLEACCESS_DENIED_ERROR
5140
delete from t1;
5241

5342
connection con3;
5443
# Check ssl turned on
55-
SHOW STATUS LIKE 'Ssl_cipher';
44+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
5645
select * from t1;
5746
--error ER_TABLEACCESS_DENIED_ERROR
5847
delete from t1;
5948

6049
connection con4;
6150
# Check ssl turned on
62-
SHOW STATUS LIKE 'Ssl_cipher';
51+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
6352
select * from t1;
6453
--error ER_TABLEACCESS_DENIED_ERROR
6554
delete from t1;
6655

6756
connection default;
6857
disconnect con1;
69-
disconnect con2;
7058
disconnect con3;
7159
disconnect con4;
72-
drop user ssl_user1@localhost, ssl_user2@localhost,
73-
ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
60+
drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
7461

7562
drop table t1;
7663

@@ -123,22 +110,14 @@ drop table t1;
123110
--exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
124111
--echo
125112

126-
#
127-
# Bug#21611 Slave can't connect when master-ssl-cipher specified
128-
# - Apparently selecting a cipher doesn't work at all
129-
# - Use a cipher that both yaSSL and OpenSSL supports
130-
#
131-
--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
132-
--exec $MYSQL_TEST --ssl-cipher=AES256-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
133-
134113
#
135114
# Bug#25309 SSL connections without CA certificate broken since MySQL 5.0.23
136115
#
137116
# Test that we can open encrypted connection to server without
138117
# verification of servers certificate by setting both ca certificate
139118
# and ca path to NULL
140119
#
141-
--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1
120+
--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1
142121
--echo End of 5.0 tests
143122

144123
#
@@ -179,25 +158,6 @@ SELECT variable_name, variable_value FROM thread_status;
179158
DROP TABLE thread_status;
180159
SET GLOBAL event_scheduler=0;
181160

182-
#
183-
# Test to connect using a list of ciphers
184-
#
185-
--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
186-
--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER:AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
187-
188-
189-
# Test to connect using a specifi cipher
190-
#
191-
--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
192-
--exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
193-
194-
# Test to connect using an unknown cipher
195-
#
196-
--exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit" > $MYSQLTEST_VARDIR/tmp/test.sql
197-
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
198-
--error 1
199-
--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
200-
201161
#
202162
# Bug#27669 mysqldump: SSL connection error when trying to connect
203163
#
@@ -214,44 +174,21 @@ INSERT INTO t1 VALUES (1), (2);
214174

215175
# With wrong parameters
216176
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR mysqldump.exe mysqldump
217-
--replace_regex /\"SSL connection error.*/SSL connection error: xxxx/
177+
--replace_regex /SSL connection error.*/SSL connection error: xxxx/
218178
--error 2
219179
--exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
220180
--echo
221181
DROP TABLE t1;
222182
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql
223183

224-
#
225-
# Bug#39172 Asking for DH+non-RSA key with server set to use other key caused
226-
# YaSSL to crash the server.
227-
#
228-
229-
# Common ciphers to openssl and yassl
230-
--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES256-SHA
231-
--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES128-SHA
232-
--disable_query_log
233-
--disable_result_log
234-
235-
# Below here caused crashes. ################
236-
--error 1,0
237-
--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl-cipher';" --ssl-cipher=NOT----EXIST
238-
# These probably exist but the server's keys can't be used to accept these kinds of connections.
239-
--error 1,0
240-
--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl-cipher';" --ssl-cipher=AES128-RMD
241-
242-
# If this gives a result, then the bug is fixed.
243-
--enable_result_log
244-
--enable_query_log
245-
select 'is still running; no cipher request crashed the server' as result from dual;
246-
247184
#
248185
# Bug#42158: leak: SSL_get_peer_certificate() doesn't have matching X509_free()
249186
#
250187

251188
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
252189
FLUSH PRIVILEGES;
253190
connect(con1,localhost,bug42158,,,,,SSL);
254-
SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
191+
SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
255192
disconnect con1;
256193
connection default;
257194
DROP USER bug42158@localhost;

mysql-test/main/ssl.result

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,8 +2175,3 @@ still connected?
21752175
still connected?
21762176
connection default;
21772177
disconnect ssl_con;
2178-
create user mysqltest_1@localhost;
2179-
grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
2180-
Variable_name Value
2181-
Ssl_cipher AES256-SHA
2182-
drop user mysqltest_1@localhost;

mysql-test/main/ssl.test

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,5 @@ select 'still connected?';
3232
connection default;
3333
disconnect ssl_con;
3434

35-
create user mysqltest_1@localhost;
36-
grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
37-
--exec $MYSQL -umysqltest_1 --ssl-cipher=AES256-SHA -e "show status like 'ssl_cipher'" 2>&1
38-
drop user mysqltest_1@localhost;
39-
4035
# Wait till all disconnects are completed
4136
--source include/wait_until_count_sessions.inc

mysql-test/main/ssl_cert_verify.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ let $ssl_verify_pass_path = --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-veri
3030
--enable_reconnect
3131
--source include/wait_until_connected_again.inc
3232

33-
--replace_result TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION
33+
--replace_result TLSv1.3 TLS_VERSION TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION
3434
--exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'"
3535

3636
--echo # restart server using restart

mysql-test/main/ssl_cipher-master.opt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)