Skip to content

Commit 1813d92

Browse files
committed
Merge 10.4 into 10.5
2 parents 0fe97c2 + f347b3e commit 1813d92

File tree

234 files changed

+3048
-789
lines changed

Some content is hidden

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

234 files changed

+3048
-789
lines changed

cmake/FindLZ4.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
2-
find_library(LZ4_LIBRARY NAMES lz4)
2+
find_library(LZ4_LIBRARIES NAMES lz4)
33

44
include(FindPackageHandleStandardArgs)
55
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
66
LZ4 DEFAULT_MSG
7-
LZ4_LIBRARY LZ4_INCLUDE_DIR)
7+
LZ4_LIBRARIES LZ4_INCLUDE_DIR)
88

9-
mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY)
9+
mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARIES)

cmake/Findzstd.cmake renamed to cmake/FindZSTD.cmake

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
# ZSTD_LIBRARIES - List of libraries when using zstd.
66
# ZSTD_FOUND - True if zstd found.
77

8-
if (DEFINED ZSTD_LIBRARIES)
9-
return()
10-
endif()
11-
128
find_path(ZSTD_INCLUDE_DIR
139
NAMES zstd.h
1410
HINTS ${ZSTD_ROOT_DIR}/include)
@@ -18,7 +14,7 @@ find_library(ZSTD_LIBRARIES
1814
HINTS ${ZSTD_ROOT_DIR}/lib)
1915

2016
include(FindPackageHandleStandardArgs)
21-
find_package_handle_standard_args(zstd DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIR)
17+
find_package_handle_standard_args(ZSTD DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIR)
2218

2319
mark_as_advanced(
2420
ZSTD_LIBRARIES

cmake/configure.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl
1+
#!/usr/bin/env perl
22

33
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
44
#

cmake/dtrace.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ MACRO(CHECK_DTRACE)
4343
IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
4444
AND NOT BUGGY_GCC_NO_DTRACE_MODULES
4545
AND NOT BUGGY_LINUX_DTRACE
46-
AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
46+
AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS"
47+
AND NOT WIN32)
4748
SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
4849
ENDIF()
4950
# On GNU/Hurd, dtrace is not supported

dbug/dbug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,17 +490,17 @@ static int DbugParse(CODE_STATE *cs, const char *control)
490490
rel= control[0] == '+' || control[0] == '-';
491491
if ((!rel || (!stack->out_file && !stack->next)))
492492
{
493+
LockIfInitSettings(cs);
493494
FreeState(cs, 0);
494495
stack->flags= 0;
495496
stack->delay= 0;
496497
stack->maxdepth= 0;
497498
stack->sub_level= 0;
498499
stack->out_file= sstderr;
499500
stack->functions= NULL;
500-
LockIfInitSettings(cs);
501501
stack->keywords= NULL;
502-
UnlockIfInitSettings(cs);
503502
stack->processes= NULL;
503+
UnlockIfInitSettings(cs);
504504
}
505505
else if (!stack->out_file)
506506
{

dbug/dbug_add_tags.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl
1+
#!/usr/bin/env perl
22

33
# Copyright (c) 2002 MySQL AB, 2009 Sun Microsystems, Inc.
44
# Use is subject to license terms.

dbug/remove_function_from_trace.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl
1+
#!/usr/bin/env perl
22

33
die <<EEE unless @ARGV;
44
Usage: $0 func1 [func2 [ ...] ]

debian/additions/mariadb-report

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl -w
1+
#!/usr/bin/env perl -w
22

33
# mariadb-report v4.0 Oct 23 2015
44
# renamed to from mysqlreport in 2020

extra/mariabackup/xtrabackup.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ my_bool xtrabackup_move_back;
119119
my_bool xtrabackup_decrypt_decompress;
120120
my_bool xtrabackup_print_param;
121121
my_bool xtrabackup_mysqld_args;
122-
my_bool help;
122+
my_bool xtrabackup_help;
123123

124124
my_bool xtrabackup_export;
125125

@@ -1418,7 +1418,7 @@ struct my_option xb_server_options[] =
14181418

14191419
{"help", '?',
14201420
"Display this help and exit.",
1421-
(G_PTR *) &help, (G_PTR *) &help, 0,
1421+
(G_PTR *) &xtrabackup_help, (G_PTR *) &xtrabackup_help, 0,
14221422
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
14231423

14241424
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}

include/scope.h

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
Copyright (c) 2020, MariaDB
3+
4+
This program is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU General Public License
6+
as published by the Free Software Foundation; version 2 of
7+
the License.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program; if not, write to the Free Software
16+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
17+
*/
18+
19+
#pragma once
20+
21+
#include <type_traits>
22+
#include <utility>
23+
24+
namespace detail
25+
{
26+
27+
template <typename Callable> class scope_exit
28+
{
29+
public:
30+
template <typename F>
31+
explicit scope_exit(F &&f) : function_(std::forward<F>(f))
32+
{
33+
}
34+
35+
scope_exit(scope_exit &&rhs)
36+
: function_(std::move(rhs.function_)), engaged_(rhs.engaged_)
37+
{
38+
rhs.release();
39+
}
40+
41+
scope_exit(const scope_exit &)= delete;
42+
scope_exit &operator=(scope_exit &&)= delete;
43+
scope_exit &operator=(const scope_exit &)= delete;
44+
45+
void release() { engaged_= false; }
46+
47+
~scope_exit()
48+
{
49+
if (engaged_)
50+
function_();
51+
}
52+
53+
private:
54+
Callable function_;
55+
bool engaged_= true;
56+
};
57+
58+
} // end namespace detail
59+
60+
template <typename Callable>
61+
detail::scope_exit<typename std::decay<Callable>::type>
62+
make_scope_exit(Callable &&f)
63+
{
64+
return detail::scope_exit<typename std::decay<Callable>::type>(
65+
std::forward<Callable>(f));
66+
}

0 commit comments

Comments
 (0)