1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-18 21:44:02 +03:00

34 Commits

Author SHA1 Message Date
Gagan Goel
931f2b36a1
MCOL-4931 Make cpimport charset-aware. (#2938)
1. Extend the following CalpontSystemCatalog member functions to
   set CalpontSystemCatalog::ColType::charsetNumber, after the
   system catalog update to add charset number to calpontsys.syscolumn
   in MCOL-5005:
     CalpontSystemCatalog::lookupOID
     CalpontSystemCatalog::colType
     CalpontSystemCatalog::columnRIDs
     CalpontSystemCatalog::getSchemaInfo

2. Update cpimport to use the CHARSET_INFO object associated with the
   charset number retrieved from the system catalog, for a
   dictionary/non-dictionary CHAR/VARCHAR/TEXT column, to truncate
   long strings that exceed the target column character length.

3. Add MTR test cases.
2023-09-05 17:17:20 +03:00
Leonid Fedorov
2e1394149b
MCOL-5464: Fixes of bugs from ASAN warnings, part one (#2792)
* Fixes of bugs from ASAN warnings, part one

* MQC as static library, with nifty counter for global map and mutex

* Switch clang to 16

* link messageqcpp to execplan
2023-04-04 02:33:23 +03:00
Sergey Zefirov
b53c231ca6 MCOL-271 empty strings should not be NULLs (#2794)
This patch improves handling of NULLs in textual fields in ColumnStore.
Previously empty strings were considered NULLs and it could be a problem
if data scheme allows for empty strings. It was also one of major
reasons of behavior difference between ColumnStore and other engines in
MariaDB family.

Also, this patch fixes some other bugs and incorrect behavior, for
example, incorrect comparison for "column <= ''" which evaluates to
constant True for all purposes before this patch.
2023-03-30 21:18:29 +03:00
Leonid Fedorov
56f2346083 Remove windows ifdefs 2023-03-02 15:59:42 +00:00
Gagan Goel
cbfdae3481 MCOL-5021 Code changes based on review feedback. 2022-08-05 14:40:50 -04:00
Roman Nozdrin
4c26e4f960 MCOL-4912 This patch introduces Extent Map index to improve EM scaleability
EM scaleability project has two parts: phase1 and phase2.
        This is phase1 that brings EM index to speed up(from O(n) down
        to the speed of boost::unordered_map) EM lookups looking for
        <dbroot, oid, partition> tuple to turn it into LBID,
        e.g. most bulk insertion meta info operations.
        The basis is boost::shared_managed_object where EMIndex is
        stored. Whilst it is not debug-friendly it allows to put a
        nested structs into shmem. EMIndex has 3 tiers. Top down description:
        vector of dbroots, map of oids to partition vectors, partition
        vectors that have EM indices.
        Separate EM methods now queries index before they do EM run.
        EMIndex has a separate shmem file with the fixed id
        MCS-shm-00060001.
2022-05-04 12:59:16 +00:00
Gagan Goel
973e5024d8 MCOL-4957 Fix performance slowdown for processing TIMESTAMP columns.
Part 1:
 As part of MCOL-3776 to address synchronization issue while accessing
 the fTimeZone member of the Func class, mutex locks were added to the
 accessor and mutator methods. However, this slows down processing
 of TIMESTAMP columns in PrimProc significantly as all threads across
 all concurrently running queries would serialize on the mutex. This
 is because PrimProc only has a single global object for the functor
 class (class derived from Func in utils/funcexp/functor.h) for a given
 function name. To fix this problem:

   (1) We remove the fTimeZone as a member of the Func derived classes
   (hence removing the mutexes) and instead use the fOperationType
   member of the FunctionColumn class to propagate the timezone values
   down to the individual functor processing functions such as
   FunctionColumn::getStrVal(), FunctionColumn::getIntVal(), etc.

   (2) To achieve (1), a timezone member is added to the
   execplan::CalpontSystemCatalog::ColType class.

Part 2:
 Several functors in the Funcexp code call dataconvert::gmtSecToMySQLTime()
 and dataconvert::mySQLTimeToGmtSec() functions for conversion between seconds
 since unix epoch and broken-down representation. These functions in turn call
 the C library function localtime_r() which currently has a known bug of holding
 a global lock via a call to __tz_convert. This significantly reduces performance
 in multi-threaded applications where multiple threads concurrently call
 localtime_r(). More details on the bug:
   https://sourceware.org/bugzilla/show_bug.cgi?id=16145

 This bug in localtime_r() caused processing of the Functors in PrimProc to
 slowdown significantly since a query execution causes Functors code to be
 processed in a multi-threaded manner.

 As a fix, we remove the calls to localtime_r() from gmtSecToMySQLTime()
 and mySQLTimeToGmtSec() by performing the timezone-to-offset conversion
 (done in dataconvert::timeZoneToOffset()) during the execution plan
 creation in the plugin. Note that localtime_r() is only called when the
 time_zone system variable is set to "SYSTEM".

 This fix also required changing the timezone type from a std::string to
 a long across the system.
2022-02-14 14:12:27 -05:00
Leonid Fedorov
04752ec546 clang format apply 2022-01-21 16:43:49 +00:00
Leonid Fedorov
01f3ceb437 replace header guards with #pragma once 2022-01-21 15:24:58 +00:00
Leonid Fedorov
5c5f103f98
MCOL-4839: Fix clang build (#2100)
* Fix clang build

* Extern C returned to plugin_instance

Co-authored-by: Leonid Fedorov <l.fedorov@mail.corp.ru>
2021-08-23 10:45:10 -05:00
benthompson15
afa88866bb MCOL-4483: Fix and consolidate log files and cpimport logging. 2021-02-12 15:40:16 -06:00
Gagan Goel
f6b55c1e18 MCOL-4177 Add support for bulk insertion for wide decimals.
1. This patch adds support for wide decimals with/without scale
     to cpimport. In addition, INSERT ... SELECT and LDI are also
     now supported.
  2. Logic to compute the number of bytes to convert a binary
     representation in the buffer to a narrow decimal is also
     simplified.
2020-12-15 22:14:54 +00:00
Gagan Goel
8f80c1dee6 MCOL-641 1. Implement int128 version of strtoll.
2. Templatize number_int_value.
3. Add test cases for strtoll128 and number_int_value for Decimal38.
2020-11-18 13:47:02 +00:00
Roman Nozdrin
1c74f80d76 MCOL-4136 This patch makes an explicit dependency on generated errorids.h 2020-08-05 12:22:50 +00:00
Andrew Hutchings
9d83b49fca MCOL-104 First pass of InfiniDB rename in code 2019-08-12 09:41:28 +01:00
Andrew Hutchings
5e4f1b9933
Merge branch 'develop' into MCOL-265 2019-06-10 13:58:03 +01:00
Andrew Hutchings
020b211bb7 Merge branch 'develop-1.2' into develop-merge-up-20190514 2019-05-14 13:58:33 +01:00
Roman Nozdrin
7e2cb05624 MCOL-537 There are no CS-specific warnings building with gcc 8.2. 2019-05-07 16:00:05 +03:00
Patrick LeBlanc
cbbf267e88 MCOL-537, cleanup compiler warnings. Checkpointing a bunch of fixes.
Work in progress...
2019-04-29 10:56:48 +03:00
Gagan Goel
e89d1ac3cf MCOL-265 Add support for TIMESTAMP data type 2019-04-23 00:00:09 -04:00
Gagan Goel
d1ada75395 MCOL-270 Add support for MEDIUMINT data type 2018-12-30 19:13:16 -05:00
Andrew Hutchings
3c1ebd8b94 MCOL-392 Add initial TIME datatype support 2018-04-30 09:42:41 +01:00
Andrew Hutchings
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
Andrew Hutchings
3330495a2e MCOL-777 Cleanup source
Clean out autotools and some other things from the source tree.
2017-08-07 15:59:56 +01:00
David Hall
33a6102116 Remove SKIP_AUTOI. Not used 2016-09-06 15:42:48 -05:00
David Hall
23cf2e3edc Remove #define SKIP_AUTOI. This is no longer used 2016-09-06 12:04:28 -05:00
Ben Thompson
392d6df495 Merge branch 'mcol-159' into develop
Conflicts:
	1
	Makefile.save
	autom4te.cache/output.0
	autom4te.cache/traces.0
	autom4te.cache/traces.1
	compile
	config.guess
	config.sub
	configure.save
	dbcon/Makefile.in
	dbcon/ddlpackage/Makefile.in
	dbcon/ddlpackage/ddl-scan.cpp
	dbcon/ddlpackageproc/Makefile.in
	dbcon/dmlpackage/Makefile.in
	dbcon/dmlpackage/dml-scan.cpp
	dbcon/dmlpackageproc/Makefile.in
	dbcon/execplan/Makefile.in
	dbcon/joblist/Makefile.in
	dbcon/mysql/Makefile.in
	ddlproc/Makefile.in
	decomsvr/Makefile.in
	depcomp
	dmlproc/Makefile.in
	exemgr/Makefile.in
	install-sh
	missing
	net-snmp/Makefile.in
	net-snmp/net-snmp-5.7.3/agent/mibgroup/mib_module_includes.h
	net-snmp/net-snmp-5.7.3/configure-summary
	net-snmp/net-snmp-5.7.3/dist/generation-scripts/gen-variables
	net-snmp/net-snmp-5.7.3/include/net-snmp/agent/mib_module_config.h
	net-snmp/net-snmp-5.7.3/mk/MODULE_LIST.mk
	net-snmp/net-snmp-5.7.3/mk/mib_module_list_c.mk
	net-snmp/net-snmp-5.7.3/mk/mib_module_list_code.mk
	net-snmp/net-snmp-5.7.3/mk/mib_module_list_ft.mk
	net-snmp/net-snmp-5.7.3/mk/mib_module_list_lo.mk
	net-snmp/net-snmp-5.7.3/mk/mib_module_list_o.mk
	net-snmp/net-snmp-5.7.3/mk/mibgroup_list_ft.mk
	net-snmp/net-snmp-5.7.3/mk/mibgroup_list_lo.mk
	net-snmp/net-snmp-5.7.3/mk/mibgroup_list_o.mk
	net-snmp/net-snmp-5.7.3/mk/module_list_c.mk
	net-snmp/net-snmp-5.7.3/mk/module_list_code.mk
	net-snmp/net-snmp-5.7.3/mk/module_list_ft.mk
	net-snmp/net-snmp-5.7.3/mk/module_list_lo.mk
	net-snmp/net-snmp-5.7.3/mk/module_list_o.mk
	oam/Makefile.in
	oam/cloud/Makefile.in
	oam/etc/Makefile.in
	oam/oamcpp/Makefile.in
	oam/post/Makefile.in
	oamapps/Makefile.in
	oamapps/calpontDB/Makefile.in
	oamapps/calpontSupport/Makefile.in
	oamapps/columnstoreDB/Makefile.in
	oamapps/columnstoreSupport/Makefile.in
	oamapps/mcsadmin/Makefile.in
	oamapps/postConfigure/Makefile.in
	oamapps/sendtrap/Makefile.in
	oamapps/serverMonitor/Makefile.in
	oamapps/sessionWalker/Makefile.in
	oamapps/traphandler/Makefile.in
	primitives/Makefile.in
	primitives/blockcache/Makefile.in
	primitives/linux-port/Makefile.in
	primitives/primproc/Makefile.in
	procmgr/Makefile.in
	procmon/Makefile.in
	snmpd/Makefile.in
	snmpd/etc/Makefile.in
	snmpd/snmpmanager/Makefile.in
	tools/Makefile.in
	tools/clearShm/Makefile.in
	tools/cleartablelock/Makefile.in
	tools/configMgt/Makefile.in
	tools/cplogger/Makefile.in
	tools/dbbuilder/Makefile.in
	tools/dbloadxml/Makefile.in
	tools/ddlcleanup/Makefile.in
	tools/editem/Makefile.in
	tools/getConfig/Makefile.in
	tools/idbmeminfo/Makefile.in
	tools/setConfig/Makefile.in
	tools/viewtablelock/Makefile.in
	utils/Makefile.in
	utils/batchloader/Makefile.in
	utils/boost_idb/Makefile.in
	utils/cacheutils/Makefile.in
	utils/common/Makefile.in
	utils/compress/Makefile.in
	utils/configcpp/Makefile.in
	utils/dataconvert/Makefile.in
	utils/ddlcleanup/Makefile.in
	utils/funcexp/Makefile.in
	utils/idbdatafile/Makefile.in
	utils/idbhdfs/Makefile.in
	utils/idbhdfs/hdfs-12/Makefile.in
	utils/idbhdfs/hdfs-20/Makefile.in
	utils/jemalloc/Makefile.in
	utils/joiner/Makefile.in
	utils/loggingcpp/Makefile.in
	utils/messageqcpp/Makefile.in
	utils/mysqlcl_idb/Makefile.in
	utils/querystats/Makefile.in
	utils/querytele/Makefile.in
	utils/rowgroup/Makefile.in
	utils/rwlock/Makefile.in
	utils/startup/Makefile.in
	utils/threadpool/Makefile.in
	utils/thrift/Makefile.in
	utils/udfsdk/Makefile.in
	utils/windowfunction/Makefile.in
	utils/winport/Makefile.in
	versioning/BRM/Makefile.in
	versioning/Makefile.in
	writeengine/Makefile.in
	writeengine/bulk/Makefile.in
	writeengine/client/Makefile.in
	writeengine/dictionary/Makefile.in
	writeengine/index/Makefile.in
	writeengine/redistribute/Makefile.in
	writeengine/server/Makefile.in
	writeengine/shared/Makefile.in
	writeengine/splitter/Makefile.in
	writeengine/wrapper/Makefile.in
2016-08-10 16:24:51 -05:00
david hill
edb55cf23a mcol-5 save files 2016-07-19 10:46:58 -05:00
Ben Thompson
424628349b Add CMake build tree files 2016-07-15 10:49:57 -05:00
David Hall
38f1332891 MCOL-66 Make the DDL and DML parsers re-entrant. 2016-07-06 09:05:29 -05:00
justin
22b7b3d1ef [MCOL-69] - autotools bootstrap only needed on new release version 2016-06-15 04:46:10 -04:00
Justin Swanhart
185d1a780c [MCOL-69] Remove Makefile.in files (should be generated with autoreconf) 2016-05-30 07:48:12 -04:00
Justin Swanhart
25093d4dd0 [MCOL-69] Fix autotools build process
Remove generated Makefiles
Update Makefile.am to specify RPATH as a subdirectory of --prefix
Remove configure artifacts such as config.log, config.h, etc
Remove unneeded backup files (files ending in tilde ~)
2016-05-30 07:41:56 -04:00
david hill
f6afc42dd0 the begginning 2016-01-06 14:08:59 -06:00