Skip to content

Commit 01bb003

Browse files
committed
Merge 10.6 into 10.7
2 parents 5070845 + 164a6aa commit 01bb003

File tree

15 files changed

+59
-31
lines changed

15 files changed

+59
-31
lines changed

mysql-test/include/not_asan.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# be overcome. In normal cases one should fix the bug server/test case or in
33
# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
44

5-
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value="ASAN"`)
5+
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "ASAN%"`)
66
{
77
--skip Can't be run with ASan
88
}

mysql-test/include/not_msan.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file should only be used with tests that are too big or slow for MSAN.
2+
3+
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`)
4+
{
5+
--skip Can't be run WITH_MSAN
6+
}

mysql-test/include/not_ubsan.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# be overcome. In normal cases one should fix the bug server/test case or in
33
# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
44

5-
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value="UBSAN"`)
5+
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value LIKE "%UBSAN"`)
66
{
77
--skip Can't be run with UBSAN
88
}

mysql-test/include/rpl_stop_server.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ if ($rpl_debug)
4848

4949
# Send shutdown to the connected server and give
5050
# it 60 seconds (of mysqltest's default) to die before zapping it
51-
shutdown_server;
51+
let $rpl_shutdown_timeout= `select 60*(1+9*count(*)) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`;
52+
53+
shutdown_server $rpl_shutdown_timeout;
5254

5355
--source include/wait_until_disconnected.inc
5456

mysql-test/main/sum_distinct-big.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
--source include/big_test.inc
66
# Test will take more than one hour with valgrind
77
--source include/not_valgrind.inc
8+
--source include/not_msan.inc
89
--source include/have_innodb.inc
910
--source include/have_sequence.inc
1011

mysql-test/suite/binlog/t/flashback-largebinlog.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
--let $mysqlbinlog_output= tmp/mysqlbinlog_big_1.out
1111

1212
--source include/have_binlog_format_row.inc
13-
1413
--source include/have_log_bin.inc
1514

1615
# This is a big test.
1716
--source include/big_test.inc
17+
--source include/not_msan.inc
1818
# Test needs more than 4G of memory
1919
--source include/have_64bit.inc
2020

mysql-test/suite/maria/max_length.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
--source include/big_test.inc
77
# This test is too slow for valgrind
88
--source include/not_valgrind.inc
9+
--source include/not_msan.inc
910

1011
drop table if exists t1,t2;
1112

sql/sql_class.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,8 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
710710

711711
/* wsrep-lib */
712712
m_wsrep_next_trx_id(WSREP_UNDEFINED_TRX_ID),
713-
m_wsrep_mutex(LOCK_thd_data),
714-
m_wsrep_cond(COND_wsrep_thd),
713+
m_wsrep_mutex(&LOCK_thd_data),
714+
m_wsrep_cond(&COND_wsrep_thd),
715715
m_wsrep_client_service(this, m_wsrep_client_state),
716716
m_wsrep_client_state(this,
717717
m_wsrep_mutex,

sql/sys_vars.cc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5130,13 +5130,19 @@ static Sys_var_have Sys_have_symlink(
51305130
"--skip-symbolic-links option.",
51315131
READ_ONLY GLOBAL_VAR(have_symlink), NO_CMD_LINE);
51325132

5133-
#if defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN)
5134-
5135-
#ifdef __SANITIZE_ADDRESS__
5136-
#define SANITIZER_MODE "ASAN"
5137-
#else
5138-
#define SANITIZER_MODE "UBSAN"
5139-
#endif /* __SANITIZE_ADDRESS__ */
5133+
#if defined __SANITIZE_ADDRESS__ || defined WITH_UBSAN || __has_feature(memory_sanitizer)
5134+
5135+
# ifdef __SANITIZE_ADDRESS__
5136+
# ifdef WITH_UBSAN
5137+
# define SANITIZER_MODE "ASAN+UBSAN"
5138+
# else
5139+
# define SANITIZER_MODE "ASAN"
5140+
# endif
5141+
# elif defined WITH_UBSAN
5142+
# define SANITIZER_MODE "UBSAN"
5143+
# else
5144+
# define SANITIZER_MODE "MSAN"
5145+
# endif
51405146

51415147
static char *have_sanitizer;
51425148
static Sys_var_charptr Sys_have_santitizer(

sql/wsrep_condition_variable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,29 @@ class Wsrep_condition_variable : public wsrep::condition_variable
2626
{
2727
public:
2828

29-
Wsrep_condition_variable(mysql_cond_t& cond)
29+
Wsrep_condition_variable(mysql_cond_t* cond)
3030
: m_cond(cond)
3131
{ }
3232
~Wsrep_condition_variable()
3333
{ }
3434

3535
void notify_one()
3636
{
37-
mysql_cond_signal(&m_cond);
37+
mysql_cond_signal(m_cond);
3838
}
3939

4040
void notify_all()
4141
{
42-
mysql_cond_broadcast(&m_cond);
42+
mysql_cond_broadcast(m_cond);
4343
}
4444

4545
void wait(wsrep::unique_lock<wsrep::mutex>& lock)
4646
{
4747
mysql_mutex_t* mutex= static_cast<mysql_mutex_t*>(lock.mutex()->native());
48-
mysql_cond_wait(&m_cond, mutex);
48+
mysql_cond_wait(m_cond, mutex);
4949
}
5050
private:
51-
mysql_cond_t& m_cond;
51+
mysql_cond_t* m_cond;
5252
};
5353

5454
#endif /* WSREP_CONDITION_VARIABLE_H */

0 commit comments

Comments
 (0)