Skip to content

Commit a816eac

Browse files
committed
5.6.41-84.1
1 parent 3cd4da3 commit a816eac

File tree

187 files changed

+4359
-194538
lines changed

Some content is hidden

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

187 files changed

+4359
-194538
lines changed

storage/tokudb/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SET(TOKUDB_VERSION 5.6.39-83.1)
1+
SET(TOKUDB_VERSION )
22
# PerconaFT only supports x86-64 and cmake-2.8.9+
33
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
44
NOT CMAKE_VERSION VERSION_LESS "2.8.9")
@@ -93,7 +93,11 @@ ELSEIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ft-index/")
9393
MESSAGE(WARNING "Found ft-index sources, ft-index is deprecated and replaced with PerconaFT.")
9494
SET(TOKU_FT_DIR_NAME "ft-index")
9595
ELSE ()
96-
MESSAGE(FATAL_ERROR "Could not find PerconaFT sources.")
96+
MESSAGE(FATAL_ERROR "Could not find PerconaFT sources.")
97+
ENDIF ()
98+
99+
IF (WITH_VALGRIND)
100+
SET(USE_VALGRIND "ON")
97101
ENDIF ()
98102

99103
ADD_SUBDIRECTORY(${TOKU_FT_DIR_NAME})

storage/tokudb/PerconaFT/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ ENDIF()
1717

