1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2026-10-23 21:49:05 +03:00
Commit Graph

147 Commits

Author SHA1 Message Date
Vasily Kozhukhovskiy
bb5f7addc8 chore(infer): MCOL-6423 re-add USE_AFTER_DELETE suppressions for node-based containers
The nightly scan showed the loop refactors fix the false positives for
std::vector but not for std::list/std::set, which Infer has no precise
model for. Re-add targeted @infer-ignore comments at the five surviving
sites (threadpool.h, we_chunkmanager.cpp x2, we_dctnry.cpp,
lbidresourcegraph.cpp), keeping the refactored loops.
2026-07-23 15:20:58 +02:00
Vasily Kozhukhovskiy
a3d167a22b chore(infer): MCOL-6423 refactor loops instead of suppressing USE_AFTER_DELETE
Per review feedback, replace the @infer-ignore comments with refactors
that remove the patterns Infer trips on:

- destructor delete-loops: use range-based for
  (altertable, tabledef, calpontsystemcatalog, threadpool, we_chunkmanager)
- we_dctnry freeStringCache(): iterate by const reference, dropping the
  local Signature copy and its dead store
- LBIDResourceGraph::releaseResources(): scope rNode per iteration and
  advance the iterator before the erase, removing the dummy_sit juggling
2026-07-22 15:36:17 +02:00
Vasily Kozhukhovskiy
628c1fe1fe chore(infer): MCOL-6423 suppress false-positive USE_AFTER_DELETE Infer findings 2026-07-22 15:36:17 +02:00
Vasily Kozhukhovskiy
5eb1644166 chore(infer): MCOL-6428 suppress false-positive MEMORY_LEAK_C in Cache::init() 2026-07-22 09:33:27 +02:00
Serguey Zefirov
9c3452797c fix(EM rebuild): MCOL-6302, MCOL-6321 - restore EM in case of header overflow, with test
This patch adds logic to read block offsets of a dictionary column
from tokens in a pseudo-column. These block offsets then are used to
restore LBIDs in extent map and set proper HWM for a proper LBID.

