diff --git a/datatypes/mcs_datatype.h b/datatypes/mcs_datatype.h index 0d8706c91..20a78c763 100644 --- a/datatypes/mcs_datatype.h +++ b/datatypes/mcs_datatype.h @@ -20,7 +20,7 @@ #include #include #include "exceptclasses.h" -#include "basic/conststring.h" +#include "conststring.h" #include "mcs_datatype_basic.h" #include "mcs_numeric_limits.h" #include "mcs_data_condition.h" @@ -794,7 +794,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() { @@ -1100,8 +1100,7 @@ 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 } @@ -1134,7 +1133,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,8 +2032,7 @@ 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 } @@ -2330,8 +2328,7 @@ 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 } @@ -2357,8 +2354,7 @@ 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 } @@ -2389,8 +2385,7 @@ 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 e10d38177..dbd8feb92 100644 --- a/datatypes/mcs_string.h +++ b/datatypes/mcs_string.h @@ -17,8 +17,8 @@ #pragma once -#include "basic/conststring.h" -#include "basic/collation.h" // class Charset +#include "conststring.h" +#include "collation.h" // class Charset namespace datatypes { diff --git a/dbcon/ddlpackage/CMakeLists.txt b/dbcon/ddlpackage/CMakeLists.txt index d4fdf6280..4ed7d69cc 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 messageqcpp) +columnstore_link(ddlpackage loggingcpp) diff --git a/dbcon/ddlpackage/sqlparser.h b/dbcon/ddlpackage/sqlparser.h index 94eb629a1..460433fc6 100644 --- a/dbcon/ddlpackage/sqlparser.h +++ b/dbcon/ddlpackage/sqlparser.h @@ -27,7 +27,7 @@ */ #include -#include "basic/collation.h" // CHARSET_INFO +#include "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 ec7c90fce..3eed93356 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 oamcpp messageqcpp) +columnstore_link(ddlpackageproc ${NETSNMP_LIBRARIES} loggingcpp) diff --git a/dbcon/dmlpackage/CMakeLists.txt b/dbcon/dmlpackage/CMakeLists.txt index 0a138cca5..a0e4ddffa 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 messageqcpp) +columnstore_link(dmlpackage loggingcpp) diff --git a/dbcon/dmlpackageproc/CMakeLists.txt b/dbcon/dmlpackageproc/CMakeLists.txt index a60f7d89d..177bb799b 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 oamcpp messageqcpp) +columnstore_link(dmlpackageproc ${NETSNMP_LIBRARIES} loggingcpp) diff --git a/dbcon/execplan/CMakeLists.txt b/dbcon/execplan/CMakeLists.txt index 1aab33c6b..6e1acbb98 100755 --- a/dbcon/execplan/CMakeLists.txt +++ b/dbcon/execplan/CMakeLists.txt @@ -46,13 +46,4 @@ set(execplan_LIB_SRCS ) columnstore_library(execplan ${execplan_LIB_SRCS}) -columnstore_link( - execplan - messageqcpp - ${NETSNMP_LIBRARIES} - ${ENGINE_DT_LIB} - pron - oamcpp - loggingcpp - querytele -) +columnstore_link(execplan messageqcpp ${NETSNMP_LIBRARIES} ${ENGINE_DT_LIB} pron loggingcpp) diff --git a/dbcon/execplan/calpontsystemcatalog.h b/dbcon/execplan/calpontsystemcatalog.h index bd004367c..dee640c3e 100644 --- a/dbcon/execplan/calpontsystemcatalog.h +++ b/dbcon/execplan/calpontsystemcatalog.h @@ -49,7 +49,7 @@ #undef max #include "mcs_datatype.h" -#include "basic/collation.h" // CHARSET_INFO, class Charset +#include "collation.h" // CHARSET_INFO, class Charset #include "nullstring.h" class ExecPlanTest; @@ -75,8 +75,7 @@ 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 { @@ -97,11 +96,12 @@ 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 b1ef1fa98..434c2c768 100644 --- a/dbcon/execplan/predicateoperator.h +++ b/dbcon/execplan/predicateoperator.h @@ -39,7 +39,7 @@ #include "returnedcolumn.h" #include "dataconvert.h" -#include "basic/collation.h" // CHARSET_INFO +#include "collation.h" // CHARSET_INFO namespace messageqcpp { diff --git a/dbcon/execplan/pseudocolumn.cpp b/dbcon/execplan/pseudocolumn.cpp index 399e1c785..a6055489e 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 "basic/collation.h" +#include "collation.h" using namespace messageqcpp; diff --git a/dbcon/joblist/CMakeLists.txt b/dbcon/joblist/CMakeLists.txt index 80755946e..3783ccf14 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 boost_thread oamcpp querytele messageqcpp) +columnstore_link(joblist loggingcpp) 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 cdce7a55b..d5b4ac307 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 idbboot) +columnstore_link(oamcpp loggingcpp) target_compile_options(oamcpp PRIVATE -Wno-unused-result) diff --git a/primitives/primproc/CMakeLists.txt b/primitives/primproc/CMakeLists.txt index 28516ff39..cd1232812 100644 --- a/primitives/primproc/CMakeLists.txt +++ b/primitives/primproc/CMakeLists.txt @@ -3,26 +3,25 @@ include_directories(${ENGINE_COMMON_INCLUDES} ../blockcache ../linux-port) # ########## next target ############### set(PrimProc_SRCS - activestatementcounter.cpp + primproc.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 - samenodepseudosocket.cpp + umsocketselector.cpp serviceexemgr.cpp sqlfrontsessionthread.cpp - umsocketselector.cpp + rssmonfcn.cpp + activestatementcounter.cpp + femsghandler.cpp ../../utils/common/crashtrace.cpp ) diff --git a/storage-manager/CMakeLists.txt b/storage-manager/CMakeLists.txt index 1b01b403f..c72171cbd 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 ${storagemanager_SRCS}) +columnstore_library(storagemanager SHARED ${storagemanager_SRCS}) add_dependencies(storagemanager marias3 external_boost) target_compile_definitions(storagemanager PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS) diff --git a/utils/batchloader/CMakeLists.txt b/utils/batchloader/CMakeLists.txt index 082ef98cf..25f58197e 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} oamcpp loggingcpp) +columnstore_link(batchloader ${NETSNMP_LIBRARIES} loggingcpp) diff --git a/utils/cacheutils/CMakeLists.txt b/utils/cacheutils/CMakeLists.txt index 666834835..0c9c5d63c 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 boost_thread) +columnstore_link(cacheutils messageqcpp) diff --git a/utils/cloudio/CMakeLists.txt b/utils/cloudio/CMakeLists.txt index 131030ace..c5bb954d0 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 boost_thread) +columnstore_link(cloudio idbdatafile messageqcpp) add_executable(cloudio_component_test component_test.cpp) add_executable(cloudio_end_to_end_test end_to_end_test.cpp) diff --git a/utils/basic/collation.h b/utils/common/collation.h similarity index 99% rename from utils/basic/collation.h rename to utils/common/collation.h index 411eca6aa..e5781b8d9 100644 --- a/utils/basic/collation.h +++ b/utils/common/collation.h @@ -35,7 +35,7 @@ #include "mcsconfig.h" #include "exceptclasses.h" -#include "basic/conststring.h" +#include "conststring.h" /* Redefine definitions used by MariaDB m_ctype.h. diff --git a/utils/basic/conststring.h b/utils/common/conststring.h similarity index 100% rename from utils/basic/conststring.h rename to utils/common/conststring.h diff --git a/utils/common/genericparser.h b/utils/common/genericparser.h index 8f4c67101..d2bce2d26 100644 --- a/utils/common/genericparser.h +++ b/utils/common/genericparser.h @@ -17,7 +17,7 @@ #pragma once -#include "basic/conststring.h" +#include "conststring.h" namespace genericparser { diff --git a/utils/common/hashfamily.h b/utils/common/hashfamily.h index a8fa663ea..4b09e01a8 100644 --- a/utils/common/hashfamily.h +++ b/utils/common/hashfamily.h @@ -18,7 +18,7 @@ #pragma once #include "hasher.h" -#include "basic/collation.h" +#include "collation.h" namespace utils { diff --git a/utils/common/nullstring.h b/utils/common/nullstring.h index 0b4bd62a9..313a5bcb9 100644 --- a/utils/common/nullstring.h +++ b/utils/common/nullstring.h @@ -25,7 +25,7 @@ #include #include #include "exceptclasses.h" -#include "basic/conststring.h" +#include "conststring.h" #include "mcs_datatype_basic.h" namespace utils diff --git a/utils/common/string_prefixes.cpp b/utils/common/string_prefixes.cpp index 1ef6ff16b..9f9c5c2e7 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 "basic/collation.h" +#include "collation.h" #include "joblisttypes.h" #include "string_prefixes.h" diff --git a/utils/common/syncstream.h b/utils/common/syncstream.h new file mode 100644 index 000000000..d00b41150 --- /dev/null +++ b/utils/common/syncstream.h @@ -0,0 +1,157 @@ +/* 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 603a3b26a..55c4d1b5f 100644 --- a/utils/funcexp/functor_json.h +++ b/utils/funcexp/functor_json.h @@ -7,7 +7,7 @@ #include #include -#include "basic/collation.h" +#include "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 1e547bd53..7047677c9 100644 --- a/utils/funcexp/jsonhelpers.h +++ b/utils/funcexp/jsonhelpers.h @@ -10,10 +10,10 @@ #include // #include -#include "basic/collation.h" +#include "collation.h" #include "functor_json.h" #include "functor_str.h" -#include "basic/collation.h" +#include "collation.h" #include "rowgroup.h" #include "treenode.h" #include "functioncolumn.h" diff --git a/utils/idbdatafile/CMakeLists.txt b/utils/idbdatafile/CMakeLists.txt index 86ddd93ba..06a1ebf44 100644 --- a/utils/idbdatafile/CMakeLists.txt +++ b/utils/idbdatafile/CMakeLists.txt @@ -14,12 +14,4 @@ set(idbdatafile_LIB_SRCS ) columnstore_library(idbdatafile ${idbdatafile_LIB_SRCS}) -columnstore_link( - idbdatafile - PRIVATE - ${NETSNMP_LIBRARIES} - ${ENGINE_OAM_LIBS} - boost_filesystem - boost_system - compress -) +columnstore_link(idbdatafile PRIVATE ${NETSNMP_LIBRARIES} ${ENGINE_OAM_LIBS} boost_filesystem boost_system) diff --git a/utils/joiner/CMakeLists.txt b/utils/joiner/CMakeLists.txt index 1d636162c..0df5c60f7 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 rowgroup datatypes compress) +columnstore_link(joiner PRIVATE loggingcpp) diff --git a/utils/messageqcpp/CMakeLists.txt b/utils/messageqcpp/CMakeLists.txt index c41a88168..527e9395a 100644 --- a/utils/messageqcpp/CMakeLists.txt +++ b/utils/messageqcpp/CMakeLists.txt @@ -8,6 +8,7 @@ set(messageqcpp_LIB_SRCS iosocket.cpp messagequeue.cpp messagequeuepool.cpp + samenodepseudosocket.cpp socketparms.cpp ) diff --git a/primitives/primproc/samenodepseudosocket.cpp b/utils/messageqcpp/samenodepseudosocket.cpp similarity index 100% rename from primitives/primproc/samenodepseudosocket.cpp rename to utils/messageqcpp/samenodepseudosocket.cpp diff --git a/primitives/primproc/samenodepseudosocket.h b/utils/messageqcpp/samenodepseudosocket.h similarity index 100% rename from primitives/primproc/samenodepseudosocket.h rename to utils/messageqcpp/samenodepseudosocket.h diff --git a/utils/querystats/CMakeLists.txt b/utils/querystats/CMakeLists.txt index ff6b13f91..0d91ead9e 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 messageqcpp) +columnstore_link(querystats PRIVATE loggingcpp) diff --git a/utils/querytele/CMakeLists.txt b/utils/querytele/CMakeLists.txt index 9fd9af6a9..f5e58ae60 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} boost_thread) +columnstore_link(querytele ${THRIFT_LIBRARY}) target_include_directories(querytele PRIVATE ${THRIFT_INCLUDE_DIRS}) -add_dependencies(querytele external_thrift) +add_dependencies(querytele external_boost external_thrift) diff --git a/utils/regr/CMakeLists.txt b/utils/regr/CMakeLists.txt index 60676a503..f2f378f34 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 messageqcpp) +columnstore_link(regr PRIVATE loggingcpp) set(regr_mysql_LIB_SRCS regrmysql.cpp modamysql.cpp) diff --git a/utils/regr/moda.h b/utils/regr/moda.h index 7ebaf8c88..4cbdb0a3e 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 "basic/collation.h" +#include "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 6a02b8cc0..2ba4c2d46 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 compress) +columnstore_link(rowgroup PRIVATE ${NETSNMP_LIBRARIES} funcexp loggingcpp) add_dependencies(rowgroup external_boost) diff --git a/utils/rowgroup/rowgroup.h b/utils/rowgroup/rowgroup.h index 907aa8145..50baf681c 100644 --- a/utils/rowgroup/rowgroup.h +++ b/utils/rowgroup/rowgroup.h @@ -53,7 +53,7 @@ #include "branchpred.h" #include "datatypes/mcs_int128.h" -#include "basic/collation.h" +#include "collation.h" #include "common/hashfamily.h" #include "buffertypes.h" diff --git a/utils/threadpool/CMakeLists.txt b/utils/threadpool/CMakeLists.txt index 496fba57a..1502bb4b3 100644 --- a/utils/threadpool/CMakeLists.txt +++ b/utils/threadpool/CMakeLists.txt @@ -2,4 +2,6 @@ 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 boost_thread loggingcpp messageqcpp) +columnstore_link(threadpool PRIVATE boost_chrono loggingcpp) + +add_dependencies(threadpool external_boost) diff --git a/utils/udfsdk/CMakeLists.txt b/utils/udfsdk/CMakeLists.txt index a1be05476..e13f07ab2 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 messageqcpp) +columnstore_link(udfsdk PRIVATE loggingcpp) # Do anyone use it? add_definitions(-DMYSQL_DYNAMIC_PLUGIN) diff --git a/versioning/BRM/CMakeLists.txt b/versioning/BRM/CMakeLists.txt index 96378c9bd..4468c1c05 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 oamcpp boost_thread messageqcpp) +columnstore_link(brm loggingcpp datatypes) # ########## next target ############### diff --git a/writeengine/bulk/CMakeLists.txt b/writeengine/bulk/CMakeLists.txt index e5a062dc3..0bb90a586 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,5 +47,4 @@ columnstore_link( ${S3API_DEPS} we_bulk we_xml - marias3 ) diff --git a/writeengine/client/CMakeLists.txt b/writeengine/client/CMakeLists.txt index 532fc8b3a..52633ceca 100644 --- a/writeengine/client/CMakeLists.txt +++ b/writeengine/client/CMakeLists.txt @@ -5,4 +5,7 @@ include_directories(${ENGINE_COMMON_INCLUDES}) set(writeengineclient_LIB_SRCS we_clients.cpp we_ddlcommandclient.cpp we_dmlcommandclient.cpp) columnstore_library(writeengineclient ${writeengineclient_LIB_SRCS}) -columnstore_link(writeengineclient ${NETSNMP_LIBRARIES} boost_thread oamcpp messageqcpp loggingcpp) + +add_dependencies(writeengineclient loggingcpp) + +columnstore_link(writeengineclient ${NETSNMP_LIBRARIES}) diff --git a/writeengine/redistribute/CMakeLists.txt b/writeengine/redistribute/CMakeLists.txt index bf8cd172e..29b8b94ee 100644 --- a/writeengine/redistribute/CMakeLists.txt +++ b/writeengine/redistribute/CMakeLists.txt @@ -7,6 +7,9 @@ set(writeengineredistribute_LIB_SRCS we_redistribute.cpp we_redistributecontrol. ) columnstore_library(writeengineredistribute ${writeengineredistribute_LIB_SRCS}) -columnstore_link(writeengineredistribute ${NETSNMP_LIBRARIES} loggingcpp oamcpp boost_thread messageqcpp) + +add_dependencies(writeengineredistribute loggingcpp) + +columnstore_link(writeengineredistribute ${NETSNMP_LIBRARIES}) target_compile_definitions(writeengineredistribute PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS) diff --git a/writeengine/server/CMakeLists.txt b/writeengine/server/CMakeLists.txt index 9d39d4193..9ebc5cd72 100644 --- a/writeengine/server/CMakeLists.txt +++ b/writeengine/server/CMakeLists.txt @@ -18,12 +18,9 @@ set(WriteEngineServer_SRCS ) columnstore_executable(WriteEngineServer ${WriteEngineServer_SRCS}) + +add_dependencies(WriteEngineServer loggingcpp) + columnstore_link( - WriteEngineServer - ${ENGINE_LDFLAGS} - ${NETSNMP_LIBRARIES} - ${ENGINE_WRITE_LIBS} - threadpool - writeengineredistribute - loggingcpp + WriteEngineServer ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} threadpool writeengineredistribute ) diff --git a/writeengine/shared/we_type.h b/writeengine/shared/we_type.h index fd447cf78..7772351ab 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 "basic/collation.h" // For CHARSET_INFO struct +#include "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,9 +447,10 @@ 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 b3fdcf9e0..7b05928f6 100644 --- a/writeengine/splitter/CMakeLists.txt +++ b/writeengine/splitter/CMakeLists.txt @@ -16,6 +16,8 @@ set(cpimport_SRCS columnstore_executable(cpimport ${cpimport_SRCS}) +add_dependencies(cpimport loggingcpp) + columnstore_link( cpimport ${ENGINE_LDFLAGS} @@ -25,5 +27,4 @@ columnstore_link( threadpool marias3 boost_program_options - loggingcpp ) diff --git a/writeengine/wrapper/CMakeLists.txt b/writeengine/wrapper/CMakeLists.txt index 131b7effb..28a7b50f9 100644 --- a/writeengine/wrapper/CMakeLists.txt +++ b/writeengine/wrapper/CMakeLists.txt @@ -37,12 +37,7 @@ set(writeengine_LIB_SRCS add_definitions(-D_FILE_OFFSET_BITS=64) columnstore_library(writeengine ${writeengine_LIB_SRCS}) -columnstore_link( - writeengine - ${NETSNMP_LIBRARIES} - loggingcpp - oamcpp - boost_thread - compress - messageqcpp -) + +add_dependencies(writeengine loggingcpp) + +columnstore_link(writeengine ${NETSNMP_LIBRARIES}) diff --git a/writeengine/xml/CMakeLists.txt b/writeengine/xml/CMakeLists.txt index 2ef5b0e51..98ab2fbb3 100644 --- a/writeengine/xml/CMakeLists.txt +++ b/writeengine/xml/CMakeLists.txt @@ -6,5 +6,6 @@ set(we_xml_STAT_SRCS we_xmlop.cpp we_xmljob.cpp we_xmlgendata.cpp we_xmlgenproc. add_definitions(-D_FILE_OFFSET_BITS=64) -columnstore_static_library(we_xml ${we_xml_STAT_SRCS}) -columnstore_link(we_xml loggingcpp) +add_library(we_xml STATIC ${we_xml_STAT_SRCS}) + +add_dependencies(we_xml loggingcpp)