1818
# detect when we are being built as a subproject
1919
if (DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
20-
add_definitions( -DMYSQL_TOKUDB_ENGINE=1)
20+
add_definitions(-DMYSQL_TOKUDB_ENGINE=1)
21+
add_definitions(-DMYSQL_VERSION_ID=${MYSQL_VERSION_ID})
2122
# Extended PFS instrumentation:
2223
# -DTOKU_PFS_MUTEX_EXTENDED_CACHETABLEMMUTEX=1
2324
if (WITH_PERFSCHEMA_STORAGE_ENGINE)

storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ set_ldflags_if_supported(
142142
-Wno-error=strict-overflow
143143
)
144144

145+
# new flag sets in MySQL 8.0 seem to explicitly disable this
146+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
147+
145148
## set extra debugging flags and preprocessor definitions
146149
set(CMAKE_C_FLAGS_DEBUG "-g3 -O0 ${CMAKE_C_FLAGS_DEBUG}")
147150
set(CMAKE_CXX_FLAGS_DEBUG "-g3 -O0 ${CMAKE_CXX_FLAGS_DEBUG}")

storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,6 @@ int toku_cachetable_get_and_pin (
12901290
CACHEKEY key,
12911291
uint32_t fullhash,
12921292
void**value,
1293-
long *sizep,
12941293
CACHETABLE_WRITE_CALLBACK write_callback,
12951294
CACHETABLE_FETCH_CALLBACK fetch_callback,
12961295
CACHETABLE_PARTIAL_FETCH_REQUIRED_CALLBACK pf_req_callback,
@@ -1311,7 +1310,6 @@ int toku_cachetable_get_and_pin (
13111310
key,
13121311
fullhash,
13131312
value,
1314-
sizep,
13151313
write_callback,
13161314
fetch_callback,
13171315
pf_req_callback,
@@ -1559,7 +1557,6 @@ int toku_cachetable_get_and_pin_with_dep_pairs (
15591557
CACHEKEY key,
15601558
uint32_t fullhash,
15611559
void**value,
1562-
long *sizep,
15631560
CACHETABLE_WRITE_CALLBACK write_callback,
15641561
CACHETABLE_FETCH_CALLBACK fetch_callback,
15651562
CACHETABLE_PARTIAL_FETCH_REQUIRED_CALLBACK pf_req_callback,
@@ -1743,7 +1740,6 @@ int toku_cachetable_get_and_pin_with_dep_pairs (
17431740
}
17441741
got_value:
17451742
*value = p->value_data;
1746-
if (sizep) *sizep = p->attr.size;
17471743
return 0;
17481744
}
17491745

@@ -1856,6 +1852,22 @@ int toku_cachetable_maybe_get_and_pin_clean (CACHEFILE cachefile, CACHEKEY key,
18561852
return r;
18571853
}
18581854

1855+
int toku_cachetable_get_attr (CACHEFILE cachefile, CACHEKEY key, uint32_t fullhash, PAIR_ATTR *attr) {
1856+
CACHETABLE ct = cachefile->cachetable;
1857+
int r;
1858+
ct->list.pair_lock_by_fullhash(fullhash);
1859+
PAIR p = ct->list.find_pair(cachefile, key, fullhash);
1860+
if (p) {
1861+
// Assumes pair lock and full hash lock are the same mutex
1862+
*attr = p->attr;
1863+
r = 0;
1864+
} else {
1865+
r = -1;
1866+
}
1867+
ct->list.pair_unlock_by_fullhash(fullhash);
1868+
return r;
1869+
}
1870+
18591871
//
18601872
// internal function to unpin a PAIR.
18611873
// As of Clayface, this is may be called in two ways:
@@ -1997,7 +2009,6 @@ int toku_cachetable_get_and_pin_nonblocking(
19972009
CACHEKEY key,
19982010
uint32_t fullhash,
19992011
void**value,
2000-
long* UU(sizep),
20012012
CACHETABLE_WRITE_CALLBACK write_callback,
20022013
CACHETABLE_FETCH_CALLBACK fetch_callback,
20032014
CACHETABLE_PARTIAL_FETCH_REQUIRED_CALLBACK pf_req_callback,

storage/tokudb/PerconaFT/ft/cachetable/cachetable.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ int toku_cachetable_get_and_pin_with_dep_pairs (
352352
CACHEKEY key,
353353
uint32_t fullhash,
354354
void**value,
355-
long *sizep,
356355
CACHETABLE_WRITE_CALLBACK write_callback,
357356
CACHETABLE_FETCH_CALLBACK fetch_callback,
358357
CACHETABLE_PARTIAL_FETCH_REQUIRED_CALLBACK pf_req_callback,
@@ -374,7 +373,6 @@ int toku_cachetable_get_and_pin (
374373
CACHEKEY key,
375374
uint32_t fullhash,
376375
void**value,
377-
long *sizep,
378376
CACHETABLE_WRITE_CALLBACK write_callback,
379377
CACHETABLE_FETCH_CALLBACK fetch_callback,
380378
CACHETABLE_PARTIAL_FETCH_REQUIRED_CALLBACK pf_req_callback,
@@ -408,7 +406,6 @@ int toku_cachetable_get_and_pin_nonblocking (
408406
CACHEKEY key,
409407
uint32_t fullhash,
410408
void**value,
411-
long *sizep,
412409
CACHETABLE_WRITE_CALLBACK write_callback,
413410
CACHETABLE_FETCH_CALLBACK fetch_callback,
414411
CACHETABLE_PARTIAL_FETCH_REQUIRED_CALLBACK pf_req_callback,
@@ -428,6 +425,11 @@ int toku_cachetable_maybe_get_and_pin (CACHEFILE, CACHEKEY, uint32_t /*fullhash*
428425
int toku_cachetable_maybe_get_and_pin_clean (CACHEFILE, CACHEKEY, uint32_t /*fullhash*/, pair_lock_type, void**);
429426
// Effect: Like maybe get and pin, but may pin a clean pair.
430427

428+
int toku_cachetable_get_attr(CACHEFILE, CACHEKEY, uint32_t /*fullhash*/, PAIR_ATTR *);
429+
// Effect: get the attributes for cachekey
430+
// Returns: 0 if success, non-zero if cachekey is not cached
431+
// Notes: this function exists for tests
432+
431433
int toku_cachetable_unpin(CACHEFILE, PAIR, enum cachetable_dirty dirty, PAIR_ATTR size);
432434
// Effect: Unpin a memory object
433435
// Modifies: If the memory object is in the cachetable, then OR the dirty flag,

storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ toku_pin_ftnode_for_query(
178178
blocknum,
179179
fullhash,
180180
&node_v,
181-
NULL,
182181
get_write_callbacks_for_node(ft_handle->ft),
183182
toku_ftnode_fetch_callback,
184183
toku_ftnode_pf_req_callback,
@@ -209,7 +208,6 @@ toku_pin_ftnode_for_query(
209208
blocknum,
210209
fullhash,
211210
&node_v,
212-
NULL,
213211
get_write_callbacks_for_node(ft_handle->ft),
214212
toku_ftnode_fetch_callback,
215213
toku_ftnode_pf_req_callback,
@@ -289,7 +287,6 @@ toku_pin_ftnode_with_dep_nodes(
289287
blocknum,
290288
fullhash,
291289
&node_v,
292-
NULL,
293290
get_write_callbacks_for_node(ft),
294291
toku_ftnode_fetch_callback,
295292
toku_ftnode_pf_req_callback,

storage/tokudb/PerconaFT/ft/ft-test-helpers.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ int toku_testsetup_get_sersize(FT_HANDLE ft_handle, BLOCKNUM diskoff) // Return
130130
ft_handle->ft->cf, diskoff,
131131
toku_cachetable_hash(ft_handle->ft->cf, diskoff),
132132
&node_v,
133-
NULL,
134133
get_write_callbacks_for_node(ft_handle->ft),
135134
toku_ftnode_fetch_callback,
136135
toku_ftnode_pf_req_callback,
@@ -158,7 +157,6 @@ int toku_testsetup_insert_to_leaf (FT_HANDLE ft_handle, BLOCKNUM blocknum, const
158157
blocknum,
159158
toku_cachetable_hash(ft_handle->ft->cf, blocknum),
160159
&node_v,
161-
NULL,
162160
get_write_callbacks_for_node(ft_handle->ft),
163161
toku_ftnode_fetch_callback,
164162
toku_ftnode_pf_req_callback,
@@ -236,7 +234,6 @@ int toku_testsetup_insert_to_nonleaf (FT_HANDLE ft_handle, BLOCKNUM blocknum, en
236234
blocknum,
237235
toku_cachetable_hash(ft_handle->ft->cf, blocknum),
238236
&node_v,
239-
NULL,
240237
get_write_callbacks_for_node(ft_handle->ft),
241238
toku_ftnode_fetch_callback,
242239
toku_ftnode_pf_req_callback,

storage/tokudb/PerconaFT/ft/node.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ void toku_evict_bn_from_memory(FTNODE node, int childnum, FT ft) {
156156
assert(!node->dirty);
157157
BASEMENTNODE bn = BLB(node, childnum);
158158
toku_ft_decrease_stats(&ft->in_memory_stats, bn->stat64_delta);
159+
toku_ft_adjust_logical_row_count(ft, -BLB_LRD(node, childnum));
160+
BLB_LRD(node, childnum) = 0;
159161
destroy_basement_node(bn);
160162
set_BNULL(node, childnum);
161163
BP_STATE(node, childnum) = PT_ON_DISK;

storage/tokudb/PerconaFT/ft/serialize/block_allocator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
4949
#include "ft/serialize/block_allocator.h"
5050
#include "ft/serialize/rbtree_mhs.h"
5151

52-
#if TOKU_DEBUG_PARANOID
52+
#if defined(TOKU_DEBUG_PARANOID) && TOKU_DEBUG_PARANOID
5353
#define VALIDATE() Validate()
5454
#else
5555
#define VALIDATE()

storage/tokudb/PerconaFT/ft/tests/cachetable-4357.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ CACHEFILE f1;
4242

4343
static void *pin_nonblocking(void *arg) {
4444
void* v1;
45-
long s1;
4645
int r = toku_cachetable_get_and_pin_nonblocking(
4746
f1,
4847
make_blocknum(1),
4948
toku_cachetable_hash(f1, make_blocknum(1)),
5049
&v1,
51-
&s1,
5250
def_write_callback(NULL), def_fetch, def_pf_req_callback, def_pf_callback,
5351
PL_WRITE_EXPENSIVE,
5452
NULL,
@@ -70,12 +68,10 @@ cachetable_test (void) {
7068
r = toku_cachetable_openf(&f1, ct, fname1, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); assert(r == 0);
7169

7270
void* v1;
73-
long s1;
7471
r = toku_cachetable_get_and_pin(f1,
7572
make_blocknum(1),
7673
toku_cachetable_hash(f1, make_blocknum(1)),
7774
&v1,
78-
&s1,
7975
def_write_callback(NULL),
8076
def_fetch,
8177
def_pf_req_callback,

0 commit comments

Comments
 (0)