diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-08-04 12:44:43 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-08-04 12:44:43 +0200 |
commit | 2adaaeba8381c28319fa94df2fe56683ebce3704 (patch) | |
tree | 65af905a107727d197b1ded8e15297514a3e45c2 /storage/tokudb | |
parent | 15db581ecb871efedeb83a10c2edbbbb6e8da784 (diff) | |
download | mariadb-git-2adaaeba8381c28319fa94df2fe56683ebce3704.tar.gz |
5.6.49-89.0
Diffstat (limited to 'storage/tokudb')
47 files changed, 125 insertions, 148 deletions
diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index 8cf572e7be1..b970a8e0495 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -54,7 +54,7 @@ IF(DEFINED TOKUDB_NOPATCH_CONFIG) ADD_DEFINITIONS("-DTOKUDB_NOPATCH_CONFIG=${TOKUDB_NOPATCH_CONFIG}") ENDIF() -macro(set_cflags_if_supported) +macro(prepend_cflags_if_supported) foreach(flag ${ARGN}) string(REGEX REPLACE "-" "_" temp_flag ${flag}) check_c_compiler_flag(${flag} HAVE_C_${temp_flag}) @@ -66,7 +66,7 @@ macro(set_cflags_if_supported) set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}") endif () endforeach(flag) -endmacro(set_cflags_if_supported) +endmacro(prepend_cflags_if_supported) macro(append_cflags_if_supported) foreach(flag ${ARGN}) @@ -82,16 +82,19 @@ macro(append_cflags_if_supported) endforeach(flag) endmacro(append_cflags_if_supported) -set_cflags_if_supported(-Wno-missing-field-initializers) + +## PerconaFT sets "-Wmissing-format-attribute" what causes warnings in some MySQL include files +prepend_cflags_if_supported(-Wno-missing-format-attribute) + +# "cmake/maintainer.cmake" sets "-Wvla" which causes warnings with PerconaFT append_cflags_if_supported(-Wno-vla) -# Disable warnings for gcc-9 or higher -IF(CMAKE_COMPILER_IS_GNUCXX AND - (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 9.0 OR - CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0)) - append_cflags_if_supported(-Wno-address-of-packed-member) +# Suppress warnings for gcc older than gcc-5 (for tokudb_status.h, ha_tokudb.cc, hatoku_hton.cc) +IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + prepend_cflags_if_supported(-Wno-missing-field-initializers) ENDIF() + IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/PerconaFT/") IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ft-index/") MESSAGE(FATAL_ERROR "Found both PerconaFT and ft-index sources. Don't know which to use.") diff --git a/storage/tokudb/PerconaFT/CMakeLists.txt b/storage/tokudb/PerconaFT/CMakeLists.txt index 68c98035e16..385ea7409a3 100644 --- a/storage/tokudb/PerconaFT/CMakeLists.txt +++ b/storage/tokudb/PerconaFT/CMakeLists.txt @@ -10,7 +10,9 @@ set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") # See: https://jira.percona.com/browse/TDB-93 -IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") +IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR + (CMAKE_COMPILER_IS_GNUCXX AND + NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)) # g++-9 or newer SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member") ENDIF() diff --git a/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake b/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake index 502fd192644..92897b88f25 100644 --- a/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake +++ b/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake @@ -46,31 +46,20 @@ endif (USE_GCOV) include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) -## adds a compiler flag if the compiler supports it -macro(set_cflags_if_supported_named flag flagname) - check_c_compiler_flag("${flag}" HAVE_C_${flagname}) - if (HAVE_C_${flagname}) - set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}") - endif () - check_cxx_compiler_flag("${flag}" HAVE_CXX_${flagname}) - if (HAVE_CXX_${flagname}) - set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}") - endif () -endmacro(set_cflags_if_supported_named) - -## adds a compiler flag if the compiler supports it -macro(set_cflags_if_supported) - foreach(flag ${ARGN}) - check_c_compiler_flag(${flag} HAVE_C_${flag}) - if (HAVE_C_${flag}) - set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}") - endif () - check_cxx_compiler_flag(${flag} HAVE_CXX_${flag}) - if (HAVE_CXX_${flag}) - set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}") - endif () - endforeach(flag) -endmacro(set_cflags_if_supported) +## prepends a compiler flag if the compiler supports it +MACRO (prepend_cflags_if_supported) + FOREACH (flag ${ARGN}) + STRING (REGEX REPLACE "-" "_" temp_flag ${flag}) + check_c_compiler_flag (${flag} HAVE_C_${temp_flag}) + IF (HAVE_C_${temp_flag}) + SET (CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}") + ENDIF () + check_cxx_compiler_flag (${flag} HAVE_CXX_${temp_flag}) + IF (HAVE_CXX_${temp_flag}) + SET (CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}") + ENDIF () + ENDFOREACH (flag) +ENDMACRO (prepend_cflags_if_supported) ## adds a linker flag if the compiler supports it macro(set_ldflags_if_supported) @@ -83,33 +72,18 @@ macro(set_ldflags_if_supported) endforeach(flag) endmacro(set_ldflags_if_supported) -if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING) - set (OPTIONAL_CFLAGS "${OPTIONAL_CFLAGS} -Wmissing-format-attribute") -endif() - ## disable some warnings -## missing-format-attribute causes warnings in some MySQL include files -## if the library is built as a part of TokuDB MySQL storage engine -set_cflags_if_supported( +prepend_cflags_if_supported( -Wno-missing-field-initializers -Wstrict-null-sentinel -Winit-self -Wswitch -Wtrampolines -Wlogical-op - ${OPTIONAL_CFLAGS} - -Wno-error=missing-format-attribute - -Wno-error=address-of-array-temporary - -Wno-error=tautological-constant-out-of-range-compare - -Wno-error=maybe-uninitialized - -Wno-ignored-attributes - -Wno-error=extern-c-compat - -Wno-pointer-bool-conversion -fno-rtti -fno-exceptions -Wno-error=nonnull-compare ) -## set_cflags_if_supported_named("-Weffc++" -Weffcpp) if (CMAKE_CXX_FLAGS MATCHES -fno-implicit-templates) # must append this because mysql sets -fno-implicit-templates and we need to override it @@ -121,27 +95,18 @@ endif() ## Clang has stricter POD checks. So, only enable this warning on our other builds (Linux + GCC) if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang) - set_cflags_if_supported( + prepend_cflags_if_supported( -Wpacked ) endif () option (PROFILING "Allow profiling and debug" ON) if (PROFILING) - set_cflags_if_supported( + prepend_cflags_if_supported( -fno-omit-frame-pointer ) endif () -## this hits with optimized builds somewhere in ftleaf_split, we don't -## know why but we don't think it's a big deal -set_cflags_if_supported( - -Wno-error=strict-overflow - ) -set_ldflags_if_supported( - -Wno-error=strict-overflow - ) - # new flag sets in MySQL 8.0 seem to explicitly disable this set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") @@ -179,7 +144,7 @@ else () endif () ## set warnings -set_cflags_if_supported( +prepend_cflags_if_supported( -Wextra -Wbad-function-cast -Wno-missing-noreturn @@ -188,7 +153,7 @@ set_cflags_if_supported( -Wmissing-declarations -Wpointer-arith -Wshadow - ${OPTIONAL_CFLAGS} + -Wmissing-format-attribute ## other flags to try: #-Wunsafe-loop-optimizations #-Wpointer-arith @@ -202,7 +167,7 @@ set_cflags_if_supported( if (NOT CMAKE_CXX_COMPILER_ID STREQUAL Clang) # Disabling -Wcast-align with clang. TODO: fix casting and re-enable it, someday. - set_cflags_if_supported(-Wcast-align) + prepend_cflags_if_supported(-Wcast-align) endif () ## always want these diff --git a/storage/tokudb/PerconaFT/ft/logger/logger.cc b/storage/tokudb/PerconaFT/ft/logger/logger.cc index 7258f5552e6..60280a94075 100644 --- a/storage/tokudb/PerconaFT/ft/logger/logger.cc +++ b/storage/tokudb/PerconaFT/ft/logger/logger.cc @@ -50,6 +50,9 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. #include "util/status.h" int writing_rollback = 0; +extern "C" { + uint force_recovery = 0; +} static const int log_format_version = TOKU_LOG_VERSION; diff --git a/storage/tokudb/PerconaFT/ft/serialize/rbtree_mhs.h b/storage/tokudb/PerconaFT/ft/serialize/rbtree_mhs.h index eb8c953b08c..31ffd7e1617 100644 --- a/storage/tokudb/PerconaFT/ft/serialize/rbtree_mhs.h +++ b/storage/tokudb/PerconaFT/ft/serialize/rbtree_mhs.h @@ -193,6 +193,7 @@ namespace MhsRbTree { BlockPair(OUUInt64 o, OUUInt64 s) : _offset(o), _size(s) {} BlockPair(const BlockPair &o) : _offset(o._offset), _size(o._size) {} + BlockPair& operator=(const BlockPair&) = default; int operator<(const BlockPair &rhs) const { return _offset < rhs._offset; diff --git a/storage/tokudb/PerconaFT/ft/tests/cachetable-simple-close.cc b/storage/tokudb/PerconaFT/ft/tests/cachetable-simple-close.cc index c1c4cb4f16e..a13e6d26d15 100644 --- a/storage/tokudb/PerconaFT/ft/tests/cachetable-simple-close.cc +++ b/storage/tokudb/PerconaFT/ft/tests/cachetable-simple-close.cc @@ -195,13 +195,13 @@ static void test_multiple_cachefiles(bool use_same_hash) { char fname1[strlen(TOKU_TEST_FILENAME) + sizeof("_1")]; strcpy(fname1, TOKU_TEST_FILENAME); - strncat(fname1, "_1", sizeof("_1")); + strcat(fname1, "_1"); char fname2[strlen(TOKU_TEST_FILENAME) + sizeof("_2")]; strcpy(fname2, TOKU_TEST_FILENAME); - strncat(fname2, "_2", sizeof("_2")); + strcat(fname2, "_2"); char fname3[strlen(TOKU_TEST_FILENAME) + sizeof("_3")]; strcpy(fname3, TOKU_TEST_FILENAME); - strncat(fname3, "_3", sizeof("_3")); + strcat(fname3, "_3"); unlink(fname1); unlink(fname2); @@ -280,10 +280,10 @@ static void test_evictor(void) { char fname1[strlen(TOKU_TEST_FILENAME) + sizeof("_1")]; strcpy(fname1, TOKU_TEST_FILENAME); - strncat(fname1, "_1", sizeof("_1")); + strcat(fname1, "_1"); char fname2[strlen(TOKU_TEST_FILENAME) + sizeof("_2")]; strcpy(fname2, TOKU_TEST_FILENAME); - strncat(fname2, "_2", sizeof("_2")); + strcat(fname2, "_2"); unlink(fname1); unlink(fname2); diff --git a/storage/tokudb/PerconaFT/ft/tests/ft-bfe-query.cc b/storage/tokudb/PerconaFT/ft/tests/ft-bfe-query.cc index 7abd2267a7e..1d6bc2fba7a 100644 --- a/storage/tokudb/PerconaFT/ft/tests/ft-bfe-query.cc +++ b/storage/tokudb/PerconaFT/ft/tests/ft-bfe-query.cc @@ -337,7 +337,7 @@ static void test_prefetching(void) { sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 1; sn.n_children = 3; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; uint64_t key1 = 100; diff --git a/storage/tokudb/PerconaFT/ft/tests/ft-clock-test.cc b/storage/tokudb/PerconaFT/ft/tests/ft-clock-test.cc index 00ff8cf204b..1a708b8e3cc 100644 --- a/storage/tokudb/PerconaFT/ft/tests/ft-clock-test.cc +++ b/storage/tokudb/PerconaFT/ft/tests/ft-clock-test.cc @@ -133,7 +133,7 @@ static void test1(int fd, FT ft_h, FTNODE *dn) { for (int i = 0; i < (*dn)->n_children; i++) { invariant(BP_STATE(*dn, i) == PT_AVAIL); } - (*dn)->dirty = 1; + (*dn)->set_dirty(); toku_ftnode_pe_callback(*dn, attr, ft_h, def_pe_finalize_impl, nullptr); toku_ftnode_pe_callback(*dn, attr, ft_h, def_pe_finalize_impl, nullptr); toku_ftnode_pe_callback(*dn, attr, ft_h, def_pe_finalize_impl, nullptr); @@ -246,7 +246,7 @@ static void test_serialize_nonleaf(void) { sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 1; sn.n_children = 2; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(2, sn.bp); DBT pivotkey; @@ -384,7 +384,7 @@ static void test_serialize_leaf(void) { sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = 2; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); DBT pivotkey; diff --git a/storage/tokudb/PerconaFT/ft/tests/ft-serialize-benchmark.cc b/storage/tokudb/PerconaFT/ft/tests/ft-serialize-benchmark.cc index d50488ae197..bd5df7862cd 100644 --- a/storage/tokudb/PerconaFT/ft/tests/ft-serialize-benchmark.cc +++ b/storage/tokudb/PerconaFT/ft/tests/ft-serialize-benchmark.cc @@ -95,7 +95,7 @@ static void test_serialize_leaf(int valsize, sn->layout_version_original = FT_LAYOUT_VERSION; sn->height = 0; sn->n_children = 8; - sn->dirty = 1; + sn->set_dirty(); sn->oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn->n_children, sn->bp); sn->pivotkeys.create_empty(); @@ -173,7 +173,7 @@ static void test_serialize_leaf(int valsize, for (int i = 0; i < ser_runs; i++) { gettimeofday(&t[0], NULL); ndd = NULL; - sn->dirty = 1; + sn->set_dirty(); r = toku_serialize_ftnode_to( fd, make_blocknum(20), sn, &ndd, true, ft->ft, false); invariant(r == 0); @@ -265,7 +265,7 @@ static void test_serialize_nonleaf(int valsize, sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 1; sn.n_children = 8; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); sn.pivotkeys.create_empty(); diff --git a/storage/tokudb/PerconaFT/ft/tests/ft-serialize-test.cc b/storage/tokudb/PerconaFT/ft/tests/ft-serialize-test.cc index 0cddaf19651..4fca8efad35 100644 --- a/storage/tokudb/PerconaFT/ft/tests/ft-serialize-test.cc +++ b/storage/tokudb/PerconaFT/ft/tests/ft-serialize-test.cc @@ -238,7 +238,7 @@ static void test_serialize_leaf_check_msn(enum ftnode_verify_type bft, sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = 2; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); DBT pivotkey; @@ -381,7 +381,7 @@ static void test_serialize_leaf_with_large_pivots(enum ftnode_verify_type bft, sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = nrows; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); @@ -538,7 +538,7 @@ static void test_serialize_leaf_with_many_rows(enum ftnode_verify_type bft, sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = 1; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; XMALLOC_N(sn.n_children, sn.bp); @@ -693,7 +693,7 @@ static void test_serialize_leaf_with_large_rows(enum ftnode_verify_type bft, sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = 1; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); @@ -845,7 +845,7 @@ static void test_serialize_leaf_with_empty_basement_nodes( sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = 7; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); DBT pivotkeys[6]; @@ -989,7 +989,7 @@ static void test_serialize_leaf_with_multiple_empty_basement_nodes( sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = 4; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); DBT pivotkeys[3]; @@ -1100,7 +1100,7 @@ static void test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) { sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 1; sn.n_children = 2; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(2, sn.bp); DBT pivotkey; diff --git a/storage/tokudb/PerconaFT/ft/tests/ft-test-header.cc b/storage/tokudb/PerconaFT/ft/tests/ft-test-header.cc index a23a3a60879..c668b9410c9 100644 --- a/storage/tokudb/PerconaFT/ft/tests/ft-test-header.cc +++ b/storage/tokudb/PerconaFT/ft/tests/ft-test-header.cc @@ -57,7 +57,7 @@ static void test_header (void) { assert(r==0); // now insert some info into the header FT ft = t->ft; - ft->h->dirty = 1; + ft->h->set_dirty(); // cast away const because we actually want to fiddle with the header // in this test *((int *) &ft->h->layout_version_original) = 13; diff --git a/storage/tokudb/PerconaFT/ft/tests/make-tree.cc b/storage/tokudb/PerconaFT/ft/tests/make-tree.cc index 761d672539b..fe950b60972 100644 --- a/storage/tokudb/PerconaFT/ft/tests/make-tree.cc +++ b/storage/tokudb/PerconaFT/ft/tests/make-tree.cc @@ -88,7 +88,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) leafnode->max_msn_applied_to_node_on_disk = msn; // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/mempool-115.cc b/storage/tokudb/PerconaFT/ft/tests/mempool-115.cc index e3a3bfa28dc..bf9a1aa1484 100644 --- a/storage/tokudb/PerconaFT/ft/tests/mempool-115.cc +++ b/storage/tokudb/PerconaFT/ft/tests/mempool-115.cc @@ -102,7 +102,7 @@ public: sn.layout_version_original = FT_LAYOUT_VERSION; sn.height = 0; sn.n_children = 2; - sn.dirty = 1; + sn.set_dirty(); sn.oldest_referenced_xid_known = TXNID_NONE; MALLOC_N(sn.n_children, sn.bp); DBT pivotkey; diff --git a/storage/tokudb/PerconaFT/ft/tests/msnfilter.cc b/storage/tokudb/PerconaFT/ft/tests/msnfilter.cc index c37dcd089f8..6d13eabfd93 100644 --- a/storage/tokudb/PerconaFT/ft/tests/msnfilter.cc +++ b/storage/tokudb/PerconaFT/ft/tests/msnfilter.cc @@ -161,7 +161,7 @@ append_leaf(FT_HANDLE ft, FTNODE leafnode, void *key, uint32_t keylen, void *val } // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/recovery-test5123.cc b/storage/tokudb/PerconaFT/ft/tests/recovery-test5123.cc index 8ac1cd62c50..02dc63fca7e 100644 --- a/storage/tokudb/PerconaFT/ft/tests/recovery-test5123.cc +++ b/storage/tokudb/PerconaFT/ft/tests/recovery-test5123.cc @@ -49,9 +49,9 @@ static void test_5123(void) { test_setup(TOKU_TEST_FILENAME, &logger, &ct); int r; - TXNID_PAIR one = {.parent_id64 = (TXNID)1, TXNID_NONE}; - TXNID_PAIR two = {.parent_id64 = (TXNID)2, TXNID_NONE}; - TXNID_PAIR three = {.parent_id64 = (TXNID)3, TXNID_NONE}; + TXNID_PAIR one = { (TXNID)1, TXNID_NONE}; + TXNID_PAIR two = { (TXNID)2, TXNID_NONE}; + TXNID_PAIR three = { (TXNID)3, TXNID_NONE}; toku_log_xbegin(logger, NULL, false, one, TXNID_PAIR_NONE); toku_log_xbegin(logger, NULL, false, three, TXNID_PAIR_NONE); diff --git a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-flush.cc b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-flush.cc index 06a26614885..5c73d281b98 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-flush.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-flush.cc @@ -245,7 +245,7 @@ doit (bool after_child_pin) { true ); assert(node->height == 1); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); if (after_child_pin) { assert(toku_bnc_nbytesinbuf(BNC(node, 0)) == 0); @@ -265,7 +265,7 @@ doit (bool after_child_pin) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); if (after_child_pin) { assert(BLB_NBYTESINDATA(node,0) > 0); diff --git a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-merge.cc b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-merge.cc index 1029dfef320..cab370274cb 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-merge.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-merge.cc @@ -270,7 +270,7 @@ doit (int state) { true ); assert(node->height == 1); - assert(!node->dirty); + assert(!node->dirty()); BLOCKNUM left_child, right_child; // cases where we expect the checkpoint to contain the merge if (state == ft_flush_aflter_merge || state == flt_flush_before_unpin_remove) { @@ -301,7 +301,7 @@ doit (int state) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 1); toku_unpin_ftnode(c_ft->ft, node); @@ -318,7 +318,7 @@ doit (int state) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 1); toku_unpin_ftnode(c_ft->ft, node); @@ -336,7 +336,7 @@ doit (int state) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 2); toku_unpin_ftnode(c_ft->ft, node); diff --git a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-rebalance.cc b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-rebalance.cc index 208ebe3ca31..87f66512642 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-rebalance.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-rebalance.cc @@ -284,7 +284,7 @@ doit (int state) { true ); assert(node->height == 1); - assert(!node->dirty); + assert(!node->dirty()); BLOCKNUM left_child, right_child; assert(node->n_children == 2); @@ -304,7 +304,7 @@ doit (int state) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 2); toku_unpin_ftnode(c_ft->ft, node); @@ -319,7 +319,7 @@ doit (int state) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 2); toku_unpin_ftnode(c_ft->ft, node); diff --git a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-split.cc b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-split.cc index 2b29de409b1..d5f7fe50f46 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-split.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test-checkpoint-during-split.cc @@ -260,7 +260,7 @@ doit (bool after_split) { true ); assert(node->height == 1); - assert(!node->dirty); + assert(!node->dirty()); BLOCKNUM left_child, right_child; if (after_split) { assert(node->n_children == 2); @@ -287,7 +287,7 @@ doit (bool after_split) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 1); toku_unpin_ftnode(c_ft->ft, node); @@ -302,7 +302,7 @@ doit (bool after_split) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 1); toku_unpin_ftnode(c_ft->ft, node); @@ -318,7 +318,7 @@ doit (bool after_split) { true ); assert(node->height == 0); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 1); assert(BLB_DATA(node, 0)->num_klpairs() == 2); toku_unpin_ftnode(c_ft->ft, node); diff --git a/storage/tokudb/PerconaFT/ft/tests/test-dirty-flushes-on-cleaner.cc b/storage/tokudb/PerconaFT/ft/tests/test-dirty-flushes-on-cleaner.cc index 460134ec353..e1937538471 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test-dirty-flushes-on-cleaner.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test-dirty-flushes-on-cleaner.cc @@ -199,7 +199,7 @@ doit (void) { &node, true ); - assert(node->dirty); + assert(node->dirty()); assert(node->n_children == 2); assert(BP_STATE(node,0) == PT_AVAIL); assert(BP_STATE(node,1) == PT_AVAIL); @@ -229,7 +229,7 @@ doit (void) { &node, true ); - assert(node->dirty); + assert(node->dirty()); assert(node->n_children == 2); assert(BP_STATE(node,0) == PT_AVAIL); assert(BP_STATE(node,1) == PT_AVAIL); @@ -250,7 +250,7 @@ doit (void) { &node, true ); - assert(node->dirty); + assert(node->dirty()); // we expect that this flushes its buffer, that // a merge is not done, and that the lookup diff --git a/storage/tokudb/PerconaFT/ft/tests/test-flushes-on-cleaner.cc b/storage/tokudb/PerconaFT/ft/tests/test-flushes-on-cleaner.cc index 89d7130e5f7..f9d4d1646b8 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test-flushes-on-cleaner.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test-flushes-on-cleaner.cc @@ -203,7 +203,7 @@ doit (bool keep_other_bn_in_memory) { &node, true ); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 2); // a hack to get the basement nodes evicted for (int i = 0; i < 20; i++) { @@ -249,7 +249,7 @@ doit (bool keep_other_bn_in_memory) { &node, true ); - assert(!node->dirty); + assert(!node->dirty()); assert(node->n_children == 2); assert(BP_STATE(node,0) == PT_AVAIL); if (keep_other_bn_in_memory) { @@ -273,7 +273,7 @@ doit (bool keep_other_bn_in_memory) { &node, true ); - assert(!node->dirty); + assert(!node->dirty()); // we expect that this flushes its buffer, that // a merge is not done, and that the lookup diff --git a/storage/tokudb/PerconaFT/ft/tests/test-pick-child-to-flush.cc b/storage/tokudb/PerconaFT/ft/tests/test-pick-child-to-flush.cc index 83dfd0244f4..29d07483f99 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test-pick-child-to-flush.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test-pick-child-to-flush.cc @@ -194,7 +194,7 @@ doit (void) { toku_pin_node_with_min_bfe(&node, node_internal, t); toku_ftnode_assert_fully_in_memory(node); assert(node->n_children == 2); - assert(!node->dirty); + assert(!node->dirty()); assert(toku_bnc_n_entries(node->bp[0].ptr.u.nonleaf) > 0); assert(toku_bnc_n_entries(node->bp[1].ptr.u.nonleaf) > 0); @@ -216,7 +216,7 @@ doit (void) { toku_pin_node_with_min_bfe(&node, node_internal, t); toku_ftnode_assert_fully_in_memory(node); - assert(node->dirty); + assert(node->dirty()); assert(node->n_children == 2); // child 0 should have empty buffer because it flushed // child 1 should still have message in buffer @@ -226,14 +226,14 @@ doit (void) { r = toku_checkpoint(cp, NULL, NULL, NULL, NULL, NULL, CLIENT_CHECKPOINT); assert_zero(r); toku_pin_node_with_min_bfe(&node, node_internal, t); - assert(!node->dirty); + assert(!node->dirty()); curr_child_to_flush = 1; num_flushes_called = 0; toku_ft_flush_some_child(t->ft, node, &fa); assert(num_flushes_called == 1); toku_pin_node_with_min_bfe(&node, node_internal, t); - assert(node->dirty); + assert(node->dirty()); toku_ftnode_assert_fully_in_memory(node); assert(node->n_children == 2); // both buffers should be empty now @@ -244,14 +244,14 @@ doit (void) { r = toku_checkpoint(cp, NULL, NULL, NULL, NULL, NULL, CLIENT_CHECKPOINT); assert_zero(r); toku_pin_node_with_min_bfe(&node, node_internal, t); - assert(!node->dirty); + assert(!node->dirty()); curr_child_to_flush = 0; num_flushes_called = 0; toku_ft_flush_some_child(t->ft, node, &fa); assert(num_flushes_called == 1); toku_pin_node_with_min_bfe(&node, node_internal, t); - assert(node->dirty); // nothing was flushed, but since we were trying to flush to a leaf, both become dirty + assert(node->dirty()); // nothing was flushed, but since we were trying to flush to a leaf, both become dirty toku_ftnode_assert_fully_in_memory(node); assert(node->n_children == 2); // both buffers should be empty now @@ -280,17 +280,17 @@ doit (void) { assert(num_flushes_called == 2); toku_pin_node_with_min_bfe(&node, node_internal, t); - assert(node->dirty); + assert(node->dirty()); toku_unpin_ftnode(t->ft, node); toku_pin_node_with_min_bfe(&node, node_leaf[0], t); - assert(node->dirty); + assert(node->dirty()); toku_unpin_ftnode(t->ft, node); toku_pin_node_with_min_bfe(&node, node_leaf[1], t); if (i == 0) { - assert(!node->dirty); + assert(!node->dirty()); } else { - assert(node->dirty); + assert(node->dirty()); } toku_unpin_ftnode(t->ft, node); } diff --git a/storage/tokudb/PerconaFT/ft/tests/test3884.cc b/storage/tokudb/PerconaFT/ft/tests/test3884.cc index cfb76424668..5de55b0daff 100644 --- a/storage/tokudb/PerconaFT/ft/tests/test3884.cc +++ b/storage/tokudb/PerconaFT/ft/tests/test3884.cc @@ -105,7 +105,7 @@ setup_ftnode_header(struct ftnode *node) node->layout_version = FT_LAYOUT_VERSION; node->layout_version_original = FT_LAYOUT_VERSION; node->height = 0; - node->dirty = 1; + node->set_dirty(); node->oldest_referenced_xid_known = TXNID_NONE; } diff --git a/storage/tokudb/PerconaFT/ft/tests/verify-bad-msn.cc b/storage/tokudb/PerconaFT/ft/tests/verify-bad-msn.cc index b10885c2e62..1ba5f1c2503 100644 --- a/storage/tokudb/PerconaFT/ft/tests/verify-bad-msn.cc +++ b/storage/tokudb/PerconaFT/ft/tests/verify-bad-msn.cc @@ -93,7 +93,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) // leafnode->max_msn_applied_to_node = msn; // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/verify-bad-pivots.cc b/storage/tokudb/PerconaFT/ft/tests/verify-bad-pivots.cc index c1d08ce41a6..42415a07765 100644 --- a/storage/tokudb/PerconaFT/ft/tests/verify-bad-pivots.cc +++ b/storage/tokudb/PerconaFT/ft/tests/verify-bad-pivots.cc @@ -77,7 +77,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) NULL); // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/verify-dup-in-leaf.cc b/storage/tokudb/PerconaFT/ft/tests/verify-dup-in-leaf.cc index 22a29c0ff69..e31b13c4f4d 100644 --- a/storage/tokudb/PerconaFT/ft/tests/verify-dup-in-leaf.cc +++ b/storage/tokudb/PerconaFT/ft/tests/verify-dup-in-leaf.cc @@ -78,7 +78,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) NULL); // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/verify-dup-pivots.cc b/storage/tokudb/PerconaFT/ft/tests/verify-dup-pivots.cc index 80189dd9804..009eda63999 100644 --- a/storage/tokudb/PerconaFT/ft/tests/verify-dup-pivots.cc +++ b/storage/tokudb/PerconaFT/ft/tests/verify-dup-pivots.cc @@ -77,7 +77,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) NULL); // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/verify-misrouted-msgs.cc b/storage/tokudb/PerconaFT/ft/tests/verify-misrouted-msgs.cc index a84aac1f063..5c639d8d28a 100644 --- a/storage/tokudb/PerconaFT/ft/tests/verify-misrouted-msgs.cc +++ b/storage/tokudb/PerconaFT/ft/tests/verify-misrouted-msgs.cc @@ -78,7 +78,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) NULL); // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-leaf.cc b/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-leaf.cc index ca413f52567..d55ec7a736f 100644 --- a/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-leaf.cc +++ b/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-leaf.cc @@ -80,7 +80,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) NULL); // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-pivots.cc b/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-pivots.cc index 6efa06913c2..ff231001c77 100644 --- a/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-pivots.cc +++ b/storage/tokudb/PerconaFT/ft/tests/verify-unsorted-pivots.cc @@ -77,7 +77,7 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) NULL); // don't forget to dirty the node - leafnode->dirty = 1; + leafnode->set_dirty(); } static void diff --git a/storage/tokudb/PerconaFT/ftcxx/cursor.hpp b/storage/tokudb/PerconaFT/ftcxx/cursor.hpp index 9ecc4d173c6..bde5dbf2c19 100644 --- a/storage/tokudb/PerconaFT/ftcxx/cursor.hpp +++ b/storage/tokudb/PerconaFT/ftcxx/cursor.hpp @@ -398,8 +398,8 @@ namespace ftcxx { {} bool operator()(const DBT *key, const DBT *val) { - _key = std::move(Slice(*key).owned()); - _val = std::move(Slice(*val).owned()); + _key = Slice(*key).owned(); + _val = Slice(*val).owned(); // Don't bulk fetch. return false; diff --git a/storage/tokudb/PerconaFT/locktree/lock_request.cc b/storage/tokudb/PerconaFT/locktree/lock_request.cc index b99eaff3d6a..19ec146a3f2 100644 --- a/storage/tokudb/PerconaFT/locktree/lock_request.cc +++ b/storage/tokudb/PerconaFT/locktree/lock_request.cc @@ -93,6 +93,10 @@ void lock_request::destroy(void) { toku_cond_destroy(&m_wait_cond); } +void lock_request::clearmem(char c) { + memset(this, c, sizeof(* this)); +} + // set the lock request parameters. this API allows a lock request to be reused. void lock_request::set(locktree *lt, TXNID txnid, const DBT *left_key, const DBT *right_key, lock_request::type lock_type, bool big_txn, void *extra) { invariant(m_state != state::PENDING); diff --git a/storage/tokudb/PerconaFT/locktree/lock_request.h b/storage/tokudb/PerconaFT/locktree/lock_request.h index 76ac953bafe..36c3fd26094 100644 --- a/storage/tokudb/PerconaFT/locktree/lock_request.h +++ b/storage/tokudb/PerconaFT/locktree/lock_request.h @@ -89,6 +89,7 @@ public: // effect: Destroys a lock request. void destroy(void); + void clearmem(char c); // effect: Resets the lock request parameters, allowing it to be reused. // requires: Lock request was already created at some point diff --git a/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race.cc b/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race.cc index 5c28701c49e..83436a651e1 100644 --- a/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race.cc +++ b/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race.cc @@ -83,7 +83,7 @@ namespace toku { } request.destroy(); - memset(&request, 0xab, sizeof request); + request.clearmem(0xab); toku_pthread_yield(); if ((i % 10) == 0) diff --git a/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race_3.cc b/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race_3.cc index 1a05b396f10..288cb08550d 100644 --- a/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race_3.cc +++ b/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race_3.cc @@ -96,7 +96,7 @@ namespace toku { } request.destroy(); - memset(&request, 0xab, sizeof request); + request.clearmem(0xab); toku_pthread_yield(); if ((i % 10) == 0) diff --git a/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_wait_race_2.cc b/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_wait_race_2.cc index 4b6dadd440f..cd3dc7b37ef 100644 --- a/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_wait_race_2.cc +++ b/storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_wait_race_2.cc @@ -98,7 +98,7 @@ namespace toku { } request.destroy(); - memset(&request, 0xab, sizeof request); + request.clearmem(0xab); toku_pthread_yield(); if ((i % 10) == 0) diff --git a/storage/tokudb/PerconaFT/src/tests/test.h b/storage/tokudb/PerconaFT/src/tests/test.h index ff464f55890..c5214961afd 100644 --- a/storage/tokudb/PerconaFT/src/tests/test.h +++ b/storage/tokudb/PerconaFT/src/tests/test.h @@ -428,14 +428,14 @@ static int env_del_multiple_test_no_array( /* Some macros for evaluating blocks or functions within the scope of a * transaction. */ #define IN_TXN_COMMIT(env, parent, txn, flags, expr) ({ \ - DB_TXN *(txn); \ + DB_TXN *txn; \ { int chk_r = (env)->txn_begin((env), (parent), &(txn), (flags)); CKERR(chk_r); } \ (expr); \ { int chk_r = (txn)->commit((txn), 0); CKERR(chk_r); } \ }) #define IN_TXN_ABORT(env, parent, txn, flags, expr) ({ \ - DB_TXN *(txn); \ + DB_TXN *txn; \ { int chk_r = (env)->txn_begin((env), (parent), &(txn), (flags)); CKERR(chk_r); } \ (expr); \ { int chk_r = (txn)->abort(txn); CKERR(chk_r); } \ diff --git a/storage/tokudb/PerconaFT/src/tests/test_mostly_seq.cc b/storage/tokudb/PerconaFT/src/tests/test_mostly_seq.cc index ecd88f3c5fe..55b2943e67f 100644 --- a/storage/tokudb/PerconaFT/src/tests/test_mostly_seq.cc +++ b/storage/tokudb/PerconaFT/src/tests/test_mostly_seq.cc @@ -68,7 +68,7 @@ seqinsert (int n, float p) { int v = i; DBT key, val; r = db->put(db, 0, dbt_init(&key, &k, sizeof k), dbt_init(&val, &v, sizeof v), 0); assert(r == 0); - if (random() <= RAND_MAX * p) { + if (random() <= static_cast<float>(RAND_MAX) * p) { k = htonl(i-1); v = i-1; r = db->put(db, 0, dbt_init(&key, &k, sizeof k), dbt_init(&val, &v, sizeof v), 0); assert(r == 0); diff --git a/storage/tokudb/PerconaFT/src/tests/threaded_stress_test_helpers.h b/storage/tokudb/PerconaFT/src/tests/threaded_stress_test_helpers.h index e232f327d10..1d8833adcba 100644 --- a/storage/tokudb/PerconaFT/src/tests/threaded_stress_test_helpers.h +++ b/storage/tokudb/PerconaFT/src/tests/threaded_stress_test_helpers.h @@ -432,17 +432,17 @@ tsv_print_perf_totals(const struct cli_args *cli_args, uint64_t *counters[], con } const struct perf_formatter perf_formatters[] = { - [HUMAN] = { + { /* HUMAN */ .header = human_print_perf_header, .iteration = human_print_perf_iteration, .totals = human_print_perf_totals }, - [CSV] = { + { /* CSV */ .header = csv_print_perf_header, .iteration = csv_print_perf_iteration, .totals = csv_print_perf_totals }, - [TSV] = { + { /* TSV */ .header = tsv_print_perf_header, .iteration = tsv_print_perf_iteration, .totals = tsv_print_perf_totals diff --git a/storage/tokudb/PerconaFT/src/ydb.cc b/storage/tokudb/PerconaFT/src/ydb.cc index ca8bf82009b..3e21ad0f837 100644 --- a/storage/tokudb/PerconaFT/src/ydb.cc +++ b/storage/tokudb/PerconaFT/src/ydb.cc @@ -90,9 +90,7 @@ extern int writing_rollback; int toku_close_trace_file (void) { return 0; } #endif -extern "C" { - uint force_recovery = 0; -} +extern uint force_recovery; // Set when env is panicked, never cleared. static int env_is_panicked = 0; diff --git a/storage/tokudb/PerconaFT/src/ydb_db.cc b/storage/tokudb/PerconaFT/src/ydb_db.cc index ac44b8e7fd3..f10535062e9 100644 --- a/storage/tokudb/PerconaFT/src/ydb_db.cc +++ b/storage/tokudb/PerconaFT/src/ydb_db.cc @@ -508,7 +508,7 @@ int toku_db_open_iname(DB * db, DB_TXN * txn, const char *iname_in_env, uint32_t struct lt_on_create_callback_extra on_create_extra = { .txn = txn, .ft_handle = db->i->ft_handle, - open_rw + .open_rw = false }; db->i->lt = db->dbenv->i->ltm.get_lt(db->i->dict_id, toku_ft_get_comparator(db->i->ft_handle), diff --git a/storage/tokudb/PerconaFT/tools/CMakeLists.txt b/storage/tokudb/PerconaFT/tools/CMakeLists.txt index 710a55a5957..b7627d00420 100644 --- a/storage/tokudb/PerconaFT/tools/CMakeLists.txt +++ b/storage/tokudb/PerconaFT/tools/CMakeLists.txt @@ -15,7 +15,7 @@ foreach(tool ${tools}) if ((CMAKE_BUILD_TYPE MATCHES "Debug") AND (CMAKE_CXX_FLAGS_DEBUG MATCHES " -DENABLED_DEBUG_SYNC")) if (MYSQL_BASE_VERSION VERSION_EQUAL "8.0") - target_link_libraries(${tool} sql_main sql_gis sql_main sql_dd sql_gis binlog rpl master slave ${ICU_LIBRARIES}) + target_link_libraries(${tool} sql_main sql_gis sql_main sql_dd sql_gis binlog rpl master slave minchassis ${ICU_LIBRARIES}) else () target_link_libraries(${tool} sql binlog rpl master slave) endif () diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb-slave.opt b/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb-slave.opt index b351df53683..276649effa0 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb-slave.opt +++ b/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb-slave.opt @@ -1,4 +1,4 @@ ---log-warnings=0 --slave-transaction-retries=0 +--slave-parallel-workers=2 --log-warnings=0 --slave-transaction-retries=0 diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result index 96084c64e4f..0da19762d50 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on,favor_range_scan=off create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=innodb; insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4); explain select x,id from t force index (x) where x=0 and id=0; diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result index becf3f1f6a6..db16b9e4500 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on,favor_range_scan=off create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=tokudb; insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4); explain select x,id from t force index (x) where x=0 and id=0; diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result index 186dfd0457f..d17a92c7c33 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on,favor_range_scan=off create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=innodb; insert into t values (0,0,0,0),(0,1,0,1); explain select c,a,b from t where c=0 and a=0 and b=1; diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result index 6f2913fafb9..2c200d2e610 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on,favor_range_scan=off create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=tokudb; insert into t values (0,0,0,0),(0,1,0,1); explain select c,a,b from t where c=0 and a=0 and b=1; |