1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-26 11:48:52 +03:00

22 Commits

Author SHA1 Message Date
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
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
Gagan Goel
995cadef2d MCOL-641 Fix alter table add wide decimal column.
This patch also removes CalpontSystemCatalog::BINARY and
ddlpackage::DDL_BINARY that were added during the initial
stages of the work on MCOL-641.
2020-11-20 19:49:54 -05:00
Gagan Goel
32f6167067 MCOL-641 Work of Ivan Zuniga on basic read and write support for Binary16 2020-11-18 13:47:00 +00:00
Andrew Hutchings
5e4f1b9933
Merge branch 'develop' into MCOL-265 2019-06-10 13:58:03 +01:00
Andrew Hutchings
784bbe09d4 Merge branch 'develop-1.2' into develop-merge-up-20190425 2019-04-25 10:27:59 +01:00
Gagan Goel
e89d1ac3cf MCOL-265 Add support for TIMESTAMP data type 2019-04-23 00:00:09 -04:00
Andrew Hutchings
6f15c97591 MCOL-2061 Add upgrade path to rebuild FRM files
A major upgrade (1.1 -> 1.2 for example) may have issues due to stale
FRM table IDs. This commit adds a stored procedure that changes the
table comment to empty on every ColumnStore table to repair the IDs.

The user should run this as part of the upgrade procedure between major
versions.
2019-04-04 15:32:38 +01: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
280dcb44bf Merge branch 'develop-1.1' into dev-merge-up-20180409 2018-04-09 19:15:18 +01:00
Andrew Hutchings
8f1136474f MCOL-1228 Allow alter table for TEXT/BLOB
CHANGE COLUMN was blocked for TEXT and BLOB types. This fix applies to
things like TINYTEXT as well as the only difference internally is the
column width.
2018-02-24 08:04:17 -05:00
Andrew Hutchings
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
Andrew Hutchings
e9db44424c MCOL-642 Separate TEXT from BLOB
* TEXT and BLOB now have separate identifiers internally
* TEXT columns are identified as such in system catalog
* cpimport only requires hex input for BLOB, not TEXT
2017-03-27 21:36:27 +01:00
Andrew Hutchings
c08d03fba4 MCOL-267 Make BLOB DDL/DML work
Currently limited to 8KB inserts.
2017-03-17 12:10:02 +00:00
Andrew Hutchings
aa2cb8b9ba Also check for zero
Needed for unsigned int columns
2017-01-18 17:35:59 +00:00
Andrew Hutchings
183298ba50 MCOL-477 Add validation to alter autoincrement
If the data isn't validated and someone gives bad input it could cause
corruption. This validates the input.
2017-01-18 17:28:19 +00:00
Andrew Hutchings
bb800e4771 MCOL-477 Change autoincrement on ALTER TABLE
This patch allows the following syntax to change the current
autoincrement value for the table:

ALTER TABLE table_name COMMENT='autoincrement=value';

Where "value" is the new integer to be used.
2017-01-05 15:03:54 +00:00
David Hall
6714290b6d MCOL-279 Dbrm.releaseAILock() being call twice in a row 2016-09-01 13:01:33 -05:00
David Hall
6d11ce030d MCOL-66 - Make the DDL and DML parsers re-entrant.
Serialize all DDL because the VVS can't handle modifying the same block simultaneously
Fix the CTRL+C logic in DML that caused COMMIT issues.
2016-07-20 11:47:51 -05:00
david hill
f6afc42dd0 the begginning 2016-01-06 14:08:59 -06:00