mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Merge 10.2 into 10.3
This commit is contained in:
commit
b50ea90063
41 changed files with 403 additions and 222 deletions
|
@ -140,6 +140,7 @@ IF (NOT CPACK_GENERATOR)
|
|||
ENDIF(WIN32)
|
||||
ENDIF(NOT CPACK_GENERATOR)
|
||||
|
||||
INCLUDE(FeatureSummary)
|
||||
INCLUDE(misc)
|
||||
INCLUDE(mysql_version)
|
||||
INCLUDE(cpack_source_ignore_files)
|
||||
|
@ -434,12 +435,15 @@ ADD_SUBDIRECTORY(sql/share)
|
|||
IF(NOT WITHOUT_SERVER)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ADD_SUBDIRECTORY(sql)
|
||||
OPTION (WITH_EMBEDDED_SERVER "Compile MySQL with embedded server" OFF)
|
||||
IF(WITH_EMBEDDED_SERVER)
|
||||
ADD_SUBDIRECTORY(libmysqld)
|
||||
ADD_SUBDIRECTORY(libmysqld/examples)
|
||||
ADD_SUBDIRECTORY(unittest/embedded)
|
||||
OPTION (WITH_EMBEDDED_SERVER "Compile MariaDB with embedded server" OFF)
|
||||
IF(WITH_EMBEDDED_SERVER)
|
||||
ADD_SUBDIRECTORY(libmysqld)
|
||||
ADD_SUBDIRECTORY(libmysqld/examples)
|
||||
ADD_SUBDIRECTORY(unittest/embedded)
|
||||
ENDIF(WITH_EMBEDDED_SERVER)
|
||||
IF(NOT WIN32)
|
||||
ADD_FEATURE_INFO(EMBEDDED_SERVER WITH_EMBEDDED_SERVER "Embedded MariaDB Server Library")
|
||||
ENDIF()
|
||||
|
||||
IF(WITH_WSREP)
|
||||
ADD_SUBDIRECTORY(wsrep)
|
||||
|
@ -540,6 +544,13 @@ IF(WIN32 AND SIGNCODE)
|
|||
INSTALL(SCRIPT ${PROJECT_BINARY_DIR}/sign.cmake)
|
||||
ENDIF()
|
||||
|
||||
FEATURE_SUMMARY(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES VAR MARIADB_FEATURE_SUMMARY)
|
||||
|
||||
OPTION(FEATURE_SUMMARY "Print feature summary at the end of configure step" ON)
|
||||
IF (FEATURE_SUMMARY)
|
||||
MESSAGE_ONCE(SUMMARY "${MARIADB_FEATURE_SUMMARY}")
|
||||
ENDIF()
|
||||
|
||||
IF(NON_DISTRIBUTABLE_WARNING)
|
||||
MESSAGE(WARNING "
|
||||
You have linked MariaDB with ${NON_DISTRIBUTABLE_WARNING} libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with the Free Software Foundation.")
|
||||
|
|
|
@ -37,5 +37,6 @@ MACRO (CHECK_JEMALLOC)
|
|||
IF (NOT LIBJEMALLOC AND NOT WITH_JEMALLOC STREQUAL "auto")
|
||||
MESSAGE(FATAL_ERROR "jemalloc is not found")
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(JEMALLOC LIBJEMALLOC "Use the JeMalloc memory allocator")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
|
|
@ -33,6 +33,7 @@ MACRO (MYSQL_CHECK_NUMA)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
ADD_FEATURE_INFO(NUMA HAVE_LIBNUMA "NUMA memory allocation policy")
|
||||
IF(WITH_NUMA_LOWERCASE STREQUAL "auto" AND HAVE_LIBNUMA)
|
||||
MESSAGE_ONCE(numa "WITH_NUMA=AUTO: NUMA memory allocation policy enabled")
|
||||
ELSEIF(WITH_NUMA_LOWERCASE STREQUAL "auto" AND NOT HAVE_LIBNUMA)
|
||||
|
|
|
@ -49,7 +49,7 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||
LIST(REMOVE_AT SOURCES 0)
|
||||
STRING(TOUPPER ${plugin} plugin)
|
||||
STRING(TOLOWER ${plugin} target)
|
||||
|
||||
|
||||
IF (ARG_MANDATORY)
|
||||
UNSET(PLUGIN_${plugin} CACHE)
|
||||
SET(PLUGIN_${plugin} "YES")
|
||||
|
@ -110,11 +110,11 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||
SET(with_var "WITH_${plugin}")
|
||||
ENDIF()
|
||||
UNSET(${with_var} CACHE)
|
||||
|
||||
|
||||
IF(NOT ARG_DEPENDENCIES)
|
||||
SET(ARG_DEPENDENCIES)
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(NOT ARG_MODULE_OUTPUT_NAME)
|
||||
IF(ARG_STORAGE_ENGINE)
|
||||
SET(ARG_MODULE_OUTPUT_NAME "ha_${target}")
|
||||
|
@ -256,6 +256,16 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}")
|
||||
ENDIF()
|
||||
|
||||
GET_TARGET_PROPERTY(plugin_type ${target} TYPE)
|
||||
STRING(REGEX REPLACE "_LIBRARY$" "" plugin_type ${plugin_type})
|
||||
STRING(REGEX REPLACE "^NO$" "" plugin_type ${plugin_type})
|
||||
IF(ARG_STORAGE_ENGINE)
|
||||
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Storage Engine ${plugin_type}")
|
||||
ELSEIF(ARG_CLIENT)
|
||||
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Client plugin ${plugin_type}")
|
||||
ELSE()
|
||||
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Server plugin ${plugin_type}")
|
||||
ENDIF()
|
||||
ENDIF(NOT WITHOUT_SERVER OR ARG_CLIENT)
|
||||
ENDMACRO()
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ MACRO (MYSQL_CHECK_MULTIBYTE)
|
|||
ENDMACRO()
|
||||
|
||||
MACRO (FIND_CURSES)
|
||||
FIND_PACKAGE(Curses)
|
||||
FIND_PACKAGE(Curses REQUIRED)
|
||||
MARK_AS_ADVANCED(CURSES_CURSES_H_PATH CURSES_FORM_LIBRARY CURSES_HAVE_CURSES_H)
|
||||
IF(NOT CURSES_FOUND)
|
||||
SET(ERRORMSG "Curses library not found. Please install appropriate package,
|
||||
|
|
|
@ -126,6 +126,7 @@ MACRO (MYSQL_CHECK_SSL)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
FIND_PACKAGE(OpenSSL)
|
||||
SET_PACKAGE_PROPERTIES(OpenSSL PROPERTIES TYPE RECOMMENDED)
|
||||
IF(OPENSSL_FOUND)
|
||||
SET(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY})
|
||||
INCLUDE(CheckSymbolExists)
|
||||
|
|
|
@ -65,5 +65,6 @@ MACRO(CHECK_SYSTEMD)
|
|||
ELSEIF(NOT WITH_SYSTEMD STREQUAL "no")
|
||||
MESSAGE(FATAL_ERROR "Invalid value for WITH_SYSTEMD. Must be 'yes', 'no', or 'auto'.")
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(SYSTEMD LIBSYSTEMD "Systemd scripts and notification support")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
|
|
@ -41,3 +41,6 @@ SET(WSREP_PROC_INFO ${WITH_WSREP})
|
|||
IF(WITH_WSREP)
|
||||
SET(WSREP_PATCH_VERSION "wsrep_${WSREP_VERSION}")
|
||||
ENDIF()
|
||||
IF (NOT WIN32)
|
||||
ADD_FEATURE_INFO(WSREP WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)")
|
||||
ENDIF()
|
||||
|
|
|
@ -170,6 +170,7 @@ IF(UNIX)
|
|||
SET(LIBWRAP "wrap")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(LIBWRAP HAVE_LIBWRAP "Support for tcp wrappers")
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
|
|
|
@ -85,9 +85,9 @@ typedef void fil_space_t;
|
|||
/* Global variables */
|
||||
static bool verbose;
|
||||
static bool just_count;
|
||||
static unsigned long long start_page;
|
||||
static unsigned long long end_page;
|
||||
static unsigned long long do_page;
|
||||
static uint32_t start_page;
|
||||
static uint32_t end_page;
|
||||
static uint32_t do_page;
|
||||
static bool use_end_page;
|
||||
static bool do_one_page;
|
||||
static my_bool do_leaf;
|
||||
|
@ -100,9 +100,9 @@ ulong srv_page_size;
|
|||
ulong srv_page_size_shift;
|
||||
page_size_t univ_page_size(0, 0, false);
|
||||
/* Current page number (0 based). */
|
||||
unsigned long long cur_page_num;
|
||||
uint32_t cur_page_num;
|
||||
/* Current space. */
|
||||
unsigned long long cur_space;
|
||||
uint32_t cur_space;
|
||||
/* Skip the checksum verification. */
|
||||
static bool no_check;
|
||||
/* Enabled for strict checksum verification. */
|
||||
|
@ -492,11 +492,11 @@ is_page_corrupted(
|
|||
/* enable if page is corrupted. */
|
||||
bool is_corrupted;
|
||||
/* use to store LSN values. */
|
||||
ulint logseq;
|
||||
ulint logseqfield;
|
||||
uint32_t logseq;
|
||||
uint32_t logseqfield;
|
||||
ulint page_type = mach_read_from_2(buf+FIL_PAGE_TYPE);
|
||||
uint key_version = mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
|
||||
ulint space_id = mach_read_from_4(
|
||||
uint32_t key_version = mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
|
||||
uint32_t space_id = mach_read_from_4(
|
||||
buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
|
||||
|
||||
if (mach_read_from_4(buf + FIL_PAGE_OFFSET) != cur_page_num
|
||||
|
@ -509,8 +509,8 @@ is_page_corrupted(
|
|||
|
||||
if (is_log_enabled) {
|
||||
fprintf(log_file,
|
||||
"page id mismatch space::" ULINTPF
|
||||
" page::%llu \n",
|
||||
"page id mismatch space::" UINT32PF
|
||||
" page::" UINT32PF " \n",
|
||||
space_id, cur_page_num);
|
||||
}
|
||||
|
||||
|
@ -537,13 +537,14 @@ is_page_corrupted(
|
|||
|
||||
if (is_log_enabled) {
|
||||
fprintf(log_file,
|
||||
"space::" ULINTPF " page::%llu"
|
||||
"; log sequence number:first = " ULINTPF
|
||||
"; second = " ULINTPF "\n",
|
||||
"space::" UINT32PF " page::" UINT32PF
|
||||
"; log sequence number:first = " UINT32PF
|
||||
"; second = " UINT32PF "\n",
|
||||
space_id, cur_page_num, logseq, logseqfield);
|
||||
if (logseq != logseqfield) {
|
||||
fprintf(log_file,
|
||||
"Fail; space::" ULINTPF " page::%llu"
|
||||
"Fail; space::" UINT32PF
|
||||
" page::" UINT32PF
|
||||
" invalid (fails log "
|
||||
"sequence number check)\n",
|
||||
space_id, cur_page_num);
|
||||
|
@ -565,9 +566,9 @@ is_page_corrupted(
|
|||
page_size);
|
||||
if (is_corrupted && log_file) {
|
||||
fprintf(log_file,
|
||||
"[page id: space=" ULINTPF
|
||||
", page_number=%llu] may be corrupted;"
|
||||
" key_version=%u\n",
|
||||
"[page id: space=" UINT32PF
|
||||
", page_number=" UINT32PF "] may be corrupted;"
|
||||
" key_version=" UINT32PF "\n",
|
||||
space_id, cur_page_num,
|
||||
mach_read_from_4(
|
||||
FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
|
||||
|
@ -678,8 +679,8 @@ update_checksum(
|
|||
|
||||
mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, checksum);
|
||||
if (is_log_enabled) {
|
||||
fprintf(log_file, "page::%llu; Updated checksum ="
|
||||
" %u\n", cur_page_num, checksum);
|
||||
fprintf(log_file, "page::" UINT32PF "; Updated checksum ="
|
||||
" " UINT32PF "\n", cur_page_num, checksum);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -709,8 +710,8 @@ update_checksum(
|
|||
|
||||
mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, checksum);
|
||||
if (is_log_enabled) {
|
||||
fprintf(log_file, "page::%llu; Updated checksum field1"
|
||||
" = %u\n", cur_page_num, checksum);
|
||||
fprintf(log_file, "page::" UINT32PF "; Updated checksum field1"
|
||||
" = " UINT32PF "\n", cur_page_num, checksum);
|
||||
}
|
||||
|
||||
if (write_check == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB
|
||||
|
@ -723,8 +724,8 @@ update_checksum(
|
|||
FIL_PAGE_END_LSN_OLD_CHKSUM,checksum);
|
||||
|
||||
if (is_log_enabled) {
|
||||
fprintf(log_file, "page::%llu; Updated checksum "
|
||||
"field2 = %u\n", cur_page_num, checksum);
|
||||
fprintf(log_file, "page::" UINT32PF "; Updated checksum "
|
||||
"field2 = " UINT32PF "\n", cur_page_num, checksum);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -798,7 +799,7 @@ write_file(
|
|||
|
||||
if (page_size
|
||||
!= fwrite(buf, 1, page_size, file == stdin ? stdout : file)) {
|
||||
fprintf(stderr, "Failed to write page::%llu to %s: %s\n",
|
||||
fprintf(stderr, "Failed to write page::" UINT32PF " to %s: %s\n",
|
||||
cur_page_num, filename, strerror(errno));
|
||||
|
||||
return(false);
|
||||
|
@ -816,8 +817,8 @@ write_file(
|
|||
}
|
||||
|
||||
// checks using current xdes page whether the page is free
|
||||
static bool page_is_free(const byte *xdes, page_size_t page_size,
|
||||
ulonglong page_no)
|
||||
static inline bool is_page_free(const byte *xdes, page_size_t page_size,
|
||||
uint32_t page_no)
|
||||
{
|
||||
const byte *des=
|
||||
xdes + XDES_ARR_OFFSET +
|
||||
|
@ -842,12 +843,10 @@ parse_page(
|
|||
bool is_encrypted)
|
||||
{
|
||||
unsigned long long id;
|
||||
ulint undo_page_type;
|
||||
uint16_t undo_page_type;
|
||||
char str[20]={'\0'};
|
||||
ulint n_recs;
|
||||
ulint page_no;
|
||||
ulint left_page_no;
|
||||
ulint right_page_no;
|
||||
uint32_t page_no, left_page_no, right_page_no;
|
||||
ulint data_bytes;
|
||||
bool is_leaf;
|
||||
ulint size_range_id;
|
||||
|
@ -862,7 +861,7 @@ parse_page(
|
|||
switch (mach_read_from_2(page + FIL_PAGE_TYPE)) {
|
||||
|
||||
case FIL_PAGE_INDEX: {
|
||||
uint key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
|
||||
uint32_t key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
|
||||
page_type.n_fil_page_index++;
|
||||
|
||||
/* If page is encrypted we can't read index header */
|
||||
|
@ -886,7 +885,7 @@ parse_page(
|
|||
is_leaf = (!*(const uint16*) (page + (PAGE_HEADER + PAGE_LEVEL)));
|
||||
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tIndex page\t\t\t|"
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tIndex page\t\t\t|"
|
||||
"\tindex id=%llu,", cur_page_num, id);
|
||||
|
||||
fprintf(file,
|
||||
|
@ -905,13 +904,13 @@ parse_page(
|
|||
size_range_id = SIZE_RANGES_FOR_PAGE + 1;
|
||||
}
|
||||
if (per_page_details) {
|
||||
printf("index id=%llu page " ULINTPF " leaf %d n_recs " ULINTPF " data_bytes " ULINTPF
|
||||
printf("index id=%llu page " UINT32PF " leaf %d n_recs " ULINTPF " data_bytes " ULINTPF
|
||||
"\n", id, page_no, is_leaf, n_recs, data_bytes);
|
||||
}
|
||||
/* update per-index statistics */
|
||||
{
|
||||
per_index_stats &index = index_ids[id];
|
||||
if (page_is_free(xdes, page_size, page_no)) {
|
||||
if (is_page_free(xdes, page_size, page_no)) {
|
||||
index.free_pages++;
|
||||
return;
|
||||
}
|
||||
|
@ -939,8 +938,8 @@ parse_page(
|
|||
index.pages_in_size_range[size_range_id] ++;
|
||||
}
|
||||
} else {
|
||||
fprintf(file, "#::%llu\t\t|\t\tEncrypted Index page\t\t\t|"
|
||||
"\tkey_version %u,%s\n", cur_page_num, key_version, str);
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tEncrypted Index page\t\t\t|"
|
||||
"\tkey_version " UINT32PF ",%s\n", cur_page_num, key_version, str);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -950,7 +949,7 @@ parse_page(
|
|||
undo_page_type = mach_read_from_2(page +
|
||||
TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE);
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tUndo log page\t\t\t|",
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tUndo log page\t\t\t|",
|
||||
cur_page_num);
|
||||
}
|
||||
page_type.n_undo++;
|
||||
|
@ -1002,7 +1001,7 @@ parse_page(
|
|||
case FIL_PAGE_INODE:
|
||||
page_type.n_fil_page_inode++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tInode page\t\t\t|"
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tInode page\t\t\t|"
|
||||
"\t%s\n",cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1010,7 +1009,7 @@ parse_page(
|
|||
case FIL_PAGE_IBUF_FREE_LIST:
|
||||
page_type.n_fil_page_ibuf_free_list++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tInsert buffer free list"
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tInsert buffer free list"
|
||||
" page\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1018,7 +1017,7 @@ parse_page(
|
|||
case FIL_PAGE_TYPE_ALLOCATED:
|
||||
page_type.n_fil_page_type_allocated++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tFreshly allocated "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tFreshly allocated "
|
||||
"page\t\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1026,7 +1025,7 @@ parse_page(
|
|||
case FIL_PAGE_IBUF_BITMAP:
|
||||
page_type.n_fil_page_ibuf_bitmap++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tInsert Buffer "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tInsert Buffer "
|
||||
"Bitmap\t\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1034,15 +1033,15 @@ parse_page(
|
|||
case FIL_PAGE_TYPE_SYS:
|
||||
page_type.n_fil_page_type_sys++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tSystem page\t\t\t|"
|
||||
"\t%s\n",cur_page_num, str);
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tSystem page\t\t\t|"
|
||||
"\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
||||
case FIL_PAGE_TYPE_TRX_SYS:
|
||||
page_type.n_fil_page_type_trx_sys++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tTransaction system "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tTransaction system "
|
||||
"page\t\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1050,7 +1049,7 @@ parse_page(
|
|||
case FIL_PAGE_TYPE_FSP_HDR:
|
||||
page_type.n_fil_page_type_fsp_hdr++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tFile Space "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tFile Space "
|
||||
"Header\t\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1058,7 +1057,7 @@ parse_page(
|
|||
case FIL_PAGE_TYPE_XDES:
|
||||
page_type.n_fil_page_type_xdes++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tExtent descriptor "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tExtent descriptor "
|
||||
"page\t\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1066,7 +1065,7 @@ parse_page(
|
|||
case FIL_PAGE_TYPE_BLOB:
|
||||
page_type.n_fil_page_type_blob++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tBLOB page\t\t\t|\t%s\n",
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tBLOB page\t\t\t|\t%s\n",
|
||||
cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1074,7 +1073,7 @@ parse_page(
|
|||
case FIL_PAGE_TYPE_ZBLOB:
|
||||
page_type.n_fil_page_type_zblob++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tCompressed BLOB "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tCompressed BLOB "
|
||||
"page\t\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1082,7 +1081,7 @@ parse_page(
|
|||
case FIL_PAGE_TYPE_ZBLOB2:
|
||||
page_type.n_fil_page_type_zblob2++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tSubsequent Compressed "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tSubsequent Compressed "
|
||||
"BLOB page\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1090,7 +1089,7 @@ parse_page(
|
|||
case FIL_PAGE_PAGE_COMPRESSED:
|
||||
page_type.n_fil_page_type_page_compressed++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tPage compressed "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tPage compressed "
|
||||
"page\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1098,7 +1097,7 @@ parse_page(
|
|||
case FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED:
|
||||
page_type.n_fil_page_type_page_compressed_encrypted++;
|
||||
if (page_type_dump) {
|
||||
fprintf(file, "#::%llu\t\t|\t\tPage compressed encrypted "
|
||||
fprintf(file, "#::" UINT32PF "\t\t|\t\tPage compressed encrypted "
|
||||
"page\t|\t%s\n", cur_page_num, str);
|
||||
}
|
||||
break;
|
||||
|
@ -1250,14 +1249,14 @@ static struct my_option innochecksum_options[] = {
|
|||
{"count", 'c', "Print the count of pages in the file and exits.",
|
||||
&just_count, &just_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"start_page", 's', "Start on this page number (0 based).",
|
||||
&start_page, &start_page, 0, GET_ULL, REQUIRED_ARG,
|
||||
0, 0, ULLONG_MAX, 0, 1, 0},
|
||||
&start_page, &start_page, 0, GET_UINT, REQUIRED_ARG,
|
||||
0, 0, FIL_NULL, 0, 1, 0},
|
||||
{"end_page", 'e', "End at this page number (0 based).",
|
||||
&end_page, &end_page, 0, GET_ULL, REQUIRED_ARG,
|
||||
0, 0, ULLONG_MAX, 0, 1, 0},
|
||||
&end_page, &end_page, 0, GET_UINT, REQUIRED_ARG,
|
||||
0, 0, FIL_NULL, 0, 1, 0},
|
||||
{"page", 'p', "Check only this page (0 based).",
|
||||
&do_page, &do_page, 0, GET_ULL, REQUIRED_ARG,
|
||||
0, 0, ULLONG_MAX, 0, 1, 0},
|
||||
&do_page, &do_page, 0, GET_UINT, REQUIRED_ARG,
|
||||
0, 0, FIL_NULL, 0, 1, 0},
|
||||
{"strict-check", 'C', "Specify the strict checksum algorithm by the user.",
|
||||
&strict_check, &strict_check, &innochecksum_algorithms_typelib,
|
||||
GET_ENUM, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -1451,14 +1450,14 @@ bool check_encryption(
|
|||
return false;
|
||||
}
|
||||
|
||||
uint min_key_version = mach_read_from_4
|
||||
uint32_t min_key_version = mach_read_from_4
|
||||
(page + offset + MAGIC_SZ + 2 + iv_length);
|
||||
|
||||
uint key_id = mach_read_from_4
|
||||
uint32_t key_id = mach_read_from_4
|
||||
(page + offset + MAGIC_SZ + 2 + iv_length + 4);
|
||||
|
||||
if (type == CRYPT_SCHEME_1 && is_log_enabled) {
|
||||
fprintf(log_file,"Tablespace %s encrypted key_version %u key_id %u\n",
|
||||
fprintf(log_file,"Tablespace %s encrypted key_version " UINT32PF " key_id " UINT32PF "\n",
|
||||
filename, min_key_version, key_id);
|
||||
}
|
||||
|
||||
|
@ -1489,7 +1488,7 @@ int verify_checksum(
|
|||
buf, page_size, is_encrypted, is_compressed);
|
||||
|
||||
if (is_corrupted) {
|
||||
fprintf(stderr, "Fail: page::%llu invalid\n",
|
||||
fprintf(stderr, "Fail: page::" UINT32PF " invalid\n",
|
||||
cur_page_num);
|
||||
|
||||
(*mismatch_count)++;
|
||||
|
@ -1575,7 +1574,7 @@ int main(
|
|||
/* size of file (has to be 64 bits) */
|
||||
unsigned long long int size = 0;
|
||||
/* number of pages in file */
|
||||
ulint pages;
|
||||
uint32_t pages;
|
||||
|
||||
off_t offset = 0;
|
||||
/* count the no. of page corrupted. */
|
||||
|
@ -1780,7 +1779,7 @@ int main(
|
|||
}
|
||||
|
||||
if (per_page_details) {
|
||||
printf("page %llu ", cur_page_num);
|
||||
printf("page " UINT32PF " ", cur_page_num);
|
||||
}
|
||||
|
||||
memcpy(xdes, buf, physical_page_size);
|
||||
|
@ -1789,29 +1788,29 @@ int main(
|
|||
parse_page(buf, xdes, fil_page_type, page_size, is_encrypted);
|
||||
}
|
||||
|
||||
pages = (ulint) (size / page_size.physical());
|
||||
pages = uint32_t(size / page_size.physical());
|
||||
|
||||
if (just_count) {
|
||||
if (read_from_stdin) {
|
||||
fprintf(stderr, "Number of pages:" ULINTPF "\n", pages);
|
||||
} else {
|
||||
printf("Number of pages:" ULINTPF "\n", pages);
|
||||
}
|
||||
fprintf(read_from_stdin ? stderr : stdout,
|
||||
"Number of pages:" UINT32PF "\n", pages);
|
||||
continue;
|
||||
} else if (verbose && !read_from_stdin) {
|
||||
if (is_log_enabled) {
|
||||
fprintf(log_file, "file %s = %llu bytes "
|
||||
"(" ULINTPF " pages)\n", filename, size, pages);
|
||||
"(" UINT32PF " pages)\n",
|
||||
filename, size, pages);
|
||||
if (do_one_page) {
|
||||
fprintf(log_file, "Innochecksum: "
|
||||
"checking page::%llu;\n",
|
||||
"checking page::"
|
||||
UINT32PF ";\n",
|
||||
do_page);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (is_log_enabled) {
|
||||
fprintf(log_file, "Innochecksum: checking "
|
||||
"pages in range::%llu to %llu\n",
|
||||
"pages in range::" UINT32PF
|
||||
" to " UINT32PF "\n",
|
||||
start_page, use_end_page ?
|
||||
end_page : (pages - 1));
|
||||
}
|
||||
|
@ -1855,8 +1854,8 @@ int main(
|
|||
the desired page. */
|
||||
partial_page_read = false;
|
||||
|
||||
offset = (off_t) start_page
|
||||
* (off_t) page_size.physical();
|
||||
offset = off_t(ulonglong(start_page)
|
||||
* page_size.physical());
|
||||
#ifdef _WIN32
|
||||
if (_fseeki64(fil_in, offset, SEEK_SET)) {
|
||||
#else
|
||||
|
@ -1901,12 +1900,7 @@ int main(
|
|||
count++;
|
||||
|
||||
if (!bytes || feof(fil_in)) {
|
||||
fprintf(stderr, "Error: Unable "
|
||||
"to seek to necessary "
|
||||
"offset");
|
||||
|
||||
exit_status = 1;
|
||||
goto my_exit;
|
||||
goto unexpected_eof;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1923,6 +1917,15 @@ int main(
|
|||
partial_page_read = false;
|
||||
|
||||
if (!bytes && feof(fil_in)) {
|
||||
if (cur_page_num == start_page) {
|
||||
unexpected_eof:
|
||||
fputs("Error: Unable "
|
||||
"to seek to necessary offset\n",
|
||||
stderr);
|
||||
|
||||
exit_status = 1;
|
||||
goto my_exit;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1962,10 +1965,10 @@ first_non_zero:
|
|||
|
||||
/* If no-check is enabled, skip the
|
||||
checksum verification.*/
|
||||
if (!no_check
|
||||
&& !page_is_free(xdes, page_size, cur_page_num)
|
||||
&& !skip_page
|
||||
&& (exit_status = verify_checksum(
|
||||
if (!no_check &&
|
||||
!is_page_free(xdes, page_size, cur_page_num) &&
|
||||
!skip_page &&
|
||||
(exit_status = verify_checksum(
|
||||
buf, page_size,
|
||||
is_encrypted, is_compressed,
|
||||
&mismatch_count))) {
|
||||
|
@ -1983,7 +1986,7 @@ first_non_zero:
|
|||
}
|
||||
|
||||
if (per_page_details) {
|
||||
printf("page %llu ", cur_page_num);
|
||||
printf("page " UINT32PF " ", cur_page_num);
|
||||
}
|
||||
|
||||
if (page_get_page_no(buf) % physical_page_size == 0) {
|
||||
|
@ -2003,10 +2006,10 @@ first_non_zero:
|
|||
if (!lastt) {
|
||||
lastt= now;
|
||||
} else if (now - lastt >= 1 && is_log_enabled) {
|
||||
fprintf(log_file, "page::%llu "
|
||||
fprintf(log_file, "page::" UINT32PF " "
|
||||
"okay: %.3f%% done\n",
|
||||
(cur_page_num - 1),
|
||||
(float) cur_page_num / pages * 100);
|
||||
(double) cur_page_num / pages * 100);
|
||||
lastt = now;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
|
||||
OPTION(WITH_MARIABACKUP "Include mariabackup" ON)
|
||||
ADD_FEATURE_INFO(MARIABACKUP WITH_MARIABACKUP "MariaDB Backup Utility")
|
||||
IF(NOT WITH_MARIABACKUP)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 7d3d7c5ff4a9772cf6c73901757d6e39c6a20e99
|
||||
Subproject commit 490100ccacedc7aeb89b634fd3f7648a59d096b4
|
|
@ -3733,7 +3733,7 @@ select * from t1 as t;
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t ALL NULL NULL NULL NULL 4 100.00
|
||||
Warnings:
|
||||
Note 1003 with recursive cte as (/* select#2 */ select `*` AS `*` from `test`.`t1` where `a` = 1 union /* select#3 */ select `a` + 1 AS `a+1` from `cte` where `a` < 3)/* select#1 */ select `test`.`t`.`a` AS `a` from `test`.`t1` `t`
|
||||
Note 1003 with recursive cte as (/* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union /* select#3 */ select `cte`.`a` + 1 AS `a+1` from `cte` where `cte`.`a` < 3)/* select#1 */ select `test`.`t`.`a` AS `a` from `test`.`t1` `t`
|
||||
with recursive cte as
|
||||
(select * from t1 where a=1 union select a+1 from cte where a<3)
|
||||
select * from t1 as t;
|
||||
|
@ -3746,10 +3746,10 @@ create table t2 ( i1 int, i2 int);
|
|||
insert into t2 values (1,1),(2,2);
|
||||
explain
|
||||
with recursive cte as
|
||||
( select * from t1 union select s1.* from t1 as s1, cte where s1.i1 = cte.i2 )
|
||||
select * from t1 as t;
|
||||
( select * from t2 union select s1.* from t2 as s1, cte where s1.i1 = cte.i2 )
|
||||
select * from t2 as t;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t ALL NULL NULL NULL NULL 4
|
||||
1 PRIMARY t ALL NULL NULL NULL NULL 2
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-22042: ANALYZE of query using stored function and recursive CTE
|
||||
|
@ -4527,6 +4527,44 @@ b
|
|||
deallocate prepare stmt;
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-26189: Unknown column reference within hanging recursive CTE
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (3), (7), (1);
|
||||
with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.a = r.b)
|
||||
select * from t1 as t;
|
||||
ERROR 42S22: Unknown column 'r.b' in 'where clause'
|
||||
explain with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.a = r.b)
|
||||
select * from t1 as t;
|
||||
ERROR 42S22: Unknown column 'r.b' in 'where clause'
|
||||
create procedure sp1() with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.a = r.b)
|
||||
select * from t1 as t;
|
||||
call sp1();
|
||||
ERROR 42S22: Unknown column 'r.b' in 'where clause'
|
||||
call sp1();
|
||||
ERROR 42S22: Unknown column 'r.b' in 'where clause'
|
||||
with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.b = r.a)
|
||||
select * from t1 as t;
|
||||
ERROR 42S22: Unknown column 's1.b' in 'where clause'
|
||||
explain with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.b = r.a)
|
||||
select * from t1 as t;
|
||||
ERROR 42S22: Unknown column 's1.b' in 'where clause'
|
||||
create procedure sp2() with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.b = r.a)
|
||||
select * from t1 as t;
|
||||
call sp2();
|
||||
ERROR 42S22: Unknown column 's1.b' in 'where clause'
|
||||
call sp2();
|
||||
ERROR 42S22: Unknown column 's1.b' in 'where clause'
|
||||
drop procedure sp1;
|
||||
drop procedure sp2;
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -2590,8 +2590,8 @@ insert into t2 values (1,1),(2,2);
|
|||
|
||||
explain
|
||||
with recursive cte as
|
||||
( select * from t1 union select s1.* from t1 as s1, cte where s1.i1 = cte.i2 )
|
||||
select * from t1 as t;
|
||||
( select * from t2 union select s1.* from t2 as s1, cte where s1.i1 = cte.i2 )
|
||||
select * from t2 as t;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
|
@ -2875,6 +2875,50 @@ deallocate prepare stmt;
|
|||
|
||||
drop table t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26189: Unknown column reference within hanging recursive CTE
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
insert into t1 values (3), (7), (1);
|
||||
|
||||
let $q1=
|
||||
with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.a = r.b)
|
||||
select * from t1 as t;
|
||||
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
eval $q1;
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
eval explain $q1;
|
||||
|
||||
eval create procedure sp1() $q1;
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
call sp1();
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
call sp1();
|
||||
|
||||
let $q2=
|
||||
with recursive
|
||||
r as (select * from t1 union select s1.* from t1 as s1, r where s1.b = r.a)
|
||||
select * from t1 as t;
|
||||
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
eval $q2;
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
eval explain $q2;
|
||||
|
||||
eval create procedure sp2() $q2;
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
call sp2();
|
||||
--ERROR ER_BAD_FIELD_ERROR
|
||||
call sp2();
|
||||
|
||||
drop procedure sp1;
|
||||
drop procedure sp2;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
|
|
@ -23,6 +23,7 @@ INSERT INTO t1 VALUES (1, 'abc');
|
|||
SHOW TABLE STATUS LIKE 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
|
||||
t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL 0 N
|
||||
CREATE TABLE t2 (b VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL) ENGINE=InnoDB;
|
||||
SET GLOBAL innodb_default_row_format = DYNAMIC;
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY;
|
||||
# Here we expect DYNAMIC because there is no explicit ROW_FORMAT and the
|
||||
|
@ -31,6 +32,10 @@ SHOW TABLE STATUS LIKE 't1';
|
|||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
|
||||
t1 InnoDB # Dynamic # # # # # # NULL # # NULL latin1_swedish_ci NULL 0 N
|
||||
DROP TABLE t1;
|
||||
ALTER TABLE t2 ADD INDEX(b);
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
ALTER TABLE t2 FORCE, ADD INDEX(b);
|
||||
DROP TABLE t2;
|
||||
####################################
|
||||
# Check the row_format effect on ALTER, ALGORITHM=COPY
|
||||
SET GLOBAL innodb_default_row_format = REDUNDANT;
|
||||
|
@ -39,6 +44,7 @@ INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
|
|||
SHOW TABLE STATUS LIKE 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
|
||||
t1 InnoDB # Redundant # # # # # # NULL # # NULL latin1_swedish_ci NULL 0 N
|
||||
CREATE TABLE t2 (b VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL) ENGINE=InnoDB;
|
||||
SET GLOBAL innoDB_default_row_format = COMPACT;
|
||||
ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY;
|
||||
# Because of ALGORITHM=COPY, there is TABLE REBUILD and the table isn't
|
||||
|
@ -47,9 +53,18 @@ SHOW TABLE STATUS LIKE 't1';
|
|||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
|
||||
t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL 0 N
|
||||
DROP TABLE t1;
|
||||
ALTER TABLE t2 ADD INDEX(b);
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
ALTER TABLE t2 FORCE, ADD INDEX(b);
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
SET GLOBAL innodb_default_row_format = DYNAMIC;
|
||||
ALTER TABLE t2 ADD INDEX(b);
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
ALTER TABLE t2 FORCE, ADD INDEX(b);
|
||||
DROP TABLE t2;
|
||||
|
||||
###################################
|
||||
# Check the row_format effect on ALTER, ALGORITH=COPY on
|
||||
# Check the row_format effect on ALTER, ALGORITHM=COPY on
|
||||
# create table with explicit row_format
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
|
||||
|
|
|
@ -6,7 +6,7 @@ SET @row_format = @@GLOBAL.innodb_default_row_format;
|
|||
--echo ####################################
|
||||
--echo # Check if table rebuilding alter isn't affect if table is created
|
||||
--echo # with explicit row_format
|
||||
eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1, 'abc');
|
||||
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
|
||||
SHOW TABLE STATUS LIKE 't1';
|
||||
|
@ -23,12 +23,14 @@ DROP TABLE t1;
|
|||
--echo # Check if table rebuilding alter is affected when there is no
|
||||
--echo # row_format specified at CREATE TABLE.
|
||||
SET GLOBAL innodb_default_row_format = COMPACT;
|
||||
eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1, 'abc');
|
||||
|
||||
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
|
||||
SHOW TABLE STATUS LIKE 't1';
|
||||
|
||||
CREATE TABLE t2 (b VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL) ENGINE=InnoDB;
|
||||
|
||||
SET GLOBAL innodb_default_row_format = DYNAMIC;
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY;
|
||||
|
||||
|
@ -38,15 +40,22 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY;
|
|||
SHOW TABLE STATUS LIKE 't1';
|
||||
DROP TABLE t1;
|
||||
|
||||
--error ER_INDEX_COLUMN_TOO_LONG
|
||||
ALTER TABLE t2 ADD INDEX(b);
|
||||
ALTER TABLE t2 FORCE, ADD INDEX(b);
|
||||
DROP TABLE t2;
|
||||
|
||||
--echo ####################################
|
||||
--echo # Check the row_format effect on ALTER, ALGORITHM=COPY
|
||||
SET GLOBAL innodb_default_row_format = REDUNDANT;
|
||||
eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
|
||||
|
||||
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
|
||||
SHOW TABLE STATUS LIKE 't1';
|
||||
|
||||
CREATE TABLE t2 (b VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL) ENGINE=InnoDB;
|
||||
|
||||
SET GLOBAL innoDB_default_row_format = COMPACT;
|
||||
ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY;
|
||||
|
||||
|
@ -56,11 +65,23 @@ ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY;
|
|||
SHOW TABLE STATUS LIKE 't1';
|
||||
DROP TABLE t1;
|
||||
|
||||
--error ER_INDEX_COLUMN_TOO_LONG
|
||||
ALTER TABLE t2 ADD INDEX(b);
|
||||
--error ER_INDEX_COLUMN_TOO_LONG
|
||||
ALTER TABLE t2 FORCE, ADD INDEX(b);
|
||||
|
||||
SET GLOBAL innodb_default_row_format = DYNAMIC;
|
||||
--error ER_INDEX_COLUMN_TOO_LONG
|
||||
ALTER TABLE t2 ADD INDEX(b);
|
||||
ALTER TABLE t2 FORCE, ADD INDEX(b);
|
||||
|
||||
DROP TABLE t2;
|
||||
|
||||
--echo
|
||||
--echo ###################################
|
||||
--echo # Check the row_format effect on ALTER, ALGORITH=COPY on
|
||||
--echo # Check the row_format effect on ALTER, ALGORITHM=COPY on
|
||||
--echo # create table with explicit row_format
|
||||
eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=INNODB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
|
||||
|
||||
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
|
||||
|
@ -81,7 +102,7 @@ DROP TABLE t1;
|
|||
--echo # Check row_format on ALTER ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_default_row_format=COMPACT;
|
||||
|
||||
eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT, KEY k1(b(10))) ENGINE=INNODB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT, KEY k1(b(10))) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
|
||||
|
||||
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
|
||||
|
|
|
@ -210,10 +210,10 @@ Filename::tab#.ibd
|
|||
# allow-mismatches,page,start-page,end-page
|
||||
[9]: check the both short and long options "page" and "start-page" when
|
||||
# seek value is larger than file size.
|
||||
FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
|
||||
FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
|
||||
FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
|
||||
FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
|
||||
FOUND 1 /Error: Unable to seek to necessary offset/ in my_restart.err
|
||||
FOUND 1 /Error: Unable to seek to necessary offset/ in my_restart.err
|
||||
FOUND 1 /Error: Unable to seek to necessary offset/ in my_restart.err
|
||||
FOUND 1 /Error: Unable to seek to necessary offset/ in my_restart.err
|
||||
[34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
|
||||
# innochecksum will fail with error code: 1
|
||||
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
|
||||
|
|
|
@ -339,22 +339,19 @@ cat_file $MYSQLTEST_VARDIR/tmp/dump.txt;
|
|||
--echo # seek value is larger than file size.
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
|
||||
let SEARCH_PATTERN= Error: Unable to seek to necessary offset;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM -p 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --start-page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM -s 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--echo [34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
|
||||
|
|
|
@ -11,6 +11,7 @@ IF(USE_SSPI)
|
|||
ELSE()
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
FIND_PACKAGE(GSSAPI)
|
||||
SET_PACKAGE_PROPERTIES(GSSAPI PROPERTIES TYPE OPTIONAL)
|
||||
IF(GSSAPI_FOUND)
|
||||
INCLUDE_DIRECTORIES(${GSSAPI_INCS})
|
||||
ADD_DEFINITIONS(-DPLUGIN_GSSAPI)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
# or if plugin is explicitly requested to build. Then bail out.
|
||||
MACRO(SKIP_AWS_PLUGIN msg)
|
||||
MESSAGE_ONCE(SKIP_AWS_PLUGIN "Skip aws_key_management - ${msg}")
|
||||
ADD_FEATURE_INFO(AWS_KEY_MANAGEMENT "OFF" "AWS Encryption Key Management Plugin")
|
||||
RETURN()
|
||||
ENDMACRO()
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
|
@ -76,6 +77,7 @@ ELSE()
|
|||
INCLUDE(ExternalProject)
|
||||
IF(UNIX)
|
||||
FIND_PACKAGE(CURL)
|
||||
SET_PACKAGE_PROPERTIES(CURL PROPERTIES TYPE REQUIRED)
|
||||
IF(NOT CURL_FOUND)
|
||||
SKIP_AWS_PLUGIN("AWS C++ SDK requires libcurl development package")
|
||||
ENDIF()
|
||||
|
@ -86,10 +88,12 @@ ELSE()
|
|||
ENDIF()
|
||||
IF(NOT APPLE)
|
||||
FIND_LIBRARY(UUID_LIBRARIES uuid)
|
||||
SET_PACKAGE_PROPERTIES(UUID_LIBRARIES PROPERTIES TYPE REQUIRED)
|
||||
IF(NOT UUID_LIBRARIES)
|
||||
SKIP_AWS_PLUGIN("AWS C++ SDK requires uuid development package")
|
||||
ENDIF()
|
||||
FIND_PACKAGE(OpenSSL)
|
||||
SET_PACKAGE_PROPERTIES(OpenSSL PROPERTIES TYPE REQUIRED)
|
||||
IF(NOT OPENSSL_FOUND)
|
||||
SKIP_AWS_PLUGIN("AWS C++ SDK requires openssl development package")
|
||||
ENDIF()
|
||||
|
@ -170,5 +174,7 @@ MYSQL_ADD_PLUGIN(aws_key_management aws_key_management_plugin.cc
|
|||
COMPONENT aws-key-management)
|
||||
|
||||
IF (TARGET aws_key_management)
|
||||
SET(NON_DISTRIBUTABLE_WARNING "Apache 2.0" PARENT_SCOPE)
|
||||
SET(NON_DISTRIBUTABLE_WARNING "Apache 2.0" PARENT_SCOPE)
|
||||
ENDIF()
|
||||
|
||||
ADD_FEATURE_INFO(AWS_KEY_MANAGEMENT "ON" "AWS Encryption Key Management Plugin")
|
||||
|
|
|
@ -29,6 +29,6 @@ IF(WIN32)
|
|||
|
||||
MYSQL_ADD_PLUGIN(authentication_windows_client ${PLUGIN_SOURCES} ${HEADERS}
|
||||
LINK_LIBRARIES Secur32
|
||||
MODULE_ONLY COMPONENT ClientPlugins)
|
||||
MODULE_ONLY COMPONENT ClientPlugins CLIENT)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
|
|
@ -500,7 +500,7 @@ err:
|
|||
|
||||
const char *histogram_types[] =
|
||||
{"SINGLE_PREC_HB", "DOUBLE_PREC_HB", 0};
|
||||
static TYPELIB hystorgam_types_typelib=
|
||||
static TYPELIB histogram_types_typelib=
|
||||
{ array_elements(histogram_types),
|
||||
"histogram_types",
|
||||
histogram_types, NULL};
|
||||
|
@ -516,7 +516,7 @@ String *Item_func_decode_histogram::val_str(String *str)
|
|||
tmp.length(0);
|
||||
if (!(res= args[0]->val_str(&tmp)) ||
|
||||
(type= find_type(res->c_ptr_safe(),
|
||||
&hystorgam_types_typelib, MYF(0))) <= 0)
|
||||
&histogram_types_typelib, MYF(0))) <= 0)
|
||||
{
|
||||
null_value= 1;
|
||||
return 0;
|
||||
|
@ -601,7 +601,7 @@ bool Item_func_concat::realloc_result(String *str, uint length) const
|
|||
as str was initially set by args[0]->val_str(str).
|
||||
So multiplication by 2 can overflow, if args[0] for some reasons
|
||||
did not limit the result to max_alloced_packet. But it's not harmful,
|
||||
"str" will be realloced exactly to "length" bytes in case of overflow.
|
||||
"str" will be reallocated exactly to "length" bytes in case of overflow.
|
||||
*/
|
||||
uint new_length= MY_MAX(str->alloced_length() * 2, length);
|
||||
return str->realloc(new_length);
|
||||
|
@ -1529,7 +1529,7 @@ String *Item_func_insert::val_str(String *str)
|
|||
length= res->length();
|
||||
|
||||
/*
|
||||
There is one exception not handled (intentionaly) by the character set
|
||||
There is one exception not handled (intentionally) by the character set
|
||||
aggregation code. If one string is strong side and is binary, and
|
||||
another one is weak side and is a multi-byte character string,
|
||||
then we need to operate on the second string in terms on bytes when
|
||||
|
@ -3282,7 +3282,7 @@ String *Item_func_rpad::val_str(String *str)
|
|||
if ((ulonglong) count > INT_MAX32)
|
||||
count= INT_MAX32;
|
||||
/*
|
||||
There is one exception not handled (intentionaly) by the character set
|
||||
There is one exception not handled (intentionally) by the character set
|
||||
aggregation code. If one string is strong side and is binary, and
|
||||
another one is weak side and is a multi-byte character string,
|
||||
then we need to operate on the second string in terms on bytes when
|
||||
|
@ -3375,7 +3375,7 @@ String *Item_func_lpad::val_str(String *str)
|
|||
count= INT_MAX32;
|
||||
|
||||
/*
|
||||
There is one exception not handled (intentionaly) by the character set
|
||||
There is one exception not handled (intentionally) by the character set
|
||||
aggregation code. If one string is strong side and is binary, and
|
||||
another one is weak side and is a multi-byte character string,
|
||||
then we need to operate on the second string in terms on bytes when
|
||||
|
@ -4184,7 +4184,7 @@ longlong Item_func_uncompressed_length::val_int()
|
|||
5 bytes long.
|
||||
res->c_ptr() is not used because:
|
||||
- we do not need \0 terminated string to get first 4 bytes
|
||||
- c_ptr() tests simbol after string end (uninitialiozed memory) which
|
||||
- c_ptr() tests simbol after string end (uninitialized memory) which
|
||||
confuse valgrind
|
||||
*/
|
||||
return uint4korr(res->ptr()) & 0x3FFFFFFF;
|
||||
|
|
|
@ -928,7 +928,8 @@ bool With_clause::prepare_unreferenced_elements(THD *thd)
|
|||
with_elem;
|
||||
with_elem= with_elem->next)
|
||||
{
|
||||
if (!with_elem->is_referenced() && with_elem->prepare_unreferenced(thd))
|
||||
if ((with_elem->is_hanging_recursive() || !with_elem->is_referenced()) &&
|
||||
with_elem->prepare_unreferenced(thd))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,6 +260,8 @@ public:
|
|||
|
||||
bool is_referenced() { return referenced; }
|
||||
|
||||
bool is_hanging_recursive() { return is_recursive && !rec_outer_references; }
|
||||
|
||||
void inc_references() { references++; }
|
||||
|
||||
bool rename_columns_of_derived_unit(THD *thd, st_select_lex_unit *unit);
|
||||
|
|
|
@ -26314,8 +26314,10 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
if (!(tmp_unit->item && tmp_unit->item->eliminated) && // (1)
|
||||
(!tmp_unit->derived ||
|
||||
tmp_unit->derived->is_materialized_derived()) && // (2)
|
||||
!(tmp_unit->with_element &&
|
||||
(!tmp_unit->derived || !tmp_unit->derived->derived_result))) // (3)
|
||||
(!tmp_unit->with_element ||
|
||||
(tmp_unit->derived &&
|
||||
tmp_unit->derived->derived_result &&
|
||||
!tmp_unit->with_element->is_hanging_recursive()))) // (3)
|
||||
{
|
||||
explain->add_child(tmp_unit->first_select()->select_number);
|
||||
}
|
||||
|
@ -26380,8 +26382,10 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
|
|||
*/
|
||||
if (!(unit->item && unit->item->eliminated) && // (1)
|
||||
!(unit->derived && unit->derived->merged_for_insert) && // (2)
|
||||
!(unit->with_element &&
|
||||
(!unit->derived || !unit->derived->derived_result))) // (3)
|
||||
(!unit->with_element ||
|
||||
(unit->derived &&
|
||||
unit->derived->derived_result &&
|
||||
!unit->with_element->is_hanging_recursive()))) // (3)
|
||||
{
|
||||
if (mysql_explain_union(thd, unit, result))
|
||||
DBUG_VOID_RETURN;
|
||||
|
|
|
@ -108,6 +108,7 @@ IF(CONNECT_WITH_VCT)
|
|||
SET(CONNECT_SOURCES ${CONNECT_SOURCES} filamvct.cpp tabvct.cpp filamvct.h tabvct.h)
|
||||
add_definitions(-DVCT_SUPPORT)
|
||||
ENDIF(CONNECT_WITH_VCT)
|
||||
ADD_FEATURE_INFO(CONNECT_VCT CONNECT_WITH_VCT "Support for VCT in the CONNECT storage engine")
|
||||
|
||||
|
||||
#
|
||||
|
@ -133,6 +134,7 @@ IF(CONNECT_WITH_LIBXML2)
|
|||
D:/libxml/lib)
|
||||
ENDIF(WIN32)
|
||||
FIND_PACKAGE(LibXml2)
|
||||
SET_PACKAGE_PROPERTIES(LibXml2 PROPERTIES TYPE OPTIONAL)
|
||||
IF (LIBXML2_FOUND)
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
|
||||
|
@ -140,6 +142,8 @@ IF(CONNECT_WITH_LIBXML2)
|
|||
add_definitions(-DLIBXML2_SUPPORT)
|
||||
ENDIF(LIBXML2_FOUND)
|
||||
ENDIF(CONNECT_WITH_LIBXML2)
|
||||
ADD_FEATURE_INFO(CONNECT_LIBXML2 CONNECT_WITH_LIBXML2
|
||||
"Support for LIBXML2 in the CONNECT storage engine")
|
||||
|
||||
|
||||
IF(WIN32)
|
||||
|
@ -153,6 +157,8 @@ IF(WIN32)
|
|||
SET(MSXML_FOUND 1)
|
||||
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp domdoc.h)
|
||||
ENDIF(CONNECT_WITH_MSXML)
|
||||
ADD_FEATURE_INFO(CONNECT_MSXML CONNECT_WITH_MSXML
|
||||
"Support for MSXML in the CONNECT storage engine")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(LIBXML2_FOUND OR MSXML_FOUND)
|
||||
|
@ -253,6 +259,7 @@ int main() {
|
|||
tabodbc.cpp tabodbc.h odbccat.h odbconn.cpp odbconn.h)
|
||||
ENDIF(UNIX)
|
||||
ENDIF(CONNECT_WITH_ODBC)
|
||||
ADD_FEATURE_INFO(CONNECT_ODBC ODBC_LIBRARY "Support for ODBC in the CONNECT storage engine")
|
||||
|
||||
#
|
||||
# JDBC with MongoDB Java Driver included but disabled if without MONGO
|
||||
|
@ -262,7 +269,9 @@ OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON)
|
|||
|
||||
IF(CONNECT_WITH_JDBC)
|
||||
FIND_PACKAGE(Java 1.6)
|
||||
SET_PACKAGE_PROPERTIES(Java PROPERTIES TYPE OPTIONAL)
|
||||
FIND_PACKAGE(JNI)
|
||||
SET_PACKAGE_PROPERTIES(JNI PROPERTIES TYPE OPTIONAL)
|
||||
IF (JAVA_FOUND AND JNI_FOUND)
|
||||
INCLUDE(UseJava)
|
||||
INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
|
||||
|
@ -278,6 +287,7 @@ IF(CONNECT_WITH_JDBC)
|
|||
Mongo2Interface.java Mongo3Interface.java
|
||||
mysql-test/connect/std_data/JavaWrappers.jar)
|
||||
add_definitions(-DJAVA_SUPPORT)
|
||||
ADD_FEATURE_INFO(CONNECT_JDBC "ON" "Support for JDBC in the CONNECT storage engine")
|
||||
IF(CONNECT_WITH_MONGO)
|
||||
SET(CONNECT_SOURCES ${CONNECT_SOURCES}
|
||||
mysql-test/connect/std_data/Mongo2.jar
|
||||
|
@ -286,7 +296,10 @@ IF(CONNECT_WITH_JDBC)
|
|||
ENDIF()
|
||||
ELSE()
|
||||
SET(JDBC_LIBRARY "")
|
||||
ADD_FEATURE_INFO(CONNECT_JDBC "OFF" "Support for JDBC in the CONNECT storage engine")
|
||||
ENDIF()
|
||||
ELSE(CONNECT_WITH_JDBC)
|
||||
ADD_FEATURE_INFO(CONNECT_JDBC "OFF" "Support for JDBC in the CONNECT storage engine")
|
||||
ENDIF(CONNECT_WITH_JDBC)
|
||||
|
||||
#
|
||||
|
@ -300,6 +313,7 @@ IF(CONNECT_WITH_ZIP)
|
|||
filamzip.h tabzip.h ioapi.h unzip.h zip.h)
|
||||
add_definitions(-DZIP_SUPPORT -DNOCRYPT)
|
||||
ENDIF(CONNECT_WITH_ZIP)
|
||||
ADD_FEATURE_INFO(CONNECT_ZIP CONNECT_WITH_ZIP "Support for ZIP in the CONNECT storage engine")
|
||||
|
||||
#
|
||||
# MONGO C Driver
|
||||
|
@ -316,6 +330,7 @@ IF(CONNECT_WITH_MONGO)
|
|||
D:/mongo-c-driver/lib)
|
||||
ENDIF(WIN32)
|
||||
FIND_PACKAGE(libmongoc-1.0 1.7 QUIET)
|
||||
SET_PACKAGE_PROPERTIES(libmongoc PROPERTIES TYPE OPTIONAL)
|
||||
IF (libmongoc-1.0_FOUND)
|
||||
INCLUDE_DIRECTORIES(${MONGOC_INCLUDE_DIRS})
|
||||
SET(MONGOC_LIBRARY ${MONGOC_LIBRARIES})
|
||||
|
@ -323,14 +338,18 @@ IF(CONNECT_WITH_MONGO)
|
|||
cmgoconn.cpp cmgfam.cpp tabcmg.cpp
|
||||
cmgoconn.h cmgfam.h tabcmg.h)
|
||||
add_definitions(-DCMGO_SUPPORT)
|
||||
ADD_FEATURE_INFO(CONNECT_MONGODB "ON" "Support for MongoDB in the CONNECT storage engine")
|
||||
IF (NOT JAVA_FOUND AND JNI_FOUND)
|
||||
SET(CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h)
|
||||
add_definitions(-DMONGO_SUPPORT)
|
||||
ENDIF (NOT JAVA_FOUND AND JNI_FOUND)
|
||||
ELSE(libmongoc-1.0_FOUND)
|
||||
ADD_FEATURE_INFO(CONNECT_MONGODB "OFF" "Support for MongoDB in the CONNECT storage engine")
|
||||
ENDIF(libmongoc-1.0_FOUND)
|
||||
ELSE(CONNECT_WITH_MONGO)
|
||||
ADD_FEATURE_INFO(CONNECT_MONGODB "OFF" "Support for MongoDB in the CONNECT storage engine")
|
||||
ENDIF(CONNECT_WITH_MONGO)
|
||||
|
||||
|
||||
#
|
||||
# REST
|
||||
#
|
||||
|
@ -362,6 +381,7 @@ IF(CONNECT_WITH_REST)
|
|||
## MESSAGE(STATUS "=====> cpprestsdk package not found")
|
||||
# ENDIF (cpprestsdk_FOUND)
|
||||
ENDIF(CONNECT_WITH_REST)
|
||||
ADD_FEATURE_INFO(CONNECT_REST CONNECT_WITH_REST "Support for REST API in the CONNECT storage engine")
|
||||
|
||||
#
|
||||
# XMAP
|
||||
|
@ -372,6 +392,7 @@ OPTION(CONNECT_WITH_XMAP "Compile CONNECT storage engine with index file mapping
|
|||
IF(CONNECT_WITH_XMAP)
|
||||
add_definitions(-DXMAP)
|
||||
ENDIF(CONNECT_WITH_XMAP)
|
||||
ADD_FEATURE_INFO(CONNECT_XMAP CONNECT_WITH_XMAP "Support for index file mapping in the CONNECT storage engine")
|
||||
|
||||
#
|
||||
# Plugin definition
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1995, 2021, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2013, 2020, MariaDB Corporation.
|
||||
Copyright (c) 2013, 2021, MariaDB Corporation.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
|
@ -774,8 +774,8 @@ buf_page_is_checksum_valid_crc32(
|
|||
#ifdef UNIV_INNOCHECKSUM
|
||||
if (log_file
|
||||
&& srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_CRC32) {
|
||||
fprintf(log_file, "page::%llu;"
|
||||
" crc32 calculated = %u;"
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" crc32 calculated = " UINT32PF ";"
|
||||
" recorded checksum field1 = " ULINTPF " recorded"
|
||||
" checksum field2 =" ULINTPF "\n", cur_page_num,
|
||||
crc32, checksum_field1, checksum_field2);
|
||||
|
@ -820,26 +820,26 @@ buf_page_is_checksum_valid_innodb(
|
|||
#ifdef UNIV_INNOCHECKSUM
|
||||
if (log_file
|
||||
&& srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB) {
|
||||
fprintf(log_file, "page::%llu;"
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" old style: calculated ="
|
||||
" " ULINTPF "; recorded = " ULINTPF "\n",
|
||||
cur_page_num, old_checksum,
|
||||
checksum_field2);
|
||||
fprintf(log_file, "page::%llu;"
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" new style: calculated ="
|
||||
" " ULINTPF "; crc32 = %u; recorded = " ULINTPF "\n",
|
||||
" " ULINTPF "; crc32 = " UINT32PF "; recorded = " ULINTPF "\n",
|
||||
cur_page_num, new_checksum,
|
||||
buf_calc_page_crc32(read_buf), checksum_field1);
|
||||
}
|
||||
|
||||
if (log_file
|
||||
&& srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB) {
|
||||
fprintf(log_file, "page::%llu;"
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" old style: calculated ="
|
||||
" " ULINTPF "; recorded checksum = " ULINTPF "\n",
|
||||
cur_page_num, old_checksum,
|
||||
checksum_field2);
|
||||
fprintf(log_file, "page::%llu;"
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" new style: calculated ="
|
||||
" " ULINTPF "; recorded checksum = " ULINTPF "\n",
|
||||
cur_page_num, new_checksum,
|
||||
|
@ -907,7 +907,7 @@ buf_page_is_checksum_valid_none(
|
|||
if (log_file
|
||||
&& srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_NONE) {
|
||||
fprintf(log_file,
|
||||
"page::%llu; none checksum: calculated"
|
||||
"page::" UINT32PF "; none checksum: calculated"
|
||||
" = %lu; recorded checksum_field1 = " ULINTPF
|
||||
" recorded checksum_field2 = " ULINTPF "\n",
|
||||
cur_page_num, BUF_NO_CHECKSUM_MAGIC,
|
||||
|
@ -1106,15 +1106,15 @@ buf_page_is_corrupted(
|
|||
checksum_field1, checksum_field2)) {
|
||||
#ifdef UNIV_INNOCHECKSUM
|
||||
if (log_file) {
|
||||
fprintf(log_file, "page::%llu;"
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" old style: calculated = %u;"
|
||||
" recorded = " ULINTPF ";\n",
|
||||
cur_page_num,
|
||||
buf_calc_page_old_checksum(read_buf),
|
||||
checksum_field2);
|
||||
fprintf(log_file, "page::%llu;"
|
||||
" new style: calculated = %u;"
|
||||
" crc32 = %u; recorded = " ULINTPF ";\n",
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" new style: calculated = " UINT32PF ";"
|
||||
" crc32 = " UINT32PF "; recorded = " ULINTPF ";\n",
|
||||
cur_page_num,
|
||||
buf_calc_page_new_checksum(read_buf),
|
||||
buf_calc_page_crc32(read_buf),
|
||||
|
@ -1938,8 +1938,6 @@ buf_pool_init_instance(
|
|||
LATCH_ID_HASH_TABLE_RW_LOCK,
|
||||
srv_n_page_hash_locks, MEM_HEAP_FOR_PAGE_HASH);
|
||||
|
||||
buf_pool->page_hash_old = NULL;
|
||||
|
||||
buf_pool->zip_hash = hash_create(2 * buf_pool->curr_size);
|
||||
|
||||
buf_pool->last_printout_time = time(NULL);
|
||||
|
@ -2598,8 +2596,6 @@ buf_pool_resize_hash(
|
|||
{
|
||||
hash_table_t* new_hash_table;
|
||||
|
||||
ut_ad(buf_pool->page_hash_old == NULL);
|
||||
|
||||
/* recreate page_hash */
|
||||
new_hash_table = ib_recreate(
|
||||
buf_pool->page_hash, 2 * buf_pool->curr_size);
|
||||
|
@ -2631,8 +2627,14 @@ buf_pool_resize_hash(
|
|||
}
|
||||
}
|
||||
|
||||
buf_pool->page_hash_old = buf_pool->page_hash;
|
||||
buf_pool->page_hash = new_hash_table;
|
||||
/* Concurrent threads may be accessing
|
||||
buf_pool->page_hash->n_cells, n_sync_obj and try to latch
|
||||
sync_obj[i] while we are resizing. Therefore we never
|
||||
deallocate page_hash, instead we overwrite n_cells (and other
|
||||
fields) with the new values. The n_sync_obj and sync_obj are
|
||||
actually same in both. */
|
||||
std::swap(*buf_pool->page_hash, *new_hash_table);
|
||||
hash_table_free(new_hash_table);
|
||||
|
||||
/* recreate zip_hash */
|
||||
new_hash_table = hash_create(2 * buf_pool->curr_size);
|
||||
|
@ -3090,11 +3092,6 @@ calc_buf_pool_size:
|
|||
|
||||
hash_unlock_x_all(buf_pool->page_hash);
|
||||
buf_pool_mutex_exit(buf_pool);
|
||||
|
||||
if (buf_pool->page_hash_old != NULL) {
|
||||
hash_table_free(buf_pool->page_hash_old);
|
||||
buf_pool->page_hash_old = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
UT_DELETE(chunk_map_old);
|
||||
|
|
|
@ -22,12 +22,15 @@ MACRO (MYSQL_CHECK_BZIP2)
|
|||
CHECK_LIBRARY_EXISTS(bz2 BZ2_bzBuffToBuffDecompress "" HAVE_BZLIB2_DECOMPRESS)
|
||||
|
||||
IF (HAVE_BZLIB2_COMPRESS AND HAVE_BZLIB2_DECOMPRESS AND HAVE_BZLIB2_H)
|
||||
SET(HAVE_INNODB_BZLIB2 TRUE)
|
||||
ADD_DEFINITIONS(-DHAVE_BZIP2=1)
|
||||
LINK_LIBRARIES(bz2)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_BZIP2 STREQUAL "ON")
|
||||
MESSAGE(FATAL_ERROR "Required bzip2 library is not found")
|
||||
MESSAGE(FATAL_ERROR "Required bzip2 library is not found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_BZIP2 HAVE_INNODB_BZLIB2
|
||||
"BZIP2 compression in the InnoDB storage engine")
|
||||
ENDMACRO()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2011, 2021, Oracle and/or its affiliates.
|
||||
Copyright (c) 2016, 2021, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
|
@ -1298,6 +1298,9 @@ fts_cache_node_add_positions(
|
|||
ptr = ilist + node->ilist_size;
|
||||
|
||||
node->ilist_size_alloc = new_size;
|
||||
if (cache) {
|
||||
cache->total_size += new_size;
|
||||
}
|
||||
}
|
||||
|
||||
ptr_start = ptr;
|
||||
|
@ -1324,6 +1327,9 @@ fts_cache_node_add_positions(
|
|||
if (node->ilist_size > 0) {
|
||||
memcpy(ilist, node->ilist, node->ilist_size);
|
||||
ut_free(node->ilist);
|
||||
if (cache) {
|
||||
cache->total_size -= node->ilist_size;
|
||||
}
|
||||
}
|
||||
|
||||
node->ilist = ilist;
|
||||
|
@ -1331,10 +1337,6 @@ fts_cache_node_add_positions(
|
|||
|
||||
node->ilist_size += enc_len;
|
||||
|
||||
if (cache) {
|
||||
cache->total_size += enc_len;
|
||||
}
|
||||
|
||||
if (node->first_doc_id == FTS_NULL_DOC_ID) {
|
||||
node->first_doc_id = doc_id;
|
||||
}
|
||||
|
|
|
@ -6277,7 +6277,6 @@ ha_innobase::prepare_inplace_alter_table(
|
|||
mem_heap_t* heap;
|
||||
const char** col_names;
|
||||
int error;
|
||||
ulint max_col_len;
|
||||
ulint add_autoinc_col_no = ULINT_UNDEFINED;
|
||||
ulonglong autoinc_col_max_value = 0;
|
||||
ulint fts_doc_col_no = ULINT_UNDEFINED;
|
||||
|
@ -6489,7 +6488,13 @@ check_if_ok_to_rename:
|
|||
& 1U << DICT_TF_POS_DATA_DIR);
|
||||
}
|
||||
|
||||
max_col_len = DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(info.flags());
|
||||
|
||||
/* ALGORITHM=INPLACE without rebuild (10.3+ ALGORITHM=NOCOPY)
|
||||
must use the current ROW_FORMAT of the table. */
|
||||
const ulint max_col_len = DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(
|
||||
innobase_need_rebuild(ha_alter_info, this->table)
|
||||
? info.flags()
|
||||
: m_prebuilt->table->flags);
|
||||
|
||||
/* Check each index's column length to make sure they do not
|
||||
exceed limit */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2013, 2020, MariaDB Corporation.
|
||||
Copyright (c) 1995, 2021, Oracle and/or its affiliates.
|
||||
Copyright (c) 2013, 2021, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
@ -2037,8 +2037,6 @@ struct buf_pool_t{
|
|||
page_hash mutex. Lookups can happen
|
||||
while holding the buf_pool->mutex or
|
||||
the relevant page_hash mutex. */
|
||||
hash_table_t* page_hash_old; /*!< old pointer to page_hash to be
|
||||
freed after resizing buffer pool */
|
||||
hash_table_t* zip_hash; /*!< hash table of buf_block_t blocks
|
||||
whose frames are allocated to the
|
||||
zip buddy system,
|
||||
|
|
|
@ -422,7 +422,7 @@ in both 32-bit and 64-bit environments. */
|
|||
#ifdef UNIV_INNOCHECKSUM
|
||||
extern bool strict_verify;
|
||||
extern FILE* log_file;
|
||||
extern unsigned long long cur_page_num;
|
||||
extern uint32_t cur_page_num;
|
||||
#endif /* UNIV_INNOCHECKSUM */
|
||||
|
||||
typedef int64_t ib_int64_t;
|
||||
|
|
|
@ -82,6 +82,7 @@ MARK_AS_ADVANCED(INNODB_COMPILER_HINTS)
|
|||
IF(INNODB_COMPILER_HINTS)
|
||||
ADD_DEFINITIONS("-DCOMPILER_HINTS")
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_COMPILER_HINTS INNODB_COMPILER_HINTS "InnoDB compiled with compiler hints")
|
||||
|
||||
SET(MUTEXTYPE "event" CACHE STRING "Mutex type: event, sys or futex")
|
||||
|
||||
|
@ -117,20 +118,27 @@ IF(WITH_INNODB_AHI)
|
|||
ADD_DEFINITIONS(-DBTR_CUR_HASH_ADAPT -DBTR_CUR_ADAPT)
|
||||
IF(NOT WITH_INNODB_ROOT_GUESS)
|
||||
MESSAGE(WARNING "WITH_INNODB_AHI implies WITH_INNODB_ROOT_GUESS")
|
||||
SET(WITH_INNODB_ROOT_GUESS ON)
|
||||
ENDIF()
|
||||
ELSEIF(WITH_INNODB_ROOT_GUESS)
|
||||
ADD_DEFINITIONS(-DBTR_CUR_ADAPT)
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_AHI WITH_INNODB_AHI "InnoDB Adaptive Hash Index")
|
||||
ADD_FEATURE_INFO(INNODB_ROOT_GUESS WITH_INNODB_ROOT_GUESS
|
||||
"Cache index root block descriptors in InnoDB")
|
||||
|
||||
OPTION(WITH_INNODB_BUG_ENDIAN_CRC32 "Weaken innodb_checksum_algorithm=crc32 by supporting upgrade from big-endian systems running 5.6/10.0/10.1" ${IS_BIG_ENDIAN})
|
||||
IF(WITH_INNODB_BUG_ENDIAN_CRC32)
|
||||
ADD_DEFINITIONS(-DINNODB_BUG_ENDIAN_CRC32)
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_BUG_ENDIAN_CRC32 WITH_INNODB_BUG_ENDIAN_CRC32 "Big endian weaker CRC32 to support upgrade from big-endian systems running 5.6/10.0/10.1")
|
||||
|
||||
OPTION(WITH_INNODB_EXTRA_DEBUG "Enable extra InnoDB debug checks" OFF)
|
||||
IF(WITH_INNODB_EXTRA_DEBUG)
|
||||
ADD_DEFINITIONS(-DUNIV_ZIP_DEBUG)
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_EXTRA_DEBUG WITH_INNODB_EXTRA_DEBUG "Extra InnoDB debug checks")
|
||||
|
||||
|
||||
CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU)
|
||||
IF(HAVE_SCHED_GETCPU)
|
||||
|
@ -215,6 +223,7 @@ OPTION(WITH_INNODB_DISALLOW_WRITES "InnoDB freeze writes patch from Google" ${WI
|
|||
IF (WITH_INNODB_DISALLOW_WRITES)
|
||||
ADD_DEFINITIONS(-DWITH_INNODB_DISALLOW_WRITES)
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_DISALLOW_WRITES WITH_INNODB_DISALLOW_WRITES "Expose innodb_disallow_writes switch to stop innodb from writing to disk")
|
||||
|
||||
|
||||
# Include directories under innobase
|
||||
|
@ -250,8 +259,8 @@ IF(MSVC)
|
|||
SET_SOURCE_FILES_PROPERTIES(${_SRC_DIR}/pars/lexyy.c
|
||||
PROPERTIES COMPILE_FLAGS "/wd4003")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Include directories under innobase
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include
|
||||
${CMAKE_SOURCE_DIR}/storage/innobase/handler
|
||||
${CMAKE_SOURCE_DIR}/storage/innobase/handler
|
||||
${CMAKE_SOURCE_DIR}/libbinlogevents/include )
|
||||
|
|
|
@ -22,35 +22,17 @@ MACRO (MYSQL_CHECK_LZ4)
|
|||
CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
|
||||
IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H)
|
||||
SET(HAVE_INNODB_LZ4 TRUE)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4=1)
|
||||
IF (HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1)
|
||||
ENDIF()
|
||||
LINK_LIBRARIES(lz4)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_LZ4 STREQUAL "ON")
|
||||
MESSAGE(FATAL_ERROR "Required lz4 library is not found")
|
||||
MESSAGE(FATAL_ERROR "Required lz4 library is not found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (MYSQL_CHECK_LZ4_STATIC)
|
||||
IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO")
|
||||
CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H)
|
||||
CHECK_LIBRARY_EXISTS(liblz4.a LZ4_compress_limitedOutput "" HAVE_LZ4_LIB)
|
||||
CHECK_LIBRARY_EXISTS(liblz3.a LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
|
||||
IF(HAVE_LZ4_LIB AND HAVE_LZ4_H)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4=1)
|
||||
IF (HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1)
|
||||
ENDIF()
|
||||
LINK_LIBRARIES(liblz4.a)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_LZ4 STREQUAL "ON")
|
||||
MESSAGE(FATAL_ERROR "Required lz4 library is not found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_LZ4 HAVE_INNODB_LZ4 "LZ4 compression in the InnoDB storage engine")
|
||||
ENDMACRO()
|
||||
|
|
|
@ -22,12 +22,14 @@ MACRO (MYSQL_CHECK_LZMA)
|
|||
CHECK_LIBRARY_EXISTS(lzma lzma_easy_buffer_encode "" HAVE_LZMA_ENCODE)
|
||||
|
||||
IF (HAVE_LZMA_DECODE AND HAVE_LZMA_ENCODE AND HAVE_LZMA_H)
|
||||
SET(HAVE_INNODB_LZMA TRUE)
|
||||
ADD_DEFINITIONS(-DHAVE_LZMA=1)
|
||||
LINK_LIBRARIES(lzma)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_LZMA STREQUAL "ON")
|
||||
MESSAGE(FATAL_ERROR "Required lzma library is not found")
|
||||
MESSAGE(FATAL_ERROR "Required lzma library is not found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_LZMA HAVE_INNODB_LZMA "LZMA compression in the InnoDB storage engine")
|
||||
ENDMACRO()
|
||||
|
|
|
@ -15,34 +15,20 @@
|
|||
SET(WITH_INNODB_LZO AUTO CACHE STRING
|
||||
"Build with lzo. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'")
|
||||
|
||||
MACRO (MYSQL_CHECK_LZO_STATIC)
|
||||
IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO")
|
||||
CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
|
||||
CHECK_LIBRARY_EXISTS(liblzo2.a lzo1x_1_compress "" HAVE_LZO_LIB)
|
||||
|
||||
IF(HAVE_LZO_LIB AND HAVE_LZO_H)
|
||||
ADD_DEFINITIONS(-DHAVE_LZO=1)
|
||||
LINK_LIBRARIES(liblzo2.a)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_LZO STREQUAL "ON")
|
||||
MESSAGE(FATAL_ERROR "Required lzo library is not found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (MYSQL_CHECK_LZO)
|
||||
IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO")
|
||||
CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
|
||||
CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_SHARED_LIB)
|
||||
|
||||
IF(HAVE_LZO_SHARED_LIB AND HAVE_LZO_H)
|
||||
SET(HAVE_INNODB_LZO TRUE)
|
||||
ADD_DEFINITIONS(-DHAVE_LZO=1)
|
||||
LINK_LIBRARIES(lzo2)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_LZO STREQUAL "ON")
|
||||
MESSAGE(FATAL_ERROR "Required lzo library is not found")
|
||||
MESSAGE(FATAL_ERROR "Required lzo library is not found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_LZO HAVE_INNODB_LZO "LZO compression in the InnoDB storage engine")
|
||||
ENDMACRO()
|
||||
|
|
|
@ -5059,9 +5059,9 @@ bool page_zip_verify_checksum(const byte *data, size_t size)
|
|||
|
||||
#ifdef UNIV_INNOCHECKSUM
|
||||
if (log_file) {
|
||||
fprintf(log_file, "page::%llu;"
|
||||
" %s checksum: calculated = %u;"
|
||||
" recorded = %u\n", cur_page_num,
|
||||
fprintf(log_file, "page::" UINT32PF ";"
|
||||
" %s checksum: calculated = " UINT32PF ";"
|
||||
" recorded = " UINT32PF "\n", cur_page_num,
|
||||
buf_checksum_algorithm_name(
|
||||
static_cast<srv_checksum_algorithm_t>(
|
||||
srv_checksum_algorithm)),
|
||||
|
@ -5073,11 +5073,11 @@ bool page_zip_verify_checksum(const byte *data, size_t size)
|
|||
data, size, SRV_CHECKSUM_ALGORITHM_CRC32);
|
||||
|
||||
if (log_file) {
|
||||
fprintf(log_file, "page::%llu: crc32 checksum:"
|
||||
" calculated = %u; recorded = %u\n",
|
||||
fprintf(log_file, "page::" UINT32PF ": crc32 checksum:"
|
||||
" calculated = " UINT32PF "; recorded = " UINT32PF "\n",
|
||||
cur_page_num, crc32, stored);
|
||||
fprintf(log_file, "page::%llu: none checksum:"
|
||||
" calculated = %lu; recorded = %u\n",
|
||||
fprintf(log_file, "page::" UINT32PF ": none checksum:"
|
||||
" calculated = %lu; recorded = " UINT32PF "\n",
|
||||
cur_page_num, BUF_NO_CHECKSUM_MAGIC, stored);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,12 +21,14 @@ MACRO (MYSQL_CHECK_SNAPPY)
|
|||
CHECK_LIBRARY_EXISTS(snappy snappy_uncompress "" HAVE_SNAPPY_SHARED_LIB)
|
||||
|
||||
IF(HAVE_SNAPPY_SHARED_LIB AND HAVE_SNAPPY_H)
|
||||
SET(HAVE_INNODB_SNAPPY TRUE)
|
||||
ADD_DEFINITIONS(-DHAVE_SNAPPY=1)
|
||||
LINK_LIBRARIES(snappy)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_SNAPPY STREQUAL "ON")
|
||||
MESSAGE(FATAL_ERROR "Required snappy library is not found")
|
||||
MESSAGE(FATAL_ERROR "Required snappy library is not found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(INNODB_SNAPPY HAVE_INNODB_SNAPPY "Snappy compression in the InnoDB storage engine")
|
||||
ENDMACRO()
|
||||
|
|
|
@ -3,6 +3,10 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|||
FUNCTION(CHECK_OQGRAPH)
|
||||
MESSAGE(STATUS "Configuring OQGraph")
|
||||
FIND_PACKAGE(Boost 1.40.0)
|
||||
SET_PACKAGE_PROPERTIES(Boost PROPERTIES
|
||||
PURPOSE "Required for the OQGraph storage engine"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
IF(NOT Boost_FOUND)
|
||||
MESSAGE(STATUS "Boost not found. OQGraph will not be compiled")
|
||||
SET(OQGRAPH_OK 0 CACHE INTERNAL "")
|
||||
|
@ -11,6 +15,10 @@ ENDIF()
|
|||
INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS})
|
||||
|
||||
FIND_PACKAGE(Judy)
|
||||
SET_PACKAGE_PROPERTIES(Judy PROPERTIES
|
||||
PURPOSE "Required for the OQGraph storage engine"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
IF(NOT Judy_FOUND)
|
||||
MESSAGE(STATUS "Judy not found. OQGraph will not be compiled")
|
||||
SET(OQGRAPH_OK 0 CACHE INTERNAL "")
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
MACRO(SKIP_ROCKSDB_PLUGIN msg)
|
||||
MESSAGE_ONCE(SKIP_ROCKSDB_PLUGIN "Can't build rocksdb engine - ${msg}")
|
||||
ADD_FEATURE_INFO(ROCKSDB "OFF" "Storage Engine")
|
||||
RETURN()
|
||||
ENDMACRO()
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ macro(check_lib package var)
|
|||
|
||||
IF (NOT ${WITH_ROCKSDB_${package}} STREQUAL "OFF")
|
||||
FIND_PACKAGE(${package} QUIET)
|
||||
SET(HAVE_ROCKSDB_${PACKAGE_NAME} TRUE)
|
||||
IF (${${PACKAGE_NAME}_FOUND})
|
||||
IF(${ARGC} GREATER 2)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${${var}_LIBRARIES})
|
||||
|
@ -52,6 +53,7 @@ macro(check_lib package var)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(ROCKSDB_${PACKAGE_NAME} HAVE_ROCKSDB_${PACKAGE_NAME} "${package} Compression in the RocksDB storage engine")
|
||||
|
||||
IF(${${var}_VALID})
|
||||
MESSAGE_ONCE(rocksdb_${var} "Found ${package}: ${${var}_LIBRARIES}")
|
||||
|
@ -78,6 +80,7 @@ check_lib(ZSTD ZSTD ZDICT_trainFromBuffer)
|
|||
|
||||
add_definitions(-DZLIB)
|
||||
list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARY})
|
||||
ADD_FEATURE_INFO(ROCKSDB_ZLIB "ON" "zlib Compression in the RocksDB storage engine")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Cygwin")
|
||||
add_definitions(-fno-builtin-memcmp -DCYGWIN)
|
||||
|
|
Loading…
Reference in a new issue