Skip to content

Commit ddffcad

Browse files
committed
Merge branch '10.3' into 10.4
2 parents 4ed4cf0 + 4668e07 commit ddffcad

Some content is hidden

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

42 files changed

+95
-100
lines changed

mysys/stacktrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#ifdef __linux__
3838
#define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end)
3939
static char *heap_start;
40-
extern char *__bss_start;
40+
char *__bss_start;
4141
#else
4242
#define PTR_SANE(p) (p)
4343
#endif /* __linux */

storage/tokudb/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SET(TOKUDB_VERSION 5.6.41-84.1)
1+
SET(TOKUDB_VERSION 5.6.49-89.0)
22
# PerconaFT only supports x86-64 and cmake-2.8.9+
33
IF(WIN32)
44
# tokudb never worked there
@@ -136,6 +136,7 @@ IF(DEFINED TOKUDB_NOPATCH_CONFIG)
136136
ADD_DEFINITIONS("-DTOKUDB_NOPATCH_CONFIG=${TOKUDB_NOPATCH_CONFIG}")
137137
ENDIF()
138138

139+
MY_CHECK_AND_SET_COMPILER_FLAG(-Wno-missing-format-attribute)
139140
MY_CHECK_AND_SET_COMPILER_FLAG(-Wno-missing-field-initializers)
140141

141142
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/PerconaFT/")

storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,18 @@ include(CheckCCompilerFlag)
4747
include(CheckCXXCompilerFlag)
4848

4949
## adds a compiler flag if the compiler supports it
50-
macro(set_cflags_if_supported)
50+
macro(prepend_cflags_if_supported)
5151
foreach(flag ${ARGN})
5252
MY_CHECK_AND_SET_COMPILER_FLAG(${flag})
5353
endforeach(flag)
54-
endmacro(set_cflags_if_supported)
54+
endmacro(prepend_cflags_if_supported)
5555

5656
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
5757
set (OPTIONAL_CFLAGS "${OPTIONAL_CFLAGS} -Wmissing-format-attribute")
5858
endif()
5959

