From 1c9cd9db9fcd6443493a2effe83ec0b36165da7f Mon Sep 17 00:00:00 2001 From: Leonid Fedorov <79837786+mariadb-LeonidFedorov@users.noreply.github.com> Date: Wed, 6 Sep 2023 20:01:31 +0300 Subject: [PATCH] Fix garbage charset using ColType(int32_t colWidth_, int32_t scale_, int32_t precision_, (#2949) const ConstraintType& constraintType_, const DictOID& ddn_, int32_t colPosition_, int32_t compressionType_, OID columnOID_, const ColDataType& colDataType_); --- dbcon/execplan/calpontsystemcatalog.cpp | 12 ------------ dbcon/execplan/calpontsystemcatalog.h | 18 +++++++++--------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/dbcon/execplan/calpontsystemcatalog.cpp b/dbcon/execplan/calpontsystemcatalog.cpp index c577c2631..53294ccc1 100644 --- a/dbcon/execplan/calpontsystemcatalog.cpp +++ b/dbcon/execplan/calpontsystemcatalog.cpp @@ -6146,18 +6146,6 @@ void CalpontSystemCatalog::checkSysCatVer() } } -CalpontSystemCatalog::ColType::ColType() - : constraintType(NO_CONSTRAINT) - , colPosition(-1) - , compressionType(NO_COMPRESSION) - , columnOID(0) - , autoincrement(0) - , nextvalue(0) - , cs(NULL) -{ - charsetNumber = default_charset_info->number; -} - CalpontSystemCatalog::ColType::ColType(const ColType& rhs) : TypeHolderStd(rhs) { constraintType = rhs.constraintType; diff --git a/dbcon/execplan/calpontsystemcatalog.h b/dbcon/execplan/calpontsystemcatalog.h index baa10446f..bbce5ef3f 100644 --- a/dbcon/execplan/calpontsystemcatalog.h +++ b/dbcon/execplan/calpontsystemcatalog.h @@ -215,22 +215,22 @@ class CalpontSystemCatalog : public datatypes::SystemCatalog */ struct ColType : public datatypes::SystemCatalog::TypeHolderStd { - ConstraintType constraintType; + ConstraintType constraintType = NO_CONSTRAINT; DictOID ddn; NullString defaultValue; - int32_t colPosition; // temporally put here. may need to have ColInfo struct later - int32_t compressionType; - OID columnOID; - bool autoincrement; // set to true if SYSCOLUMN autoincrement is �y� - uint64_t nextvalue; // next autoincrement value - uint32_t charsetNumber; - const CHARSET_INFO* cs; + int32_t colPosition = -1; // temporally put here. may need to have ColInfo struct later + int32_t compressionType = NO_COMPRESSION; + OID columnOID = 0; + bool autoincrement = 0; // set to true if SYSCOLUMN autoincrement is �y� + uint64_t nextvalue = 0; // next autoincrement value + uint32_t charsetNumber = default_charset_info->number; + const CHARSET_INFO* cs = nullptr; private: long timeZone; public: - ColType(); + ColType() = default; ColType(const ColType& rhs); ColType(int32_t colWidth_, int32_t scale_, int32_t precision_, const ConstraintType& constraintType_, const DictOID& ddn_, int32_t colPosition_,