An accompanying test tests rebuild process and integrity of the
restored data.
2026-04-08 22:07:39 +04:00
Leonid Fedorov
5c95ece4c5 Fix Infer report #1482: Initialize rc in BRMWrapper::writeVB
#1482 we_brm.cpp:1723 Uninitialized Value - rc could be read without init
if skipBeginVBCopy is true and freeList is empty (loop doesn't execute).
2026-04-08 21:55:13 +04:00
Leonid Fedorov
b1a2092386 Fix Infer reports #1474-#1479: Initialize DDLColumn.oid and DctnryTuple fields
#1474 we_ddlcommandproc.cpp:2064 Uninitialized Value - column.oid
#1475 we_ddlcommandproc.cpp:2253 Uninitialized Value - column.oid
#1476 we_ddlcommandproc.cpp:2684 Uninitialized Value - column.oid
#1477 we_ddlcommandproc.cpp:2713 Uninitialized Value - DctnryTuple.sigValue
#1478 we_ddlcommandproc.cpp:3842 Uninitialized Value - column.oid
#1479 we_ddlcommandproc.cpp:3943 Uninitialized Value - DctnryTuple.sigValue

Added default constructors to DDLColumn (both in we_ddlcommon.h and
ddlpackageprocessor.h) and DctnryTuple in we_type.h.
2026-04-08 21:55:13 +04:00
Sergey Zefirov
086044c4c1 fix(ASAN): MCOL-5604 - fix ASAN diagnostics (#3913)
This simple patch removes use of type handler of column operations which
can be incorrect.
2026-03-01 10:12:41 +00:00
Leonid Fedorov
2f0f5a79b6 fix(correctness): replace volatiles with atomics 2025-10-31 15:29:58 +04:00
Leonid Fedorov
8a535e872c Revert "Deep build refactoring phase 2 (#3564)" (#3678)
This reverts commit 449029a827.
2025-08-01 02:56:31 +04:00
Leonid Fedorov
449029a827 Deep build refactoring phase 2 (#3564)
* configcpp refactored

* chore(build): massive removals, auto add files to debian install file

* chore(build): configure before autobake

* chore(build): use custom cmake commands for components, mariadb-plugin-columnstore.install generated

* chore(build): install deps as separate step for build-packages

* more deps

* chore(codemanagement, build): build refactoring stage2

* chore(safety): Locked Map for MessageqCpp with a simpler way

 Please enter the commit message for your changes. Lines starting

* chore(codemanagement, ci): better coredumps handling, deps fixed

* Delete build/bootstrap_mcs.py

* Update charset.cpp (add license)
2025-07-17 16:14:10 +04:00
Aleksei Antipovskii
1ce46b5e0b feature(cpimport): MCOL-5164 ignore all errors (-e all) 2025-07-15 20:52:29 +04:00
Alexey Antipovsky
78c1b5034d Feature/mcol 4882 cpimport skip rows (#3594)
* feat(cpimport): MCOL-4882 add a parameter to skip header rows

* chore(cpimport): MCOL-4882 Use boost::program_options to arguments parsing

* feat(cpimport.bin): MCOL-4882 Add missing changes

* add test

* fix clang

* add missing cmdline argument

* fix bug

* Fix double lines skipping

* Fix incorrect --silent (-N) parsing

* fix default --max-errors processing

* fix overwriting default username

* move initialization to members declaration
2025-07-11 23:35:43 +04:00
mariadb-KristinaPavlova
d031239844 add args to lost connection error when getting system data 2025-07-04 19:57:49 +04:00
mariadb-KristinaPavlova
6831b82515 fix err syntax - disk join 2025-07-04 19:57:49 +04:00
mariadb-KristinaPavlova
52351f2f29 add args to try larger read buffer error 2025-07-04 19:57:49 +04:00
mariadb-KristinaPavlova
3083eb6d95 add args to max file system disk usage error 2025-07-04 19:57:49 +04:00
Leonid Fedorov
4a8f5830fd chore(build) update boost to 1.88 2025-05-20 21:43:43 +04:00
Leonid Fedorov
6db2dc668f stubs and cmake formatting 2025-05-20 18:22:59 +04:00
Leonid Fedorov
a0bee173f6 chore(build): fixes to satisfy clang19 warnings 2025-05-15 19:05:38 +04:00
Denis Khalikov
80277a5e7d DBBuilder: check syscat files instead dirs 2025-04-01 19:53:28 +04:00
drrtuy
87981483e2 chore(compilation): to resolve unexpected boost warnings 2025-03-27 21:35:11 +04:00
Aleksei Antipovskii
0ab03c7258 chore(codestyle): mark virtual methods as override 2025-02-21 20:01:34 +04:00
Sergey Zefirov
3bcc2e2fda fix(memory leaks): MCOL-5791 - get rid of memory leaks in plugin code (#3365)
There were numerous memory leaks in plugin's code and associated code.
During typical run of MTR tests it leaked around 65 megabytes of
objects. As a result they may severely affect long-lived connections.

This patch fixes (almost) all leaks found in the plugin. The exceptions
are two leaks associated with SHOW CREATE TABLE columnstore_table and
getting information of columns of columnstore-handled table. These
should be fixed on the server side and work is on the way.
2024-12-06 09:04:55 +00:00
Denis Khalikov
55ffacf546 MCOL-5555 Add support for startreadonly command. (#3081)
This patch adds support for `startreadonly` command which waits
until all active cpimport jobs are done and then puts controller node to readonly
mode.
2023-12-26 15:11:33 +04:00
Denis Khalikov
6315546557 Revert "MCOL-5555 Add support for startreadonly command."
This reverts commit 441cd9d34f.
2023-12-20 01:05:37 +03:00
Denis Khalikov
441cd9d34f MCOL-5555 Add support for startreadonly command.
This patch adds support for `startreadonly` command which waits
until all active cpimport jobs are done and then puts controller node to readonly
mode.
2023-10-16 16:11:50 +03:00
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
Roman Nozdrin
4fe9cd64a3 Revert "No boost condition (#2822)" (#2828)
This reverts commit f916e64927.
2023-04-22 15:49:50 +03:00
Leonid Fedorov
f916e64927 No boost condition (#2822)
This patch replaces boost primitives with stdlib counterparts.
2023-04-22 00:42:45 +03:00
Leonid Fedorov
3ce19abdae Options to build with TSAN, UBSAN and skipping smoke (#2826) 2023-04-21 21:24:48 +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
Otto Kekäläinen
70124ecc01 Fix trivial spelling errors
- occured -> occurred
- reponse -> response
- seperated -> separated

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2023-03-11 11:59:47 -08:00
Leonid Fedorov
56f2346083 Remove windows ifdefs 2023-03-02 15:59:42 +00:00
Denis Khalikov
d61780cab1 MCOL-5263 Add support to ROLLBACK when PP were restarted.
DMLProc starts ROLLBACK when SELECT part of UPDATE fails b/c EM facility in PP were restarted.
Unfortunately this ROLLBACK stuck if EM/PP are not yet available.
DMLProc must have a t/o with re-try doing ROLLBACK.
2022-12-13 16:18:53 +03:00
Gagan Goel
cbfdae3481 MCOL-5021 Code changes based on review feedback. 2022-08-05 14:40:50 -04:00
Gagan Goel
1355237ca3 MCOL-5021 Some minor fixes. 2022-08-05 14:40:50 -04:00
Gagan Goel
c8b6b154bf MCOL-5021 Add an option in Columnstore.xml, fastdelete (disabled
by default), which when enabled, indiscriminately invalidates all
column extents and performs the actual DELETE only on the AUX
column. The trade-off with this approach would now be that the
first SELECT for certain query patterns (those containing a WHERE
predicate) after the DELETE operation will slow down as the
invalidated column extent would need to be scanned again to set
the min/max values.
2022-08-05 14:40:49 -04:00
Gagan Goel
60eb0f86ec MCOL-5021 non-AUX column files are opened in read-only mode during
the DELETE operation. ColumnOp::readBlock() calls can cause writes
to database files when the active chunk list in ChunkManager is full.
Since non-AUX columns are read-only for the DELETE operation, we prevent
writes of compressed chunks and header for these columns by passing
an isReadOnly flag to CompFileData which indicates whether the column
is read-only or read-write.
2022-08-05 14:40:49 -04:00
Gagan Goel
35a3a93964 MCOL-5021 For the DELETE operation, empty magic values are only
written to database files for AUX column. Perform read-only operation
for other columns in the table to update the Casual Partitioning information.
2022-08-05 14:40:49 -04:00
Denis Khalikov
fb1e23bb83 [MCOL-5106] Add support to work with StorageManager.
This patch eliminates boost::filesystem from `mcsRebuildEM` tool.
After this change we should be able to work with any filesystem
even S3.
2022-07-28 16:47:34 +03:00
Serguey Zefirov
53b9a2a0f9 MCOL-4580 extent elimination for dictionary-based text/varchar types
The idea is relatively simple - encode prefixes of collated strings as
integers and use them to compute extents' ranges. Then we can eliminate
extents with strings.

The actual patch does have all the code there but miss one important
step: we do not keep collation index, we keep charset index. Because of
this, some of the tests in the bugfix suite fail and thus main
functionality is turned off.

The reason of this patch to be put into PR at all is that it contains
changes that made CHAR/VARCHAR columns unsigned. This change is needed in
vectorization work.
2022-03-02 23:53:39 +03:00
Leonid Fedorov
3919c541ac New warnfixes (#2254)
* Fix clang warnings

* Remove vim tab guides

* initialize variables

* 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length

* Fix ISO C++17 does not allow 'register' storage class specifier for outdated bison

* chars are unsigned on ARM, having  if (ival < 0) always false

* chars are unsigned by default on ARM and comparison with -1 if always true
2022-02-17 13:08:58 +03: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
Roman Nozdrin
af36f9940f This patch introduces support for scanning/filtering vectorized execution for numeric-based
data types TEXT, CHAR, VARCHAR, FLOAT and DOUBLE are not yet supported by vectorized path
This patch introduces an example for Google benchmarking suite to measure a perf diff
b/w legacy scan/filtering code and the templated version
2021-12-10 10:30:00 +00:00
Sergey Zefirov
6eaee180f3 MCOL-4779 Keep correct ranges during DML for short char columns 2021-07-12 14:07:39 +03:00
Denis Khalikov
cc1c3629c5 MCOL-987 Add LZ4 compression.
* Adds CompressInterfaceLZ4 which uses LZ4 API for compress/uncompress.
* Adds CMake machinery to search LZ4 on running host.
* All methods which use static data and do not modify any internal data - become `static`,
  so we can use them without creation of the specific object. This is possible, because
  the header specification has not been modified. We still use 2 sections in header, first
  one with file meta data, the second one with pointers for compressed chunks.
* Methods `compress`, `uncompress`, `maxCompressedSize`, `getUncompressedSize` - become
  pure virtual, so we can override them for the other compression algos.
* Adds method `getChunkMagicNumber`, so we can verify chunk magic number
  for each compression algo.
* Renames "s/IDBCompressInterface/CompressInterface/g" according to requirement.
2021-07-06 18:04:37 +03:00
Roman Nozdrin
7a152c6a19 Merge pull request #1944 from mariadb-AlexeyAntipovsky/MCOL-563-dev
[MCOL-4709] Disk-based aggregation
2021-06-08 20:42:58 +03:00