mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.6 into 10.7
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
# be overcome. In normal cases one should fix the bug server/test case or in
|
# be overcome. In normal cases one should fix the bug server/test case or in
|
||||||
# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
|
# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
|
||||||
|
|
||||||
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value="ASAN"`)
|
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "ASAN%"`)
|
||||||
{
|
{
|
||||||
--skip Can't be run with ASan
|
--skip Can't be run with ASan
|
||||||
}
|
}
|
||||||
|
6
mysql-test/include/not_msan.inc
Normal file
6
mysql-test/include/not_msan.inc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# This file should only be used with tests that are too big or slow for MSAN.
|
||||||
|
|
||||||
|
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`)
|
||||||
|
{
|
||||||
|
--skip Can't be run WITH_MSAN
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
# be overcome. In normal cases one should fix the bug server/test case or in
|
# be overcome. In normal cases one should fix the bug server/test case or in
|
||||||
# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
|
# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
|
||||||
|
|
||||||
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value="UBSAN"`)
|
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value LIKE "%UBSAN"`)
|
||||||
{
|
{
|
||||||
--skip Can't be run with UBSAN
|
--skip Can't be run with UBSAN
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,9 @@ if ($rpl_debug)
|
|||||||
|
|
||||||
# Send shutdown to the connected server and give
|
# Send shutdown to the connected server and give
|
||||||
# it 60 seconds (of mysqltest's default) to die before zapping it
|
# it 60 seconds (of mysqltest's default) to die before zapping it
|
||||||
shutdown_server;
|
let $rpl_shutdown_timeout= `select 60*(1+9*count(*)) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`;
|
||||||
|
|
||||||
|
shutdown_server $rpl_shutdown_timeout;
|
||||||
|
|
||||||
--source include/wait_until_disconnected.inc
|
--source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
# Test will take more than one hour with valgrind
|
# Test will take more than one hour with valgrind
|
||||||
--source include/not_valgrind.inc
|
--source include/not_valgrind.inc
|
||||||
|
--source include/not_msan.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_sequence.inc
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
--let $mysqlbinlog_output= tmp/mysqlbinlog_big_1.out
|
--let $mysqlbinlog_output= tmp/mysqlbinlog_big_1.out
|
||||||
|
|
||||||
--source include/have_binlog_format_row.inc
|
--source include/have_binlog_format_row.inc
|
||||||
|
|
||||||
--source include/have_log_bin.inc
|
--source include/have_log_bin.inc
|
||||||
|
|
||||||
# This is a big test.
|
# This is a big test.
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
--source include/not_msan.inc
|
||||||
# Test needs more than 4G of memory
|
# Test needs more than 4G of memory
|
||||||
--source include/have_64bit.inc
|
--source include/have_64bit.inc
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
# This test is too slow for valgrind
|
# This test is too slow for valgrind
|
||||||
--source include/not_valgrind.inc
|
--source include/not_valgrind.inc
|
||||||
|
--source include/not_msan.inc
|
||||||
|
|
||||||
drop table if exists t1,t2;
|
drop table if exists t1,t2;
|
||||||
|
|
||||||
|
@ -710,8 +710,8 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
|
|||||||
|
|
||||||
/* wsrep-lib */
|
/* wsrep-lib */
|
||||||
m_wsrep_next_trx_id(WSREP_UNDEFINED_TRX_ID),
|
m_wsrep_next_trx_id(WSREP_UNDEFINED_TRX_ID),
|
||||||
m_wsrep_mutex(LOCK_thd_data),
|
m_wsrep_mutex(&LOCK_thd_data),
|
||||||
m_wsrep_cond(COND_wsrep_thd),
|
m_wsrep_cond(&COND_wsrep_thd),
|
||||||
m_wsrep_client_service(this, m_wsrep_client_state),
|
m_wsrep_client_service(this, m_wsrep_client_state),
|
||||||
m_wsrep_client_state(this,
|
m_wsrep_client_state(this,
|
||||||
m_wsrep_mutex,
|
m_wsrep_mutex,
|
||||||
|
@ -5130,13 +5130,19 @@ static Sys_var_have Sys_have_symlink(
|
|||||||
"--skip-symbolic-links option.",
|
"--skip-symbolic-links option.",
|
||||||
READ_ONLY GLOBAL_VAR(have_symlink), NO_CMD_LINE);
|
READ_ONLY GLOBAL_VAR(have_symlink), NO_CMD_LINE);
|
||||||
|
|
||||||
#if defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN)
|
#if defined __SANITIZE_ADDRESS__ || defined WITH_UBSAN || __has_feature(memory_sanitizer)
|
||||||
|
|
||||||
#ifdef __SANITIZE_ADDRESS__
|
# ifdef __SANITIZE_ADDRESS__
|
||||||
#define SANITIZER_MODE "ASAN"
|
# ifdef WITH_UBSAN
|
||||||
#else
|
# define SANITIZER_MODE "ASAN+UBSAN"
|
||||||
#define SANITIZER_MODE "UBSAN"
|
# else
|
||||||
#endif /* __SANITIZE_ADDRESS__ */
|
# define SANITIZER_MODE "ASAN"
|
||||||
|
# endif
|
||||||
|
# elif defined WITH_UBSAN
|
||||||
|
# define SANITIZER_MODE "UBSAN"
|
||||||
|
# else
|
||||||
|
# define SANITIZER_MODE "MSAN"
|
||||||
|
# endif
|
||||||
|
|
||||||
static char *have_sanitizer;
|
static char *have_sanitizer;
|
||||||
static Sys_var_charptr Sys_have_santitizer(
|
static Sys_var_charptr Sys_have_santitizer(
|
||||||
|
@ -26,7 +26,7 @@ class Wsrep_condition_variable : public wsrep::condition_variable
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Wsrep_condition_variable(mysql_cond_t& cond)
|
Wsrep_condition_variable(mysql_cond_t* cond)
|
||||||
: m_cond(cond)
|
: m_cond(cond)
|
||||||
{ }
|
{ }
|
||||||
~Wsrep_condition_variable()
|
~Wsrep_condition_variable()
|
||||||
@ -34,21 +34,21 @@ public:
|
|||||||
|
|
||||||
void notify_one()
|
void notify_one()
|
||||||
{
|
{
|
||||||
mysql_cond_signal(&m_cond);
|
mysql_cond_signal(m_cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
void notify_all()
|
void notify_all()
|
||||||
{
|
{
|
||||||
mysql_cond_broadcast(&m_cond);
|
mysql_cond_broadcast(m_cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wait(wsrep::unique_lock<wsrep::mutex>& lock)
|
void wait(wsrep::unique_lock<wsrep::mutex>& lock)
|
||||||
{
|
{
|
||||||
mysql_mutex_t* mutex= static_cast<mysql_mutex_t*>(lock.mutex()->native());
|
mysql_mutex_t* mutex= static_cast<mysql_mutex_t*>(lock.mutex()->native());
|
||||||
mysql_cond_wait(&m_cond, mutex);
|
mysql_cond_wait(m_cond, mutex);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
mysql_cond_t& m_cond;
|
mysql_cond_t* m_cond;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* WSREP_CONDITION_VARIABLE_H */
|
#endif /* WSREP_CONDITION_VARIABLE_H */
|
||||||
|
@ -25,26 +25,26 @@
|
|||||||
class Wsrep_mutex : public wsrep::mutex
|
class Wsrep_mutex : public wsrep::mutex
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Wsrep_mutex(mysql_mutex_t& mutex)
|
Wsrep_mutex(mysql_mutex_t* mutex)
|
||||||
: m_mutex(mutex)
|
: m_mutex(mutex)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void lock()
|
void lock()
|
||||||
{
|
{
|
||||||
mysql_mutex_lock(&m_mutex);
|
mysql_mutex_lock(m_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unlock()
|
void unlock()
|
||||||
{
|
{
|
||||||
mysql_mutex_unlock(&m_mutex);
|
mysql_mutex_unlock(m_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* native()
|
void* native()
|
||||||
{
|
{
|
||||||
return &m_mutex;
|
return m_mutex;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
mysql_mutex_t& m_mutex;
|
mysql_mutex_t* m_mutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* WSREP_MUTEX_H */
|
#endif /* WSREP_MUTEX_H */
|
||||||
|
@ -43,8 +43,8 @@ Wsrep_server_state::Wsrep_server_state(const std::string& name,
|
|||||||
initial_position,
|
initial_position,
|
||||||
max_protocol_version,
|
max_protocol_version,
|
||||||
wsrep::server_state::rm_sync)
|
wsrep::server_state::rm_sync)
|
||||||
, m_mutex(LOCK_wsrep_server_state)
|
, m_mutex(&LOCK_wsrep_server_state)
|
||||||
, m_cond(COND_wsrep_server_state)
|
, m_cond(&COND_wsrep_server_state)
|
||||||
, m_service(*this)
|
, m_service(*this)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2012, Facebook Inc.
|
Copyright (c) 2012, Facebook Inc.
|
||||||
Copyright (c) 2013, 2021, MariaDB Corporation.
|
Copyright (c) 2013, 2022, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -1203,6 +1203,8 @@ inline bool dict_index_t::reconstruct_fields()
|
|||||||
{
|
{
|
||||||
DBUG_ASSERT(is_primary());
|
DBUG_ASSERT(is_primary());
|
||||||
|
|
||||||
|
const auto old_n_fields = n_fields;
|
||||||
|
|
||||||
n_fields = (n_fields + table->instant->n_dropped)
|
n_fields = (n_fields + table->instant->n_dropped)
|
||||||
& dict_index_t::MAX_N_FIELDS;
|
& dict_index_t::MAX_N_FIELDS;
|
||||||
n_def = (n_def + table->instant->n_dropped)
|
n_def = (n_def + table->instant->n_dropped)
|
||||||
@ -1230,11 +1232,11 @@ inline bool dict_index_t::reconstruct_fields()
|
|||||||
} else {
|
} else {
|
||||||
DBUG_ASSERT(!c.is_not_null());
|
DBUG_ASSERT(!c.is_not_null());
|
||||||
const auto old = std::find_if(
|
const auto old = std::find_if(
|
||||||
fields + n_first, fields + n_fields,
|
fields + n_first, fields + old_n_fields,
|
||||||
[c](const dict_field_t& o)
|
[c](const dict_field_t& o)
|
||||||
{ return o.col->ind == c.ind(); });
|
{ return o.col->ind == c.ind(); });
|
||||||
|
|
||||||
if (old >= fields + n_fields
|
if (old >= fields + old_n_fields
|
||||||
|| old->prefix_len
|
|| old->prefix_len
|
||||||
|| old->col != &table->cols[c.ind()]) {
|
|| old->col != &table->cols[c.ind()]) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2019, 2021, MariaDB Corporation.
|
Copyright (c) 2019, 2022, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -119,6 +119,16 @@ struct page_zip_des_t
|
|||||||
- reinterpret_cast<char*>(this));
|
- reinterpret_cast<char*>(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
page_zip_des_t() = default;
|
||||||
|
page_zip_des_t(const page_zip_des_t&) = default;
|
||||||
|
|
||||||
|
/* Initialize everything except the member "fix". */
|
||||||
|
page_zip_des_t(const page_zip_des_t& old, bool) {
|
||||||
|
memcpy((void*) this, (void*) &old,
|
||||||
|
reinterpret_cast<char*>(&fix)
|
||||||
|
- reinterpret_cast<char*>(this));
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend buf_pool_t;
|
friend buf_pool_t;
|
||||||
friend buf_page_t;
|
friend buf_page_t;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2012, Facebook Inc.
|
Copyright (c) 2012, Facebook Inc.
|
||||||
Copyright (c) 2014, 2021, MariaDB Corporation.
|
Copyright (c) 2014, 2022, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -4562,7 +4562,7 @@ page_zip_copy_recs(
|
|||||||
to the compressed data page. */
|
to the compressed data page. */
|
||||||
{
|
{
|
||||||
page_zip_t* data = page_zip->data;
|
page_zip_t* data = page_zip->data;
|
||||||
new (page_zip) page_zip_des_t(*src_zip);
|
new (page_zip) page_zip_des_t(*src_zip, false);
|
||||||
page_zip->data = data;
|
page_zip->data = data;
|
||||||
}
|
}
|
||||||
ut_ad(page_zip_get_trailer_len(page_zip, dict_index_is_clust(index))
|
ut_ad(page_zip_get_trailer_len(page_zip, dict_index_is_clust(index))
|
||||||
|
Reference in New Issue
Block a user