Skip to content

Commit 3ea49d3

Browse files
committed
Merge 10.1 into 10.2
2 parents ab7e2b0 + 2a2ab12 commit 3ea49d3

25 files changed

+307
-78
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,15 @@ IF (WITH_ASAN)
211211
ENDIF()
212212
ENDIF()
213213

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

cmake/os/Linux.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ENDFOREACH()
3535
# Ensure we have clean build for shared libraries
3636
# without unresolved symbols
3737
# Not supported with AddressSanitizer
38-
IF(NOT WITH_ASAN)
38+
IF(NOT WITH_ASAN AND NOT WITH_UBSAN)
3939
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
4040
ENDIF()
4141

cmake/plugin.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)
212+
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT WITH_ASAN 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
@@ -26,8 +26,10 @@ galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid
2626
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
2727
galera_binlog_stmt_autoinc : MDEV-13549 auto_increment mismatch
2828
galera_flush : MariaDB does not have global.thread_statistics
29+
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
2930
galera_gcs_fc_limit : MDEV-17061 Timeout in wait_condition.inc for PROCESSLIST
30-
galera_ist_progress: MDEV-15236 galera_ist_progress fails when trying to read transfer status
31+
galera_ist_mariabackup : MDEV-18829 test leaves port open
32+
galera_ist_progress: MDEV-15236 fails when trying to read transfer status
3133
galera_kill_applier : race condition at the start of the test
3234
galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl
3335
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
--connection node_1
@@ -29,22 +28,19 @@ END|
2928
DELIMITER ;|
3029

3130
--send CALL p1();
32-
--sleep 2
31+
--sleep 1
3332

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

3837
# Kill and restart node #2
3938

4039
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
4140
--connection node_2a
4241
--source include/kill_galera.inc
4342

44-
--sleep 10
4543
--source include/start_mysqld.inc
46-
--sleep 25
47-
--source include/wait_until_connected_again.inc
4844

4945
INSERT INTO t1 VALUES (DEFAULT);
5046

@@ -68,8 +64,6 @@ INSERT INTO t1 VALUES (DEFAULT);
6864
--error 2013,2006
6965
--reap
7066

71-
--sleep 10
72-
7367
# Confirm that the count is correct and that the cluster is intact
7468

7569
--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)