Skip to content

Commit 814205f

Browse files
committed
Merge 10.2 into 10.3
2 parents 89b463e + 28e713d commit 814205f

33 files changed

+428
-212
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ IF (WITH_TSAN)
213213
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=thread" DEBUG RELWITHDEBINFO)
214214
ENDIF()
215215

216+
OPTION(WITH_UBSAN "Enable undefined behavior sanitizer" OFF)
217+
IF (WITH_UBSAN)
218+
IF(SECURITY_HARDENED)
219+
MESSAGE(FATAL_ERROR "WITH_UBSAN and SECURITY_HARDENED are mutually exclusive")
220+
ENDIF()
221+
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=undefined" DEBUG RELWITHDEBINFO)
222+
ENDIF()
223+
216224
IF(NOT WITH_TSAN)
217225
# enable security hardening features, like most distributions do
218226
# in our benchmarks that costs about ~1% of performance, depending on the load

cmake/os/Linux.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ ENDFOREACH()
3434

3535
# Ensure we have clean build for shared libraries
3636
# without unresolved symbols
37-
# Not supported with AddressSanitizer and ThreadSanitizer
38-
IF(NOT WITH_ASAN AND NOT WITH_TSAN)
37+
# Not supported with the clang sanitizers
38+
IF(NOT WITH_ASAN AND NOT WITH_TSAN AND NOT WITH_UBSAN)
3939
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
4040
ENDIF()
4141

cmake/plugin.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2009, 2018, Oracle and/or its affiliates.
2-
# Copyright (c) 2011, 2018, MariaDB Corporation
2+
# Copyright (c) 2011, 2019, MariaDB Corporation
33
#
44
# This program is free software; you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -209,7 +209,7 @@ MACRO(MYSQL_ADD_PLUGIN)
209209
ELSEIF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
210210
TARGET_LINK_LIBRARIES (${target} mysqld)
211211
ENDIF()
212-
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT WITH_ASAN AND NOT WITH_TSAN)
212+
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT WITH_ASAN AND NOT WITH_TSAN AND NOT WITH_UBSAN)
213213
TARGET_LINK_LIBRARIES (${target} "-Wl,--no-undefined")
214214
ENDIF()
215215

mysql-test/suite/galera/disabled.def

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
2525
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
2626
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
2727
galera_flush : MariaDB does not have global.thread_statistics
28+
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
2829
galera_gcs_fc_limit : MDEV-17061 Timeout in wait_condition.inc for PROCESSLIST
29-
galera_ist_progress: MDEV-15236 galera_ist_progress fails when trying to read transfer status
30+
galera_ist_mariabackup : MDEV-18829 test leaves port open
31+
galera_ist_progress: MDEV-15236 fails when trying to read transfer status
3032
galera_kill_applier : race condition at the start of the test
3133
galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl
3234
galera_migrate : MariaDB does not support START SLAVE USER

mysql-test/suite/galera/r/galera_kill_nochanges.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
connection node_1;
2+
connection node_2;
3+
connection node_1;
24
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
35
INSERT INTO t1 VALUES (1);
46
connection node_2;

mysql-test/suite/galera/r/galera_many_rows.result

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
connection node_1;
2+
connection node_2;
3+
connection node_1;
24
SET SESSION innodb_lock_wait_timeout=600;
35
SET SESSION lock_wait_timeout=600;
4-
CREATE TABLE ten (f1 INTEGER);
6+
CREATE TABLE ten (f1 INTEGER) engine=InnoDB;
57
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
68
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
79
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
810
connection node_2;
911
SET SESSION wsrep_sync_wait = 0;
1012
SET SESSION wsrep_sync_wait = 15;
1113
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
12-
SELECT COUNT(*) = 100000 FROM t1;
13-
COUNT(*) = 100000
14-
1
14+
SELECT COUNT(*) FROM t1;
15+
COUNT(*)
16+
100000
1517
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
1618
connection node_1;
17-
SELECT COUNT(*) = 200000 FROM t1;
18-
COUNT(*) = 200000
19-
1
19+
SELECT COUNT(*) FROM t1;
20+
COUNT(*)
21+
200000
2022
UPDATE t1 SET f2 = 1;
2123
connection node_2;
22-
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
23-
COUNT(*) = 200000
24-
1
24+
SELECT COUNT(*) FROM t1 WHERE f2 = 1;
25+
COUNT(*)
26+
200000
2527
connection node_1;
2628
START TRANSACTION;
27-
SELECT COUNT(*) = 200000 FROM t1;
28-
COUNT(*) = 200000
29-
1
29+
SELECT COUNT(*) FROM t1;
30+
COUNT(*)
31+
200000
3032
UPDATE t1 SET f2 = 3;
3133
connection node_2;
3234
START TRANSACTION;

mysql-test/suite/galera/r/galera_var_dirty_reads.result

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
connection node_1;
22
connection node_2;
3-
connection node_1;
4-
connection node_2;
53
connection node_2;
64
CREATE TABLE t1(i INT) ENGINE=INNODB;
75
INSERT INTO t1 VALUES(1);

mysql-test/suite/galera/r/galera_var_notify_cmd.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
connection node_1;
12
SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
23
COUNT(DISTINCT uuid) = 2
34
1

mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
--source include/big_test.inc
77
--source include/galera_cluster.inc
8-
--source include/have_innodb.inc
98
--source include/have_mariabackup.inc
109

1110
--let $node_1=node_1
@@ -33,22 +32,19 @@ END|
3332
DELIMITER ;|
3433

3534
--send CALL p1();
36-
--sleep 2
35+
--sleep 1
3736

3837
--connection node_2
3938
--send CALL p1();
40-
--sleep 2
39+
--sleep 1
4140

4241
# Kill and restart node #2
4342

4443
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
4544
--connection node_2a
4645
--source include/kill_galera.inc
4746

48-
--sleep 10
4947
--source include/start_mysqld.inc
50-
--sleep 25
51-
--source include/wait_until_connected_again.inc
5248

5349
INSERT INTO t1 VALUES (DEFAULT);
5450

@@ -72,8 +68,6 @@ INSERT INTO t1 VALUES (DEFAULT);
7268
--error 2013,2006
7369
--reap
7470

75-
--sleep 10
76-
7771
# Confirm that the count is correct and that the cluster is intact
7872

7973
--connection node_1a

mysql-test/suite/galera/t/galera_kill_nochanges.test

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
#
44

55
--source include/galera_cluster.inc
6-
--source include/have_innodb.inc
6+
7+
# Save original auto_increment_offset values.
8+
--let $node_1=node_1
9+
--let $node_2=node_2
10+
--source include/auto_increment_offset_save.inc
711

812
--connection node_1
913
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
@@ -29,4 +33,7 @@ SET SESSION wsrep_sync_wait = DEFAULT;
2933
SELECT COUNT(*) = 1 FROM t1;
3034
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
3135

36+
--let $node_2=node_2a
37+
--source include/auto_increment_offset_restore.inc
38+
3239
DROP TABLE t1;

0 commit comments

Comments
 (0)