From 86fbb58c3ac0865482819c10a3e81f2eea001c36 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 15:39:13 +0200 Subject: Merging upstream version 1:10.11.7. Signed-off-by: Daniel Baumann --- storage/columnstore/columnstore/VERSION | 4 ++-- storage/columnstore/columnstore/dbcon/mysql/ha_mcs.h | 17 +++++++++++++++++ .../columnstore/dbcon/mysql/ha_mcs_impl_if.h | 1 + .../columnstore/storage-manager/src/MetadataFile.cpp | 1 + .../columnstore/storage-manager/src/S3Storage.h | 1 + .../columnstore/columnstore/tools/passwd/secrets.cpp | 17 ++++++++--------- .../columnstore/columnstore/utils/cloudio/SocketPool.h | 1 + 7 files changed, 31 insertions(+), 11 deletions(-) (limited to 'storage/columnstore') diff --git a/storage/columnstore/columnstore/VERSION b/storage/columnstore/columnstore/VERSION index 17d053eb..35b4ad7f 100644 --- a/storage/columnstore/columnstore/VERSION +++ b/storage/columnstore/columnstore/VERSION @@ -1,4 +1,4 @@ COLUMNSTORE_VERSION_MAJOR=6 COLUMNSTORE_VERSION_MINOR=4 -COLUMNSTORE_VERSION_PATCH=7 -COLUMNSTORE_VERSION_RELEASE=2 +COLUMNSTORE_VERSION_PATCH=8 +COLUMNSTORE_VERSION_RELEASE=1 diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs.h b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs.h index 33c2c666..04ba27d3 100644 --- a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs.h +++ b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs.h @@ -118,6 +118,22 @@ class ha_mcs : public handler return HA_MAX_REC_LENGTH; } +#ifdef MARIADB_NEW_COST_MODEL + /** @brief + Called in test_quick_select to determine if indexes should be used. + */ + virtual IO_AND_CPU_COST scan_time() override + { + IO_AND_CPU_COST cost; + cost.io= 0.0; + /* + For now, assume all cost is CPU cost. + The numbers are also very inadequate for the new cost model. + */ + cost.cpu= (double)(stats.records + stats.deleted) / 20.0 + 10; + return cost; + } +#else /** @brief Called in test_quick_select to determine if indexes should be used. */ @@ -125,6 +141,7 @@ class ha_mcs : public handler { return (double)(stats.records + stats.deleted) / 20.0 + 10; } +#endif /** @brief Analyze table command. diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_impl_if.h b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_impl_if.h index 40066976..037b2598 100644 --- a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_impl_if.h +++ b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_impl_if.h @@ -30,6 +30,7 @@ #include #include #include +#include #include "idb_mysql.h" #include "ha_mcs_sysvars.h" diff --git a/storage/columnstore/columnstore/storage-manager/src/MetadataFile.cpp b/storage/columnstore/columnstore/storage-manager/src/MetadataFile.cpp index e45c9517..fb947364 100644 --- a/storage/columnstore/columnstore/storage-manager/src/MetadataFile.cpp +++ b/storage/columnstore/columnstore/storage-manager/src/MetadataFile.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #define max(x, y) (x > y ? x : y) #define min(x, y) (x < y ? x : y) diff --git a/storage/columnstore/columnstore/storage-manager/src/S3Storage.h b/storage/columnstore/columnstore/storage-manager/src/S3Storage.h index 338de2f6..a7ff7a44 100644 --- a/storage/columnstore/columnstore/storage-manager/src/S3Storage.h +++ b/storage/columnstore/columnstore/storage-manager/src/S3Storage.h @@ -18,6 +18,7 @@ #ifndef S3STORAGE_H_ #define S3STORAGE_H_ +#include #include #include #include "CloudStorage.h" diff --git a/storage/columnstore/columnstore/tools/passwd/secrets.cpp b/storage/columnstore/columnstore/tools/passwd/secrets.cpp index aac32ffa..b6096254 100644 --- a/storage/columnstore/columnstore/tools/passwd/secrets.cpp +++ b/storage/columnstore/columnstore/tools/passwd/secrets.cpp @@ -13,6 +13,7 @@ #include "secrets.h" #include +#include #include #include #include @@ -35,12 +36,11 @@ using std::string; - #ifdef OPENSSL_VERSION_PREREQ -#if OPENSSL_VERSION_PREREQ(3,0) - #define EVP_CIPHER_key_length EVP_CIPHER_get_key_length - #define EVP_CIPHER_iv_length EVP_CIPHER_get_iv_length - #define EVP_CIPHER_blocksize EVP_CIPHER_get_blocksize +#if OPENSSL_VERSION_PREREQ(3, 0) +#define EVP_CIPHER_key_length EVP_CIPHER_get_key_length +#define EVP_CIPHER_iv_length EVP_CIPHER_get_iv_length +#define EVP_CIPHER_blocksize EVP_CIPHER_get_blocksize #endif #endif @@ -96,10 +96,6 @@ void CSPasswdLogging::log(int priority, const char* format, ...) namespace { using HexLookupTable = std::array; -HexLookupTable init_hex_lookup_table() noexcept; - -// Hex char -> byte val lookup table. -const HexLookupTable hex_lookup_table = init_hex_lookup_table(); /* used in the bin2hex function */ const char hex_upper[] = "0123456789ABCDEF"; @@ -134,6 +130,9 @@ HexLookupTable init_hex_lookup_table() noexcept return rval; } +// Hex char -> byte val lookup table. +const HexLookupTable hex_lookup_table = init_hex_lookup_table(); + bool hex2bin(const char* in, unsigned int in_len, uint8_t* out) { // Input length must be multiple of two. diff --git a/storage/columnstore/columnstore/utils/cloudio/SocketPool.h b/storage/columnstore/columnstore/utils/cloudio/SocketPool.h index 7e1bc940..310171b8 100644 --- a/storage/columnstore/columnstore/utils/cloudio/SocketPool.h +++ b/storage/columnstore/columnstore/utils/cloudio/SocketPool.h @@ -18,6 +18,7 @@ #ifndef _SOCKETPOOL_H_ #define _SOCKETPOOL_H_ +#include #include #include #include -- cgit v1.2.3