diff --git a/datatypes/mcs_datatype.h b/datatypes/mcs_datatype.h index 2f01010f3..e5abe1112 100644 --- a/datatypes/mcs_datatype.h +++ b/datatypes/mcs_datatype.h @@ -20,7 +20,7 @@ #include #include #include "exceptclasses.h" -#include "conststring.h" +#include "basic/conststring.h" #include "mcs_datatype_basic.h" #include "mcs_numeric_limits.h" #include "mcs_data_condition.h" @@ -796,7 +796,7 @@ class MinMaxPartitionInfo : public MinMaxInfo uint64_t m_status; public: - MinMaxPartitionInfo() : m_status(0){}; + MinMaxPartitionInfo() : m_status(0) {}; explicit MinMaxPartitionInfo(const BRM::EMEntry& entry); void set_invalid() { @@ -1102,7 +1102,8 @@ class TypeHandlerBit : public TypeHandler idbassert(0); // QQ return 1; } - std::string format(const SimpleValue& /*v*/, const SystemCatalog::TypeAttributesStd& /*attr*/) const override + std::string format(const SimpleValue& /*v*/, + const SystemCatalog::TypeAttributesStd& /*attr*/) const override { return "0"; // QQ } @@ -1135,7 +1136,7 @@ class TypeHandlerBit : public TypeHandler const ConvertFromStringParam& /*prm*/, const std::string& /*str*/, bool& /*pushWarning*/) const override; -const uint8_t* getEmptyValueForType(const SystemCatalog::TypeAttributesStd& /*attr*/) const override + const uint8_t* getEmptyValueForType(const SystemCatalog::TypeAttributesStd& /*attr*/) const override { idbassert(0); return nullptr; @@ -2033,7 +2034,8 @@ class TypeHandlerReal : public TypeHandler { return {}; // QQ: real types were not handled in IDB_format() } - std::string format(const SimpleValue& /*v*/, const SystemCatalog::TypeAttributesStd& /*attr*/) const override + std::string format(const SimpleValue& /*v*/, + const SystemCatalog::TypeAttributesStd& /*attr*/) const override { return "0"; // QQ } @@ -2329,7 +2331,8 @@ class TypeHandlerBlob : public TypeHandlerStr { return storeValueToFieldBlobText(row, pos, f); } - std::string format(const SimpleValue& /*v*/, const SystemCatalog::TypeAttributesStd& /*attr*/) const override + std::string format(const SimpleValue& /*v*/, + const SystemCatalog::TypeAttributesStd& /*attr*/) const override { return "0"; // QQ } @@ -2355,7 +2358,8 @@ class TypeHandlerText : public TypeHandlerStr { return storeValueToFieldBlobText(row, pos, f); } - std::string format(const SimpleValue& /*v*/, const SystemCatalog::TypeAttributesStd& /*attr*/) const override + std::string format(const SimpleValue& /*v*/, + const SystemCatalog::TypeAttributesStd& /*attr*/) const override { return "0"; // QQ } @@ -2386,7 +2390,8 @@ class TypeHandlerClob : public TypeHandlerStr idbassert(0); // QQ return 1; } - std::string format(const SimpleValue& /*v*/, const SystemCatalog::TypeAttributesStd& /*attr*/) const override + std::string format(const SimpleValue& /*v*/, + const SystemCatalog::TypeAttributesStd& /*attr*/) const override { return "0"; // QQ } diff --git a/datatypes/mcs_string.h b/datatypes/mcs_string.h index dbd8feb92..e10d38177 100644 --- a/datatypes/mcs_string.h +++ b/datatypes/mcs_string.h @@ -17,8 +17,8 @@ #pragma once -#include "conststring.h" -#include "collation.h" // class Charset +#include "basic/conststring.h" +#include "basic/collation.h" // class Charset namespace datatypes { diff --git a/dbcon/ddlpackage/CMakeLists.txt b/dbcon/ddlpackage/CMakeLists.txt index 4ed7d69cc..d4fdf6280 100644 --- a/dbcon/ddlpackage/CMakeLists.txt +++ b/dbcon/ddlpackage/CMakeLists.txt @@ -42,4 +42,4 @@ columnstore_library( ${FLEX_ddl_scan_OUTPUTS} ) -columnstore_link(ddlpackage loggingcpp) +columnstore_link(ddlpackage loggingcpp messageqcpp) diff --git a/dbcon/ddlpackage/sqlparser.h b/dbcon/ddlpackage/sqlparser.h index 460433fc6..94eb629a1 100644 --- a/dbcon/ddlpackage/sqlparser.h +++ b/dbcon/ddlpackage/sqlparser.h @@ -27,7 +27,7 @@ */ #include -#include "collation.h" // CHARSET_INFO +#include "basic/collation.h" // CHARSET_INFO #include "ddlpkg.h" #include "mariadb_my_sys.h" // myf, MYF() @@ -87,7 +87,7 @@ struct pass_to_bison myf utf8_flag; pass_to_bison(ParseTree* pt) - : fParseTree(pt), scanner(NULL), default_table_charset(NULL), utf8_flag(MYF(0)){}; + : fParseTree(pt), scanner(NULL), default_table_charset(NULL), utf8_flag(MYF(0)) {}; }; class SqlParser diff --git a/dbcon/ddlpackageproc/CMakeLists.txt b/dbcon/ddlpackageproc/CMakeLists.txt index 3eed93356..ec7c90fce 100644 --- a/dbcon/ddlpackageproc/CMakeLists.txt +++ b/dbcon/ddlpackageproc/CMakeLists.txt @@ -13,4 +13,4 @@ set(ddlpackageproc_LIB_SRCS ) columnstore_library(ddlpackageproc ${ddlpackageproc_LIB_SRCS}) -columnstore_link(ddlpackageproc ${NETSNMP_LIBRARIES} loggingcpp) +columnstore_link(ddlpackageproc ${NETSNMP_LIBRARIES} loggingcpp oamcpp messageqcpp) diff --git a/dbcon/dmlpackage/CMakeLists.txt b/dbcon/dmlpackage/CMakeLists.txt index a0e4ddffa..0a138cca5 100644 --- a/dbcon/dmlpackage/CMakeLists.txt +++ b/dbcon/dmlpackage/CMakeLists.txt @@ -41,4 +41,4 @@ columnstore_library( ${FLEX_dml_scan_OUTPUTS} ) -columnstore_link(dmlpackage loggingcpp) +columnstore_link(dmlpackage loggingcpp messageqcpp) diff --git a/dbcon/dmlpackageproc/CMakeLists.txt b/dbcon/dmlpackageproc/CMakeLists.txt index 177bb799b..a60f7d89d 100644 --- a/dbcon/dmlpackageproc/CMakeLists.txt +++ b/dbcon/dmlpackageproc/CMakeLists.txt @@ -13,4 +13,4 @@ set(dmlpackageproc_LIB_SRCS ) columnstore_library(dmlpackageproc ${dmlpackageproc_LIB_SRCS}) -columnstore_link(dmlpackageproc ${NETSNMP_LIBRARIES} loggingcpp) +columnstore_link(dmlpackageproc ${NETSNMP_LIBRARIES} loggingcpp oamcpp messageqcpp) diff --git a/dbcon/execplan/CMakeLists.txt b/dbcon/execplan/CMakeLists.txt index 6e1acbb98..1aab33c6b 100755 --- a/dbcon/execplan/CMakeLists.txt +++ b/dbcon/execplan/CMakeLists.txt @@ -46,4 +46,13 @@ set(execplan_LIB_SRCS ) columnstore_library(execplan ${execplan_LIB_SRCS}) -columnstore_link(execplan messageqcpp ${NETSNMP_LIBRARIES} ${ENGINE_DT_LIB} pron loggingcpp) +columnstore_link( + execplan + messageqcpp + ${NETSNMP_LIBRARIES} + ${ENGINE_DT_LIB} + pron + oamcpp + loggingcpp + querytele +) diff --git a/dbcon/execplan/calpontsystemcatalog.h b/dbcon/execplan/calpontsystemcatalog.h index dee640c3e..bd004367c 100644 --- a/dbcon/execplan/calpontsystemcatalog.h +++ b/dbcon/execplan/calpontsystemcatalog.h @@ -49,7 +49,7 @@ #undef max #include "mcs_datatype.h" -#include "collation.h" // CHARSET_INFO, class Charset +#include "basic/collation.h" // CHARSET_INFO, class Charset #include "nullstring.h" class ExecPlanTest; @@ -75,7 +75,8 @@ const int32_t IDB_VTABLE_ID = CNX_VTABLE_ID; /** * A struct to hold a list of table partitions. */ -struct Partitions { +struct Partitions +{ std::vector fPartNames; void serialize(messageqcpp::ByteStream& b) const { @@ -96,12 +97,11 @@ struct Partitions { b >> t; fPartNames.push_back(t); } - } }; -bool operator <(const Partitions& a, const Partitions& b); -bool operator ==(const Partitions& a, const Partitions& b); -bool operator !=(const Partitions& a, const Partitions& b); // for GCC9 +bool operator<(const Partitions& a, const Partitions& b); +bool operator==(const Partitions& a, const Partitions& b); +bool operator!=(const Partitions& a, const Partitions& b); // for GCC9 /** The CalpontSystemCatalog class * @@ -259,9 +259,9 @@ class CalpontSystemCatalog : public datatypes::SystemCatalog public: 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_, - int32_t compressionType_, OID columnOID_, const ColDataType& colDataType_); + ColType(int32_t colWidth_, int32_t scale_, int32_t precision_, const ConstraintType& constraintType_, + const DictOID& ddn_, int32_t colPosition_, int32_t compressionType_, OID columnOID_, + const ColDataType& colDataType_); ColType& operator=(const ColType& rhs); CHARSET_INFO* getCharset() const; @@ -1301,8 +1301,8 @@ const int OID_SYSCOLUMN_MINVALUE = SYSCOLUMN_BASE + 19; /** @brief min va const int OID_SYSCOLUMN_MAXVALUE = SYSCOLUMN_BASE + 20; /** @brief max value col */ const int OID_SYSCOLUMN_COMPRESSIONTYPE = SYSCOLUMN_BASE + 21; /** @brief compression type */ const int OID_SYSCOLUMN_NEXTVALUE = SYSCOLUMN_BASE + 22; /** @brief next value */ -const int OID_SYSCOLUMN_CHARSETNUM = SYSCOLUMN_BASE + 23; /** @brief character set number for the column */ -const int SYSCOLUMN_MAX = SYSCOLUMN_BASE + 24; // be sure this is one more than the highest # +const int OID_SYSCOLUMN_CHARSETNUM = SYSCOLUMN_BASE + 23; /** @brief character set number for the column */ +const int SYSCOLUMN_MAX = SYSCOLUMN_BASE + 24; // be sure this is one more than the highest # /***************************************************** * SYSTABLE columns dictionary OID definition diff --git a/dbcon/execplan/predicateoperator.h b/dbcon/execplan/predicateoperator.h index 434c2c768..b1ef1fa98 100644 --- a/dbcon/execplan/predicateoperator.h +++ b/dbcon/execplan/predicateoperator.h @@ -39,7 +39,7 @@ #include "returnedcolumn.h" #include "dataconvert.h" -#include "collation.h" // CHARSET_INFO +#include "basic/collation.h" // CHARSET_INFO namespace messageqcpp { diff --git a/dbcon/execplan/pseudocolumn.cpp b/dbcon/execplan/pseudocolumn.cpp index a6055489e..399e1c785 100644 --- a/dbcon/execplan/pseudocolumn.cpp +++ b/dbcon/execplan/pseudocolumn.cpp @@ -28,7 +28,7 @@ using namespace std; #include "basic/string_utils.h" #include "bytestream.h" -#include "collation.h" +#include "basic/collation.h" using namespace messageqcpp; diff --git a/dbcon/joblist/CMakeLists.txt b/dbcon/joblist/CMakeLists.txt index 3783ccf14..80755946e 100644 --- a/dbcon/joblist/CMakeLists.txt +++ b/dbcon/joblist/CMakeLists.txt @@ -68,7 +68,7 @@ columnstore_library(joblist ${joblist_LIB_SRCS}) target_include_directories( joblist BEFORE PUBLIC ${OPENSSL_INCLUDE_DIR} ${LIBMARIADB_BININC_DIR} ${LIBMARIADB_SRCINC_DIR} ) -columnstore_link(joblist loggingcpp) +columnstore_link(joblist loggingcpp boost_thread oamcpp querytele messageqcpp) if(WITH_ORDERBY_UT) columnstore_executable(job_orderby_tests orderby-tests.cpp) diff --git a/oam/oamcpp/CMakeLists.txt b/oam/oamcpp/CMakeLists.txt index d5b4ac307..cdce7a55b 100644 --- a/oam/oamcpp/CMakeLists.txt +++ b/oam/oamcpp/CMakeLists.txt @@ -5,6 +5,6 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(oamcpp_LIB_SRCS liboamcpp.cpp oamcache.cpp) columnstore_library(oamcpp ${oamcpp_LIB_SRCS}) -columnstore_link(oamcpp loggingcpp) +columnstore_link(oamcpp loggingcpp idbboot) target_compile_options(oamcpp PRIVATE -Wno-unused-result) diff --git a/primitives/primproc/CMakeLists.txt b/primitives/primproc/CMakeLists.txt index cd1232812..28516ff39 100644 --- a/primitives/primproc/CMakeLists.txt +++ b/primitives/primproc/CMakeLists.txt @@ -3,25 +3,26 @@ include_directories(${ENGINE_COMMON_INCLUDES} ../blockcache ../linux-port) # ########## next target ############### set(PrimProc_SRCS - primproc.cpp + activestatementcounter.cpp batchprimitiveprocessor.cpp bppseeder.cpp bppsendthread.cpp columncommand.cpp command.cpp dictstep.cpp + femsghandler.cpp filtercommand.cpp logger.cpp passthrucommand.cpp primitiveserver.cpp + primproc.cpp pseudocc.cpp + rssmonfcn.cpp rtscommand.cpp - umsocketselector.cpp + samenodepseudosocket.cpp serviceexemgr.cpp sqlfrontsessionthread.cpp - rssmonfcn.cpp - activestatementcounter.cpp - femsghandler.cpp + umsocketselector.cpp ../../utils/common/crashtrace.cpp ) diff --git a/utils/messageqcpp/samenodepseudosocket.cpp b/primitives/primproc/samenodepseudosocket.cpp similarity index 100% rename from utils/messageqcpp/samenodepseudosocket.cpp rename to primitives/primproc/samenodepseudosocket.cpp diff --git a/utils/messageqcpp/samenodepseudosocket.h b/primitives/primproc/samenodepseudosocket.h similarity index 100% rename from utils/messageqcpp/samenodepseudosocket.h rename to primitives/primproc/samenodepseudosocket.h diff --git a/storage-manager/CMakeLists.txt b/storage-manager/CMakeLists.txt index c72171cbd..1b01b403f 100755 --- a/storage-manager/CMakeLists.txt +++ b/storage-manager/CMakeLists.txt @@ -64,7 +64,7 @@ configure_file( link_directories(${CMAKE_BINARY_DIR}/lib) set(CMAKE_INSTALL_RPATH $ORIGIN $ORIGIN/../lib) -columnstore_library(storagemanager SHARED ${storagemanager_SRCS}) +columnstore_library(storagemanager ${storagemanager_SRCS}) add_dependencies(storagemanager marias3 external_boost) target_compile_definitions(storagemanager PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS) diff --git a/utils/common/collation.h b/utils/basic/collation.h similarity index 99% rename from utils/common/collation.h rename to utils/basic/collation.h index e5781b8d9..411eca6aa 100644 --- a/utils/common/collation.h +++ b/utils/basic/collation.h @@ -35,7 +35,7 @@ #include "mcsconfig.h" #include "exceptclasses.h" -#include "conststring.h" +#include "basic/conststring.h" /* Redefine definitions used by MariaDB m_ctype.h. diff --git a/utils/common/conststring.h b/utils/basic/conststring.h similarity index 100% rename from utils/common/conststring.h rename to utils/basic/conststring.h diff --git a/utils/batchloader/CMakeLists.txt b/utils/batchloader/CMakeLists.txt index 25f58197e..082ef98cf 100644 --- a/utils/batchloader/CMakeLists.txt +++ b/utils/batchloader/CMakeLists.txt @@ -6,4 +6,4 @@ set(batchloader_LIB_SRCS batchloader.cpp) columnstore_library(batchloader ${batchloader_LIB_SRCS}) -columnstore_link(batchloader ${NETSNMP_LIBRARIES} loggingcpp) +columnstore_link(batchloader ${NETSNMP_LIBRARIES} oamcpp loggingcpp) diff --git a/utils/cacheutils/CMakeLists.txt b/utils/cacheutils/CMakeLists.txt index 0c9c5d63c..666834835 100644 --- a/utils/cacheutils/CMakeLists.txt +++ b/utils/cacheutils/CMakeLists.txt @@ -5,4 +5,4 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(cacheutils_LIB_SRCS cacheutils.cpp) columnstore_library(cacheutils ${cacheutils_LIB_SRCS}) -columnstore_link(cacheutils messageqcpp) +columnstore_link(cacheutils messageqcpp boost_thread) diff --git a/utils/cloudio/CMakeLists.txt b/utils/cloudio/CMakeLists.txt index c5bb954d0..131030ace 100755 --- a/utils/cloudio/CMakeLists.txt +++ b/utils/cloudio/CMakeLists.txt @@ -14,7 +14,7 @@ columnstore_library(cloudio ${cloudio_LIB_SRCS}) # IDBDataFile currently depends on cloudio, which is backward. Once cloudio has been turned into a proper plugin for # idbdatafile, we should be able to reverse the dependency like so: -columnstore_link(cloudio idbdatafile messageqcpp) +columnstore_link(cloudio idbdatafile messageqcpp boost_thread) add_executable(cloudio_component_test component_test.cpp) add_executable(cloudio_end_to_end_test end_to_end_test.cpp) diff --git a/utils/common/genericparser.h b/utils/common/genericparser.h index d2bce2d26..8f4c67101 100644 --- a/utils/common/genericparser.h +++ b/utils/common/genericparser.h @@ -17,7 +17,7 @@ #pragma once -#include "conststring.h" +#include "basic/conststring.h" namespace genericparser { diff --git a/utils/common/hashfamily.h b/utils/common/hashfamily.h index 4b09e01a8..a8fa663ea 100644 --- a/utils/common/hashfamily.h +++ b/utils/common/hashfamily.h @@ -18,7 +18,7 @@ #pragma once #include "hasher.h" -#include "collation.h" +#include "basic/collation.h" namespace utils { diff --git a/utils/common/nullstring.h b/utils/common/nullstring.h index 313a5bcb9..0b4bd62a9 100644 --- a/utils/common/nullstring.h +++ b/utils/common/nullstring.h @@ -25,7 +25,7 @@ #include #include #include "exceptclasses.h" -#include "conststring.h" +#include "basic/conststring.h" #include "mcs_datatype_basic.h" namespace utils diff --git a/utils/common/string_prefixes.cpp b/utils/common/string_prefixes.cpp index 9f9c5c2e7..1ef6ff16b 100644 --- a/utils/common/string_prefixes.cpp +++ b/utils/common/string_prefixes.cpp @@ -18,7 +18,7 @@ /* handling of the conversion of string prefixes to int64_t for quick range checking */ -#include "collation.h" +#include "basic/collation.h" #include "joblisttypes.h" #include "string_prefixes.h" diff --git a/utils/common/syncstream.h b/utils/common/syncstream.h deleted file mode 100644 index d00b41150..000000000 --- a/utils/common/syncstream.h +++ /dev/null @@ -1,157 +0,0 @@ -/* Copyright (C) 2014 InfiniDB, Inc. - - 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 Foundation; version 2 of - the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - MA 02110-1301, USA. */ - -/** @file */ - -/* - * classes isyncstream and osyncstream provide a C++ iostream interface - * for C stdio FILE* streams. The current implementation does not provide - * the necessary methods to support seeking. The I/O buffering of the - * input FILE* is used. The C++ iostream library calls syncbuf::sync() - * for every line, so output buffering is line-by-line. - * */ - -/* -#include "syncstream.h" - -void copyStream(istream& iss, ostream& oss) -{ - string line; - getline(iss, line); - while (iss.good()) - { - oss << line << endl; - getline(iss, line); - } -} - -main() -{ - FILE* ifp; - FILE* ofp; - - ... - - isyncstream iss(ifp); - osyncstream oss(ofp); - - copyStream(iss, oss); - - ... -} -*/ - -#pragma once - -#include -#include - -namespace syncstream -{ -/** A streambuf implementation for C stdio FILE* streams. - * - * Adapted from http://www.drdobbs.com/184401305 - */ -class syncbuf : public std::streambuf -{ - public: - /** ctor */ - syncbuf(FILE* f) : std::streambuf(), fptr(f) - { - } - - protected: - /** Write character in the case of overflow */ - virtual int overflow(int c = EOF) - { - return (c != EOF ? fputc(c, fptr) : EOF); - } - /** Get character in the case of overflow */ - virtual int underflow() - { - int c = getc(fptr); - - if (c != EOF) - ungetc(c, fptr); - - return c; - } - /** Get character in the case of overflow and advance get pointer */ - virtual int uflow() - { - return getc(fptr); - } - /** put character back in the case of backup underflow */ - virtual int pbackfail(int c = EOF) - { - return (c != EOF ? ungetc(c, fptr) : EOF); - } - /** Synchronize stream buffer */ - virtual int sync() - { - return fflush(fptr); - } - - private: - FILE* fptr; -}; - -/** An istream adaptor for input FILE* streams */ -class isyncstream : public std::istream -{ - public: - /** ctor */ - isyncstream() : istream(&buf), buf(0) - { - } - /** ctor */ - isyncstream(FILE* fptr) : istream(&buf), buf(fptr) - { - } - /** const streambuf accessor */ - const syncbuf* rdbuf() const - { - return &buf; - } - - private: - syncbuf buf; -}; - -/** An ostream adaptor for output FILE* streams */ -class osyncstream : public std::ostream -{ - public: - /** ctor */ - osyncstream() : ostream(&buf), buf(0) - { - } - /** ctor */ - osyncstream(FILE* fptr) : ostream(&buf), buf(fptr) - { - } - /** const streambuf accessor */ - const syncbuf* rdbuf() const - { - return &buf; - } - - private: - syncbuf buf; -}; - -} // namespace syncstream diff --git a/utils/funcexp/functor_json.h b/utils/funcexp/functor_json.h index 55c4d1b5f..603a3b26a 100644 --- a/utils/funcexp/functor_json.h +++ b/utils/funcexp/functor_json.h @@ -7,7 +7,7 @@ #include #include -#include "collation.h" +#include "basic/collation.h" #include "functor_bool.h" #include "functor_int.h" #include "functor_str.h" diff --git a/utils/funcexp/jsonhelpers.h b/utils/funcexp/jsonhelpers.h index 2756925b8..34c6ea6cc 100644 --- a/utils/funcexp/jsonhelpers.h +++ b/utils/funcexp/jsonhelpers.h @@ -10,10 +10,10 @@ #include // #include -#include "collation.h" +#include "basic/collation.h" #include "functor_json.h" #include "functor_str.h" -#include "collation.h" +#include "basic/collation.h" #include "rowgroup.h" #include "treenode.h" #include "functioncolumn.h" diff --git a/utils/idbdatafile/CMakeLists.txt b/utils/idbdatafile/CMakeLists.txt index 06a1ebf44..86ddd93ba 100644 --- a/utils/idbdatafile/CMakeLists.txt +++ b/utils/idbdatafile/CMakeLists.txt @@ -14,4 +14,12 @@ set(idbdatafile_LIB_SRCS ) columnstore_library(idbdatafile ${idbdatafile_LIB_SRCS}) -columnstore_link(idbdatafile PRIVATE ${NETSNMP_LIBRARIES} ${ENGINE_OAM_LIBS} boost_filesystem boost_system) +columnstore_link( + idbdatafile + PRIVATE + ${NETSNMP_LIBRARIES} + ${ENGINE_OAM_LIBS} + boost_filesystem + boost_system + compress +) diff --git a/utils/joiner/CMakeLists.txt b/utils/joiner/CMakeLists.txt index 0df5c60f7..1d636162c 100644 --- a/utils/joiner/CMakeLists.txt +++ b/utils/joiner/CMakeLists.txt @@ -5,4 +5,4 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(joiner_LIB_SRCS tuplejoiner.cpp joinpartition.cpp) columnstore_library(joiner ${joiner_LIB_SRCS}) -columnstore_link(joiner PRIVATE loggingcpp) +columnstore_link(joiner PRIVATE loggingcpp rowgroup datatypes compress) diff --git a/utils/messageqcpp/CMakeLists.txt b/utils/messageqcpp/CMakeLists.txt index 527e9395a..c41a88168 100644 --- a/utils/messageqcpp/CMakeLists.txt +++ b/utils/messageqcpp/CMakeLists.txt @@ -8,7 +8,6 @@ set(messageqcpp_LIB_SRCS iosocket.cpp messagequeue.cpp messagequeuepool.cpp - samenodepseudosocket.cpp socketparms.cpp ) diff --git a/utils/querystats/CMakeLists.txt b/utils/querystats/CMakeLists.txt index 0d91ead9e..ff6b13f91 100644 --- a/utils/querystats/CMakeLists.txt +++ b/utils/querystats/CMakeLists.txt @@ -5,4 +5,4 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(querystats_LIB_SRCS querystats.cpp) columnstore_library(querystats ${querystats_LIB_SRCS}) -columnstore_link(querystats PRIVATE loggingcpp) +columnstore_link(querystats PRIVATE loggingcpp messageqcpp) diff --git a/utils/querytele/CMakeLists.txt b/utils/querytele/CMakeLists.txt index f5e58ae60..9fd9af6a9 100644 --- a/utils/querytele/CMakeLists.txt +++ b/utils/querytele/CMakeLists.txt @@ -5,7 +5,7 @@ set(querytele_LIB_SRCS querytele.cpp queryteleclient.cpp querytele_constants.cpp ) columnstore_library(querytele ${querytele_LIB_SRCS}) -columnstore_link(querytele ${THRIFT_LIBRARY}) +columnstore_link(querytele ${THRIFT_LIBRARY} boost_thread) target_include_directories(querytele PRIVATE ${THRIFT_INCLUDE_DIRS}) -add_dependencies(querytele external_boost external_thrift) +add_dependencies(querytele external_thrift) diff --git a/utils/regr/CMakeLists.txt b/utils/regr/CMakeLists.txt index f2f378f34..60676a503 100755 --- a/utils/regr/CMakeLists.txt +++ b/utils/regr/CMakeLists.txt @@ -21,7 +21,7 @@ set(regr_LIB_SRCS add_definitions(-DMYSQL_DYNAMIC_PLUGIN) columnstore_library(regr ${regr_LIB_SRCS}) -columnstore_link(regr PRIVATE loggingcpp) +columnstore_link(regr PRIVATE loggingcpp messageqcpp) set(regr_mysql_LIB_SRCS regrmysql.cpp modamysql.cpp) diff --git a/utils/regr/moda.h b/utils/regr/moda.h index aaa7fc771..878e93ac2 100644 --- a/utils/regr/moda.h +++ b/utils/regr/moda.h @@ -45,7 +45,7 @@ #include "calpontsystemcatalog.h" #include "windowfunctioncolumn.h" #include "hasher.h" -#include "collation.h" +#include "basic/collation.h" #define EXPORT @@ -277,7 +277,7 @@ class Moda_impl_T : public mcsv1_UDAF { public: // Defaults OK - Moda_impl_T() : cs(8){}; + Moda_impl_T() : cs(8) {}; ~Moda_impl_T() override = default; mcsv1_UDAF::ReturnCode init(mcsv1Context* context, ColumnDatum* colTypes) override; @@ -305,7 +305,7 @@ class moda : public mcsv1_UDAF { public: // Defaults OK - moda() : mcsv1_UDAF(){}; + moda() : mcsv1_UDAF() {}; ~moda() override = default; mcsv1_UDAF::ReturnCode init(mcsv1Context* context, ColumnDatum* colTypes) override; diff --git a/utils/rowgroup/CMakeLists.txt b/utils/rowgroup/CMakeLists.txt index 2ba4c2d46..6a02b8cc0 100644 --- a/utils/rowgroup/CMakeLists.txt +++ b/utils/rowgroup/CMakeLists.txt @@ -5,5 +5,5 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(rowgroup_LIB_SRCS rowaggregation.cpp rowgroup.cpp rowstorage.cpp) columnstore_library(rowgroup ${rowgroup_LIB_SRCS}) -columnstore_link(rowgroup PRIVATE ${NETSNMP_LIBRARIES} funcexp loggingcpp) +columnstore_link(rowgroup PRIVATE ${NETSNMP_LIBRARIES} funcexp loggingcpp compress) add_dependencies(rowgroup external_boost) diff --git a/utils/rowgroup/rowgroup.h b/utils/rowgroup/rowgroup.h index 50baf681c..907aa8145 100644 --- a/utils/rowgroup/rowgroup.h +++ b/utils/rowgroup/rowgroup.h @@ -53,7 +53,7 @@ #include "branchpred.h" #include "datatypes/mcs_int128.h" -#include "collation.h" +#include "basic/collation.h" #include "common/hashfamily.h" #include "buffertypes.h" diff --git a/utils/threadpool/CMakeLists.txt b/utils/threadpool/CMakeLists.txt index 1502bb4b3..496fba57a 100644 --- a/utils/threadpool/CMakeLists.txt +++ b/utils/threadpool/CMakeLists.txt @@ -2,6 +2,4 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(threadpool_LIB_SRCS weightedthreadpool.cpp threadpool.cpp prioritythreadpool.cpp fair_threadpool.cpp) columnstore_library(threadpool ${threadpool_LIB_SRCS}) -columnstore_link(threadpool PRIVATE boost_chrono loggingcpp) - -add_dependencies(threadpool external_boost) +columnstore_link(threadpool PRIVATE boost_chrono boost_thread loggingcpp messageqcpp) diff --git a/utils/udfsdk/CMakeLists.txt b/utils/udfsdk/CMakeLists.txt index e13f07ab2..a1be05476 100755 --- a/utils/udfsdk/CMakeLists.txt +++ b/utils/udfsdk/CMakeLists.txt @@ -11,7 +11,7 @@ set(udfsdk_LIB_SRCS ) columnstore_library(udfsdk ${udfsdk_LIB_SRCS}) -columnstore_link(udfsdk PRIVATE loggingcpp) +columnstore_link(udfsdk PRIVATE loggingcpp messageqcpp) # Do anyone use it? add_definitions(-DMYSQL_DYNAMIC_PLUGIN) diff --git a/versioning/BRM/CMakeLists.txt b/versioning/BRM/CMakeLists.txt index 4468c1c05..96378c9bd 100644 --- a/versioning/BRM/CMakeLists.txt +++ b/versioning/BRM/CMakeLists.txt @@ -34,7 +34,7 @@ set(brm_LIB_SRCS ) columnstore_library(brm ${brm_LIB_SRCS}) -columnstore_link(brm loggingcpp datatypes) +columnstore_link(brm loggingcpp datatypes oamcpp boost_thread messageqcpp) # ########## next target ############### diff --git a/writeengine/bulk/CMakeLists.txt b/writeengine/bulk/CMakeLists.txt index 0bb90a586..e5a062dc3 100644 --- a/writeengine/bulk/CMakeLists.txt +++ b/writeengine/bulk/CMakeLists.txt @@ -38,7 +38,7 @@ remove_definitions(-D_FILE_OFFSET_BITS=64) set(cpimport.bin_SRCS cpimport.cpp) columnstore_executable(cpimport.bin ${cpimport.bin_SRCS}) -add_dependencies(cpimport.bin marias3) + columnstore_link( cpimport.bin ${ENGINE_LDFLAGS} @@ -47,4 +47,5 @@ columnstore_link( ${S3API_DEPS} we_bulk we_xml + marias3 ) diff --git a/writeengine/client/CMakeLists.txt b/writeengine/client/CMakeLists.txt index 52633ceca..532fc8b3a 100644 --- a/writeengine/client/CMakeLists.txt +++ b/writeengine/client/CMakeLists.txt @@ -5,7 +5,4 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(writeengineclient_LIB_SRCS we_clients.cpp we_ddlcommandclient.cpp we_dmlcommandclient.cpp) columnstore_library(writeengineclient ${writeengineclient_LIB_SRCS}) - -add_dependencies(writeengineclient loggingcpp) - -columnstore_link(writeengineclient ${NETSNMP_LIBRARIES}) +columnstore_link(writeengineclient ${NETSNMP_LIBRARIES} boost_thread oamcpp messageqcpp loggingcpp) diff --git a/writeengine/redistribute/CMakeLists.txt b/writeengine/redistribute/CMakeLists.txt index 29b8b94ee..bf8cd172e 100644 --- a/writeengine/redistribute/CMakeLists.txt +++ b/writeengine/redistribute/CMakeLists.txt @@ -7,9 +7,6 @@ set(writeengineredistribute_LIB_SRCS we_redistribute.cpp we_redistributecontrol. ) columnstore_library(writeengineredistribute ${writeengineredistribute_LIB_SRCS}) - -add_dependencies(writeengineredistribute loggingcpp) - -columnstore_link(writeengineredistribute ${NETSNMP_LIBRARIES}) +columnstore_link(writeengineredistribute ${NETSNMP_LIBRARIES} loggingcpp oamcpp boost_thread messageqcpp) target_compile_definitions(writeengineredistribute PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS) diff --git a/writeengine/server/CMakeLists.txt b/writeengine/server/CMakeLists.txt index 9ebc5cd72..9d39d4193 100644 --- a/writeengine/server/CMakeLists.txt +++ b/writeengine/server/CMakeLists.txt @@ -18,9 +18,12 @@ set(WriteEngineServer_SRCS ) columnstore_executable(WriteEngineServer ${WriteEngineServer_SRCS}) - -add_dependencies(WriteEngineServer loggingcpp) - columnstore_link( - WriteEngineServer ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} threadpool writeengineredistribute + WriteEngineServer + ${ENGINE_LDFLAGS} + ${NETSNMP_LIBRARIES} + ${ENGINE_WRITE_LIBS} + threadpool + writeengineredistribute + loggingcpp ) diff --git a/writeengine/shared/we_type.h b/writeengine/shared/we_type.h index 7772351ab..fd447cf78 100644 --- a/writeengine/shared/we_type.h +++ b/writeengine/shared/we_type.h @@ -40,7 +40,7 @@ #include "IDBDataFile.h" #include "IDBPolicy.h" #include "nullstring.h" -#include "collation.h" // For CHARSET_INFO struct +#include "basic/collation.h" // For CHARSET_INFO struct #undef EXPORT #undef DELETE @@ -408,8 +408,8 @@ struct JobColumn /** @brief Job Column Structure */ int compressionType; /** @brief compression type */ bool autoIncFlag; /** @brief auto increment flag */ DctnryStruct dctnry; /** @brief dictionary structure */ - int128_t fMinIntSat; /** @brief For integer type, the min saturation value */ - uint128_t fMaxIntSat; /** @brief For integer type, the max saturation value */ + int128_t fMinIntSat; /** @brief For integer type, the min saturation value */ + uint128_t fMaxIntSat; /** @brief For integer type, the max saturation value */ double fMinDblSat; /** @brief for float/double, the min saturation value */ double fMaxDblSat; /** @brief for float/double, the max saturation value */ bool fWithDefault; /** @brief With default */ @@ -447,10 +447,9 @@ struct JobColumn /** @brief Job Column Structure */ , cs(nullptr) { } - JobColumn(const std::string& colName_, OID mapOid_, const std::string& typeName_, - int width_, int definedWidth_, int compressionType_, int dctnryCompressionType_, - int64_t minIntSat_, uint64_t maxIntSat_, bool withDefault_, - unsigned long long defaultUInt_) + JobColumn(const std::string& colName_, OID mapOid_, const std::string& typeName_, int width_, + int definedWidth_, int compressionType_, int dctnryCompressionType_, int64_t minIntSat_, + uint64_t maxIntSat_, bool withDefault_, unsigned long long defaultUInt_) : colName(colName_) , mapOid(mapOid_) , dataType(execplan::CalpontSystemCatalog::INT) diff --git a/writeengine/splitter/CMakeLists.txt b/writeengine/splitter/CMakeLists.txt index 7b05928f6..b3fdcf9e0 100644 --- a/writeengine/splitter/CMakeLists.txt +++ b/writeengine/splitter/CMakeLists.txt @@ -16,8 +16,6 @@ set(cpimport_SRCS columnstore_executable(cpimport ${cpimport_SRCS}) -add_dependencies(cpimport loggingcpp) - columnstore_link( cpimport ${ENGINE_LDFLAGS} @@ -27,4 +25,5 @@ columnstore_link( threadpool marias3 boost_program_options + loggingcpp ) diff --git a/writeengine/wrapper/CMakeLists.txt b/writeengine/wrapper/CMakeLists.txt index 28a7b50f9..131b7effb 100644 --- a/writeengine/wrapper/CMakeLists.txt +++ b/writeengine/wrapper/CMakeLists.txt @@ -37,7 +37,12 @@ set(writeengine_LIB_SRCS add_definitions(-D_FILE_OFFSET_BITS=64) columnstore_library(writeengine ${writeengine_LIB_SRCS}) - -add_dependencies(writeengine loggingcpp) - -columnstore_link(writeengine ${NETSNMP_LIBRARIES}) +columnstore_link( + writeengine + ${NETSNMP_LIBRARIES} + loggingcpp + oamcpp + boost_thread + compress + messageqcpp +) diff --git a/writeengine/xml/CMakeLists.txt b/writeengine/xml/CMakeLists.txt index 98ab2fbb3..2ef5b0e51 100644 --- a/writeengine/xml/CMakeLists.txt +++ b/writeengine/xml/CMakeLists.txt @@ -6,6 +6,5 @@ set(we_xml_STAT_SRCS we_xmlop.cpp we_xmljob.cpp we_xmlgendata.cpp we_xmlgenproc. add_definitions(-D_FILE_OFFSET_BITS=64) -add_library(we_xml STATIC ${we_xml_STAT_SRCS}) - -add_dependencies(we_xml loggingcpp) +columnstore_static_library(we_xml ${we_xml_STAT_SRCS}) +columnstore_link(we_xml loggingcpp)