Skip to content

Commit 86595e2

Browse files
authored
Merge pull request #5572 from inikep/PS-9395-8.0-percona-202404
PS-9395 [8.0]: Merge RocksDB tags: percona-202401 to percona-202404 from fb-mysql-8.0.32
2 parents de0daf6 + bd50712 commit 86595e2

File tree

224 files changed

+7124
-2327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+7124
-2327
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -278,30 +278,16 @@ jobs:
278278
CompilerVer: 8
279279
BuildType: Debug
280280

281-
${{ if or(ne(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.SourceBranchName'], 'fullci')) }}:
282-
clang-7 RelWithDebInfo [Ubuntu 20.04 Focal]:
283-
imageName: 'ubuntu-20.04'
284-
Compiler: clang
285-
CompilerVer: 7
286-
BuildType: RelWithDebInfo
287-
288-
${{ if or(ne(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.SourceBranchName'], 'fullci')) }}:
289-
clang-7 Debug [Ubuntu 20.04 Focal]:
290-
imageName: 'ubuntu-20.04'
291-
Compiler: clang
292-
CompilerVer: 7
293-
BuildType: Debug
294-
295-
clang-6 RelWithDebInfo [Ubuntu 20.04 Focal]:
281+
clang-7 RelWithDebInfo [Ubuntu 20.04 Focal]:
296282
imageName: 'ubuntu-20.04'
297283
Compiler: clang
298-
CompilerVer: 6.0
284+
CompilerVer: 7
299285
BuildType: RelWithDebInfo
300286

301-
clang-6 Debug [Ubuntu 20.04 Focal]:
287+
clang-7 Debug [Ubuntu 20.04 Focal]:
302288
imageName: 'ubuntu-20.04'
303289
Compiler: clang
304-
CompilerVer: 6.0
290+
CompilerVer: 7
305291
BuildType: Debug
306292

307293

include/memory_debugging.h

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,27 @@
4242
#include <valgrind/memcheck.h>
4343

4444
#define MEM_UNDEFINED(a, len) VALGRIND_MAKE_MEM_UNDEFINED(a, len)
45-
#define MEM_DEFINED_IF_ADDRESSABLE(a, len) \
46-
VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(a, len)
45+
// #define MEM_DEFINED_IF_ADDRESSABLE(a, len)
46+
// VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(a, len)
4747
#define MEM_NOACCESS(a, len) VALGRIND_MAKE_MEM_NOACCESS(a, len)
4848
#define MEM_CHECK_ADDRESSABLE(a, len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a, len)
4949

50+
#elif defined(HAVE_ASAN)
51+
52+
#include <cassert>
53+
#include <sanitizer/asan_interface.h>
54+
55+
#define MEM_MALLOCLIKE_BLOCK(p1, p2, p3, p4) ASAN_UNPOISON_MEMORY_REGION(p1, p2)
56+
#define MEM_FREELIKE_BLOCK(p1, p2, p3, p4) ASAN_POISON_MEMORY_REGION(p1, p2)
57+
58+
#define MEM_UNDEFINED(a, len) ASAN_UNPOISON_MEMORY_REGION(a, len)
59+
#define MEM_NOACCESS(a, len) ASAN_POISON_MEMORY_REGION(a, len)
60+
61+
// In the case of error, this will immediatelly terminate the process instead of
62+
// printing an error and continuing, which is more common for ASan errors.
63+
// Change it to log and continue if that becomes an issue.
64+
#define MEM_CHECK_ADDRESSABLE(a, len) assert(!__asan_region_is_poisoned(a, len))
65+
5066
#else /* HAVE_VALGRIND */
5167

5268
#define MEM_MALLOCLIKE_BLOCK(p1, p2, p3, p4) \
@@ -56,13 +72,18 @@
5672
do { \
5773
} while (0)
5874
#define MEM_UNDEFINED(a, len) ((void)0)
59-
#define MEM_DEFINED_IF_ADDRESSABLE(a, len) ((void)0)
75+
// #define MEM_DEFINED_IF_ADDRESSABLE(a, len) ((void)0)
6076
#define MEM_NOACCESS(a, len) ((void)0)
6177
#define MEM_CHECK_ADDRESSABLE(a, len) ((void)0)
6278

63-
#endif
79+
#endif /* HAVE_VALGRIND */
80+
81+
// Not used in the current sources. If it starts being used after a rebase,
82+
// somehow implement it (could be an unconditional unpoison?) for the HAVE_ASAN
83+
// case above.
84+
#pragma GCC poison MEM_DEFINED_IF_ADDRESSABLE
6485

65-
#if !defined(NDEBUG) || defined(HAVE_VALGRIND)
86+
#if !defined(NDEBUG) || defined(HAVE_VALGRIND) || defined(HAVE_ASAN)
6687

6788
/**
6889
Put bad content in memory to be sure it will segfault if dereferenced.

mysql-test/include/restart_with_mysqld_safe.inc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,19 @@ let $MYSQL_TIMEZONE= `SELECT @@time_zone`;
2929
let $MYSQL_PIDFILE= `SELECT @@pid_file`;
3030
let $MYSQL_PORT= `SELECT @@port`;
3131
let $MYSQL_MESSAGESDIR= `SELECT @@lc_messages_dir`;
32-
let $MYSQLX_PORT= `SELECT @@mysqlx_port`;
33-
let $MYSQLX_SOCKET= `SELECT @@mysqlx_socket`;
3432
let $start_page_size= `select @@innodb_page_size`;
3533
let $other_page_size_k= `SELECT $start_page_size DIV 1024`;
3634
let $other_page_size_nk= `SELECT CONCAT($other_page_size_k,'k')`;
3735

36+
let $have_mysqlx= `SELECT count(plugin_status) > 0 FROM information_schema.plugins WHERE plugin_name LIKE 'mysqlx' and plugin_status LIKE 'ACTIVE'`;
37+
38+
--let $MYSQLX_ARGS= ""
39+
if ($have_mysqlx) {
40+
--let $MYSQLX_SOCKET= `SELECT @@mysqlx_socket`
41+
--let $MYSQLX_PORT= `SELECT @@mysqlx_port`
42+
--let $MYSQLX_ARGS= --mysqlx_socket=$MYSQLX_SOCKET --mysqlx_port=$MYSQLX_PORT
43+
}
44+
3845
# mysqld_path to be passed to --ledir
3946
# use test;
4047
perl;
@@ -60,7 +67,7 @@ EOF
6067
--shutdown_server
6168
--source include/wait_until_disconnected.inc
6269

63-
--exec sh $MYSQLD_SAFE --defaults-file=$MYSQLTEST_VARDIR/my.cnf --server_id=$_server_id --log-error=$MYSQLTEST_VARDIR/log/mysqld.$_server_id.err --basedir=$MYSQL_BASEDIR --ledir=$mysqld_path --mysqld=$mysqld_bin --datadir=$MYSQLD_DATADIR --socket=$MYSQL_SOCKET --mysqlx_socket=$MYSQLX_SOCKET --pid-file=$MYSQL_PIDFILE --port=$MYSQL_PORT --mysqlx_port=$MYSQLX_PORT --timezone=SYSTEM --log-output=file --loose-debug-sync-timeout=600 --default-storage-engine=InnoDB --default-tmp-storage-engine=InnoDB --secure-file-priv="" --core-file --lc-messages-dir=$MYSQL_MESSAGESDIR --innodb-page-size=$other_page_size_nk --log-error-verbosity=3 --plugin-dir=$MYSQL_PLUGINDIR --plugin-load=$plugin_list $mysqld_extra_settings < /dev/null > /dev/null 2>&1 &
70+
--exec sh $MYSQLD_SAFE --defaults-file=$MYSQLTEST_VARDIR/my.cnf --server_id=$_server_id --log-error=$MYSQLTEST_VARDIR/log/mysqld.$_server_id.err --basedir=$MYSQL_BASEDIR --ledir=$mysqld_path --mysqld=$mysqld_bin --datadir=$MYSQLD_DATADIR --socket=$MYSQL_SOCKET --pid-file=$MYSQL_PIDFILE --port=$MYSQL_PORT $MYSQLX_ARGS --timezone=SYSTEM --log-output=file --loose-debug-sync-timeout=600 --default-storage-engine=InnoDB --default-tmp-storage-engine=InnoDB --secure-file-priv="" --core-file --lc-messages-dir=$MYSQL_MESSAGESDIR --innodb-page-size=$other_page_size_nk --log-error-verbosity=3 --plugin-dir=$MYSQL_PLUGINDIR --plugin-load=$plugin_list $mysqld_extra_settings < /dev/null > /dev/null 2>&1 &
6471

6572
--enable_reconnect
6673
--source include/wait_until_connected_again.inc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--mysqlx=OFF
1+
--loose-mysqlx=OFF
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--mysqlx=OFF
1+
--loose-mysqlx=OFF

mysql-test/suite/clone/include/clone_connection_begin.inc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ if ($SERVER_ID != 1) {
6464
# A. Check if we need monitoring process. Taken from mysqld_safe.test
6565
if ($inst_monitor) {
6666

67+
--let $have_mysqlx= `SELECT count(plugin_status) > 0 FROM information_schema.plugins WHERE plugin_name LIKE 'mysqlx' and plugin_status LIKE 'ACTIVE'`
68+
6769
# 1. Set variables to be used in parameters of mysqld_safe.
6870
--let $SERVER_ID= `SELECT @@server_id`
6971
--let $MYSQLD_DATADIR= `SELECT @@datadir`
@@ -74,7 +76,12 @@ if ($inst_monitor) {
7476
--let $MYSQL_SOCKET= `SELECT @@socket`
7577
--let $MYSQLX_SOCKET= `SELECT @@mysqlx_socket`
7678
--let $MYSQL_PORT= `SELECT @@port`
77-
--let $MYSQLX_PORT= `SELECT @@mysqlx_port`
79+
--let $MYSQLX_ARGS= ""
80+
if ($have_mysqlx) {
81+
--let $MYSQLX_SOCKET= `SELECT @@mysqlx_socket`
82+
--let $MYSQLX_PORT= `SELECT @@mysqlx_port`
83+
--let $MYSQLX_ARGS= --mysqlx_socket=$MYSQLX_SOCKET --mysqlx_port=$MYSQLX_PORT
84+
}
7885
--let $MYSQL_PLUGIN_DIR = `SELECT @@plugin_dir`
7986

8087
--let $page_size= `select @@innodb_page_size`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--mysqlx=OFF
1+
--loose-mysqlx=OFF

mysql-test/suite/perfschema/t/transaction_nested_events-master.opt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
--loose-performance-schema-consumer-events-waits-current=OFF
1515
--loose-performance-schema-consumer-events-waits-history=OFF
1616
--loose-performance-schema-consumer-events-waits-history-long=OFF
17-
--mysqlx=OFF
17+
--loose-mysqlx=OFF

mysql-test/suite/rocksdb/combinations

Lines changed: 0 additions & 4 deletions
This file was deleted.

mysql-test/suite/rocksdb/include/bulk_load_unsorted.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ start transaction with consistent snapshot;
104104
select VALUE > 0 as 'Has opened snapshots' from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
105105

106106
connection default;
107+
set sql_log_bin = 0;
107108
set rocksdb_bulk_load=1;
108109
set rocksdb_bulk_load_size=100000;
109110
--disable_query_log
@@ -115,6 +116,7 @@ eval LOAD DATA INFILE '$file' INTO TABLE t2;
115116
eval LOAD DATA INFILE '$file' INTO TABLE t3;
116117
--enable_query_log
117118
set rocksdb_bulk_load=0;
119+
set sql_log_bin = 1;
118120

119121
--remove_file $file
120122

0 commit comments

Comments
 (0)