6060
## disable some warnings
61-
## missing-format-attribute causes warnings in some MySQL include files
62-
## if the library is built as a part of TokuDB MySQL storage engine
63-
set_cflags_if_supported(
61+
prepend_cflags_if_supported(
6462
-Wno-missing-field-initializers
6563
-Wstrict-null-sentinel
6664
-Winit-self
@@ -76,28 +74,21 @@ set_cflags_if_supported(
7674
-fno-exceptions
7775
-Wno-error=nonnull-compare
7876
)
79-
## set_cflags_if_supported_named("-Weffc++" -Weffcpp)
8077

8178
## Clang has stricter POD checks. So, only enable this warning on our other builds (Linux + GCC)
8279
if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
83-
set_cflags_if_supported(
80+
prepend_cflags_if_supported(
8481
-Wpacked
8582
)
8683
endif ()
8784

8885
option (PROFILING "Allow profiling and debug" ON)
8986
if (PROFILING)
90-
set_cflags_if_supported(
87+
prepend_cflags_if_supported(
9188
-fno-omit-frame-pointer
9289
)
9390
endif ()
9491

95-
## this hits with optimized builds somewhere in ftleaf_split, we don't
96-
## know why but we don't think it's a big deal
97-
set_cflags_if_supported(
98-
-Wno-error=strict-overflow
99-
)
100-
10192
# new flag sets in MySQL 8.0 seem to explicitly disable this
10293
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
10394

@@ -135,7 +126,7 @@ else ()
135126
endif ()
136127

137128
## set warnings
138-
set_cflags_if_supported(
129+
prepend_cflags_if_supported(
139130
-Wextra
140131
-Wbad-function-cast
141132
-Wno-missing-noreturn
@@ -158,7 +149,7 @@ set_cflags_if_supported(
158149

159150
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL Clang)
160151
# Disabling -Wcast-align with clang. TODO: fix casting and re-enable it, someday.
161-
set_cflags_if_supported(-Wcast-align)
152+
prepend_cflags_if_supported(-Wcast-align)
162153
endif ()
163154

164155
## never want these

storage/tokudb/PerconaFT/ft/logger/logger.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
5151
#include "util/status.h"
5252

5353
int writing_rollback = 0;
54+
extern "C" {
55+
uint force_recovery = 0;
56+
}
5457

5558
static const int log_format_version = TOKU_LOG_VERSION;
5659

storage/tokudb/PerconaFT/ft/serialize/rbtree_mhs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ namespace MhsRbTree {
193193
BlockPair(OUUInt64 o, OUUInt64 s) : _offset(o), _size(s) {}
194194
BlockPair(const BlockPair &o)
195195
: _offset(o._offset), _size(o._size) {}
196+
BlockPair& operator=(const BlockPair&) = default;
196197

197198
int operator<(const BlockPair &rhs) const {
198199
return _offset < rhs._offset;

storage/tokudb/PerconaFT/ft/tests/cachetable-simple-close.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ static void test_multiple_cachefiles(bool use_same_hash) {
195195

196196
char fname1[strlen(TOKU_TEST_FILENAME) + sizeof("_1")];
197197
strcpy(fname1, TOKU_TEST_FILENAME);
198-
strncat(fname1, "_1", sizeof("_1"));
198+
strcat(fname1, "_1");
199199
char fname2[strlen(TOKU_TEST_FILENAME) + sizeof("_2")];
200200
strcpy(fname2, TOKU_TEST_FILENAME);
201-
strncat(fname2, "_2", sizeof("_2"));
201+
strcat(fname2, "_2");
202202
char fname3[strlen(TOKU_TEST_FILENAME) + sizeof("_3")];
203203
strcpy(fname3, TOKU_TEST_FILENAME);
204-
strncat(fname3, "_3", sizeof("_3"));
204+
strcat(fname3, "_3");
205205

206206
unlink(fname1);
207207
unlink(fname2);
@@ -280,10 +280,10 @@ static void test_evictor(void) {
280280

281281
char fname1[strlen(TOKU_TEST_FILENAME) + sizeof("_1")];
282282
strcpy(fname1, TOKU_TEST_FILENAME);
283-
strncat(fname1, "_1", sizeof("_1"));
283+
strcat(fname1, "_1");
284284
char fname2[strlen(TOKU_TEST_FILENAME) + sizeof("_2")];
285285
strcpy(fname2, TOKU_TEST_FILENAME);
286-
strncat(fname2, "_2", sizeof("_2"));
286+
strcat(fname2, "_2");
287287

288288
unlink(fname1);
289289
unlink(fname2);

storage/tokudb/PerconaFT/ft/tests/ft-bfe-query.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static void test_prefetching(void) {
337337
sn.layout_version_original = FT_LAYOUT_VERSION;
338338
sn.height = 1;
339339
sn.n_children = 3;
340-
sn.dirty = 1;
340+
sn.set_dirty();
341341
sn.oldest_referenced_xid_known = TXNID_NONE;
342342

343343
uint64_t key1 = 100;

storage/tokudb/PerconaFT/ft/tests/ft-clock-test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void test1(int fd, FT ft_h, FTNODE *dn) {
133133
for (int i = 0; i < (*dn)->n_children; i++) {
134134
invariant(BP_STATE(*dn, i) == PT_AVAIL);
135135
}
136-
(*dn)->dirty = 1;
136+
(*dn)->set_dirty();
137137
toku_ftnode_pe_callback(*dn, attr, ft_h, def_pe_finalize_impl, nullptr);
138138
toku_ftnode_pe_callback(*dn, attr, ft_h, def_pe_finalize_impl, nullptr);
139139
toku_ftnode_pe_callback(*dn, attr, ft_h, def_pe_finalize_impl, nullptr);
@@ -246,7 +246,7 @@ static void test_serialize_nonleaf(void) {
246246
sn.layout_version_original = FT_LAYOUT_VERSION;
247247
sn.height = 1;
248248
sn.n_children = 2;
249-
sn.dirty = 1;
249+
sn.set_dirty();
250250
sn.oldest_referenced_xid_known = TXNID_NONE;
251251
MALLOC_N(2, sn.bp);
252252
DBT pivotkey;
@@ -384,7 +384,7 @@ static void test_serialize_leaf(void) {
384384
sn.layout_version_original = FT_LAYOUT_VERSION;
385385
sn.height = 0;
386386
sn.n_children = 2;
387-
sn.dirty = 1;
387+
sn.set_dirty();
388388
sn.oldest_referenced_xid_known = TXNID_NONE;
389389
MALLOC_N(sn.n_children, sn.bp);
390390
DBT pivotkey;

storage/tokudb/PerconaFT/ft/tests/ft-serialize-benchmark.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void test_serialize_leaf(int valsize,
9595
sn->layout_version_original = FT_LAYOUT_VERSION;
9696
sn->height = 0;
9797
sn->n_children = 8;
98-
sn->dirty = 1;
98+
sn->set_dirty();
9999
sn->oldest_referenced_xid_known = TXNID_NONE;
100100
MALLOC_N(sn->n_children, sn->bp);
101101
sn->pivotkeys.create_empty();
@@ -173,7 +173,7 @@ static void test_serialize_leaf(int valsize,
173173
for (int i = 0; i < ser_runs; i++) {
174174
gettimeofday(&t[0], NULL);
175175
ndd = NULL;
176-
sn->dirty = 1;
176+
sn->set_dirty();
177177
r = toku_serialize_ftnode_to(
178178
fd, make_blocknum(20), sn, &ndd, true, ft->ft, false);
179179
invariant(r == 0);
@@ -265,7 +265,7 @@ static void test_serialize_nonleaf(int valsize,
265265
sn.layout_version_original = FT_LAYOUT_VERSION;
266266
sn.height = 1;
267267
sn.n_children = 8;
268-
sn.dirty = 1;
268+
sn.set_dirty();
269269
sn.oldest_referenced_xid_known = TXNID_NONE;
270270
MALLOC_N(sn.n_children, sn.bp);
271271
sn.pivotkeys.create_empty();

storage/tokudb/PerconaFT/ft/tests/ft-serialize-test.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static void test_serialize_leaf_check_msn(enum ftnode_verify_type bft,
238238
sn.layout_version_original = FT_LAYOUT_VERSION;
239239
sn.height = 0;
240240
sn.n_children = 2;
241-
sn.dirty = 1;
241+
sn.set_dirty();
242242
sn.oldest_referenced_xid_known = TXNID_NONE;
243243
MALLOC_N(sn.n_children, sn.bp);
244244
DBT pivotkey;
@@ -381,7 +381,7 @@ static void test_serialize_leaf_with_large_pivots(enum ftnode_verify_type bft,
381381
sn.layout_version_original = FT_LAYOUT_VERSION;
382382
sn.height = 0;
383383
sn.n_children = nrows;
384-
sn.dirty = 1;
384+
sn.set_dirty();
385385
sn.oldest_referenced_xid_known = TXNID_NONE;
386386

387387
MALLOC_N(sn.n_children, sn.bp);
@@ -538,7 +538,7 @@ static void test_serialize_leaf_with_many_rows(enum ftnode_verify_type bft,
538538
sn.layout_version_original = FT_LAYOUT_VERSION;
539539
sn.height = 0;
540540
sn.n_children = 1;
541-
sn.dirty = 1;
541+
sn.set_dirty();
542542
sn.oldest_referenced_xid_known = TXNID_NONE;
543543

544544
XMALLOC_N(sn.n_children, sn.bp);
@@ -693,7 +693,7 @@ static void test_serialize_leaf_with_large_rows(enum ftnode_verify_type bft,
693693
sn.layout_version_original = FT_LAYOUT_VERSION;
694694
sn.height = 0;
695695
sn.n_children = 1;
696-
sn.dirty = 1;
696+
sn.set_dirty();
697697
sn.oldest_referenced_xid_known = TXNID_NONE;
698698

699699
MALLOC_N(sn.n_children, sn.bp);
@@ -845,7 +845,7 @@ static void test_serialize_leaf_with_empty_basement_nodes(
845845
sn.layout_version_original = FT_LAYOUT_VERSION;
846846
sn.height = 0;
847847
sn.n_children = 7;
848-
sn.dirty = 1;
848+
sn.set_dirty();
849849
sn.oldest_referenced_xid_known = TXNID_NONE;
850850
MALLOC_N(sn.n_children, sn.bp);
851851
DBT pivotkeys[6];
@@ -989,7 +989,7 @@ static void test_serialize_leaf_with_multiple_empty_basement_nodes(
989989
sn.layout_version_original = FT_LAYOUT_VERSION;
990990
sn.height = 0;
991991
sn.n_children = 4;
992-
sn.dirty = 1;
992+
sn.set_dirty();
993993
sn.oldest_referenced_xid_known = TXNID_NONE;
994994
MALLOC_N(sn.n_children, sn.bp);
995995
DBT pivotkeys[3];
@@ -1100,7 +1100,7 @@ static void test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) {
11001100
sn.layout_version_original = FT_LAYOUT_VERSION;
11011101
sn.height = 1;
11021102
sn.n_children = 2;
1103-
sn.dirty = 1;
1103+
sn.set_dirty();
11041104
sn.oldest_referenced_xid_known = TXNID_NONE;
11051105
MALLOC_N(2, sn.bp);
11061106
DBT pivotkey;

0 commit comments

Comments
 (0)