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

6987 Commits

Author SHA1 Message Date
Timofey Turenko
149c4eb7eb fix rpm cpack 2026-02-27 10:35:50 +02:00
Timofey Turenko
fd2a860061 chore(packaging): Fix CMAPI cmake issues (#3930) 2026-02-21 19:44:02 +00:00
Serguey Zefirov
c5f6c0a26a feature(partitions table): MCOL-6293 - Columnstore partitions table
This patch introduces INFORMATION_SCHEMA.COLUMNSTORE_PARTITIONS table to
query partitions of tables and columns. It has TABLE_SCHEMA, TABLE_NAME,
COLUMN_NAME and PARTITION_ID columns, all textual. PARTITION_ID encoding
is compatible with CALSHOWPARTITIONS and CALDROPPARTITIONS functions.

If two columns share partition, only one column will be listed in the
result set, but search for partitions of specific column will return
correct list of partitions for that column.
2026-02-19 07:06:33 +00:00
Serguey Zefirov
bae6b2450f feat(queryacc): MCOL-6298 - Query Accelerator convenience
This patch adds flag to enable query accelerator by default and adds
three stored procedures to enable query accelerator, disable query
accelerator and execute just single query with query accelerator
enabled.

Here's how to use:

  SET old_settings = queryacc.enable_queryacc();
  SELECT ... FROM ...;
  CALL queryacc.disable_queryacc(old_settings);
2026-02-19 07:05:39 +00:00
Timofey Turenko
d57cf399be Merge pull request #3927 from mariadb-corporation/remove_server_source_dep
Remove dependecy on the server source from CMAPI build
2026-02-17 12:34:33 +02:00
Timofey Turenko
1b25ede7eb Merge pull request #3925 from mariadb-corporation/MCOL-5890-set_lower_case
Set lower_case_table_names=2 for MTR
2026-02-17 12:33:47 +02:00
Aleksei Antipovskii
53f94ce770 fix review issues 2026-02-16 19:14:47 +01:00
Aleksei Antipovskii
1c1d7c3675 Do not wrap group by columns inside window functions 2026-02-16 19:14:47 +01:00
Aleksei Antipovskii
c8271e261c Fix some edge-cases with group by queries
Move wrapping non-groupby columns after rewriting distinct as group by
Fix reference test results
2026-02-16 19:14:47 +01:00
Aleksei Antipovskii
e8606d2eb9 add some tests authored by Leonid 2026-02-16 19:14:47 +01:00
Aleksei Antipovskii
42bc438d0d Do not wrap columns from alien tables 2026-02-16 19:14:47 +01:00
Aleksei Antipovskii
dec6b1a49e fix(plugin): MCOL-6088 wrap columns that are not aggregated with SELECT_SOME 2026-02-16 19:14:47 +01:00
Aleksei Antipovskii
9f16680803 fix(plugin): fix incorrect behavior for if args in case of aggregation
Example:
```sql
create table iftest(a int, b int) engine=columnstore;
insert into iftest values (1, null), (2, 1);
select if (b is null, 'b is null', 'b is not null') from iftest group by a;
```

Incorrect result:
```
ERROR 1815 (HY000): Internal error: MCS-2021: 'if (b is null, 'b is null', 'b is not null')' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause.
```

Expected (as with InnoDB):
```
+----------------------------------------------+
| if (b is null, 'b is null', 'b is not null') |
+----------------------------------------------+
| b is null                                    |
| b is not null                                |
+----------------------------------------------+
2 rows in set (0.000 sec)
```
2026-02-16 19:14:47 +01:00
aleksei.bukhalov
2d66578c42 MCOL-6088 add tests 2026-02-16 19:14:47 +01:00
Leonid Fedorov
52bb8f3b60 fix(plugin): MCOL-6088 This ensures that SELECT col AS alias ... GROUP BY alias works correctly even when col is wrapped in an implicit aggregate wrapper. 2026-02-16 19:14:47 +01:00
Timofey Turenko
d0a4975cd7 Remove dependecy on the server source from CMAPI build 2026-02-16 09:55:28 +02:00
Timofey Turenko
9c2b13d7ab Set lower_case_table_names=2 for MTR 2026-02-13 23:25:29 +02:00
Aleksei Bukhalov
08ab1acab6 chore(mtr): Fix MTR suite symlink for MariaDB 11.4+ (#3926)
* fix(mtr): add suite symlink for mysql-test path on MariaDB 11.4+

* fix(ci): use version-aware MTR paths in prepare_test_container
2026-02-13 17:40:17 +00:00
Timofey Turenko
29dd9da323 Merge pull request #3917 from mariadb-corporation/MCOL-6186_upgrade_test
Mcol 6186 upgrade test
2026-02-10 16:40:20 +02:00
Timofey Turenko
2e7a9c829e enable upgrade test 2026-02-09 04:58:25 +02:00
mariadb-AlanMologorsky
e7099bf5a7 fix(cmapi, python, deps): MCOL-6291 Change cmapi and mcs cli Python version to 3.13.11 and update some dependencies. 2026-02-05 21:43:20 +03:00
mariadb-AlanMologorsky
c13ea48a33 fix(cmapi): MCOL-6093 Multiple PUT /config operations had arrived from primary CMAPI node.
feat(cmapi): Add config lock mechanics on config put.
fix(cmapi): Fix multiple node remove bug.
2026-02-05 21:04:28 +03:00
mariadb-AlanMologorsky
59988ba27c feat(ci): MCOL-5904 Mcs cli docs CI check. 2026-02-05 20:44:25 +03:00
aleksei.bukhalov
d97331f786 chore(ci): fix MTR logs path for MariaDB 11.4+ 2026-01-29 20:10:52 +01:00
Sergey Zefirov
a4044413b9 fix(cpimport): MCOL-6243 - cpimport fails at fields longer than 1M (#3910)
* fix(cpimport): MCOL-6243 - cpimport fails at fields longer than 1M

This patch makes cpimport buffers resizeable, thus cpimport's
command-line buffer size argument is nothing but a hint now.

* No read past EOF
2026-01-28 11:19:10 +00:00
Leonid Fedorov
33ca1e8b5d feat(joblist,pp): MCOL-5983 Add COMPARE_BITMASK primitive filter for bitwise AND pattern optimization (#3906)
* MCOL-5983: Add COMPARE_BITMASK primitive filter for bitwise AND optimization

Add support for pushing down (col & mask) = mask patterns as primitive
filters instead of evaluating them in FE1 (Function Expression Group 1).

This optimization significantly improves query performance for Bloom filter
lookups commonly used in chemical/molecular databases where a signature
column stores precomputed bit patterns.

Changes:
- Add COMPARE_BITMASK (0x20) comparison operator to primitivemsg.h
- Implement scalar and SIMD handling for COMPARE_BITMASK in column.cpp
- Add pattern recognition for (col & mask) = mask in doSimpleFilter()
- Add cost-based filter reordering in walkTree() to prioritize cheap
  bitmask filters before expensive LIKE filters

Performance results (21M rows, TEXT column with LIKE, BIGINT signature):
- Bitmask filter alone: 6s -> 0.23s (26x faster)
- LIKE alone: 8.2s (baseline, scans all rows)
- LIKE + bitmask combined: 8.2s -> 1.0s (8x faster)

The bitmask filter now executes as a primitive filter with SIMD
acceleration, filtering out non-matching rows before the expensive
dictionary lookup required for LIKE on TEXT columns.

* review comments addressed
2026-01-27 05:43:51 +00:00
Leonid Fedorov
1d3ddba190 MCOL-6204: Fix workernode crash when signal arrives during startup
The workernode process could crash if a signal (SIGINT, SIGTERM, SIGHUP)
was received during initialization. Signal handlers were registered
before the SlaveComm object was constructed, causing a null pointer
dereference when the handler tried to call comm->stop() or comm->reset().

The SlaveComm constructor can take significant time because it
initializes MasterSegmentTable which acquires RWLocks on shared memory.
If a signal arrived during this window, the process would crash.

Added null checks for the comm pointer in both stop() and reset()
signal handlers to prevent the crash.
2026-01-27 00:58:44 +04:00
Leonid Fedorov
a1ba69f6ce fix(review): comments addressed 2026-01-26 21:15:03 +04:00
Leonid Fedorov
02e3ae50e9 fix(qa): Fix IN condition not applied in RBO rewriting
ConstantFilter had its own fSimpleColumnListExtended member variable
that shadowed the base class Filter::fSimpleColumnListExtended.

When RBO called getSimpleColsExtended() to collect SimpleColumns for
rewriting, it used Filter::simpleColumnListExtended() which returned
the empty base class variable. Meanwhile, ConstantFilter::setSimpleColumnListExtended()
was populating its own shadowed variable.

This caused SimpleColumns inside ConstantFilter (used for IN predicates)
to not be updated during RBO parallel_ces rewriting, resulting in
incorrect query results where IN conditions were effectively ignored.

Fix: Remove the duplicate fSimpleColumnListExtended declaration from
ConstantFilter and use the inherited base class variable instead.
Also remove the redundant simpleColumnListExtended() method override.

Affected queries: TPC-H Q12, Q16, Q19 and any query using IN/NOT IN
conditions with RBO enabled.
2026-01-26 21:15:03 +04:00
Leonid Fedorov
4d13bd51b7 fix(QA): All the queries produce results 2026-01-26 21:15:03 +04:00
drrtuy
df0dc36307 chore(): Bump VERSION up to 25.10.3-1 2026-01-21 16:59:16 +00:00
Sergey Zefirov
f3d554ed48 fix(BRM,oidbitmap): MCOL-5987 - return OIDs after DROP TABLE (#3901)
Creating and dropping tables in a long-running Columnstore installation
were going to overflow used OIDs set, leading to semi-functional database.
Now DROP TABLE releases all OIDs back to reuse.
2026-01-20 08:50:44 +00:00
Leonid Fedorov
b251437862 fix(ci): skip test12 with ASAN 2026-01-20 02:27:04 +04:00
Leonid Fedorov
a80708ee7e fix(leak): ConstantColumn objects popped from rcWorkStack were only used for
cloning but never freed, causing memory leaks detected by ASAN.

Refactored to use std::unique_ptr<ReturnedColumn> for RAII-style
memory management:
- rhs and lhs are now wrapped in unique_ptr upon extraction from stack
- For buildRowColumnFilter path: release() transfers ownership
- For ConstantFilter: lhs.release() transfers ownership to constructor
- rhs is automatically deleted after clone() via unique_ptr destructor
- Loop values wrapped in unique_ptr and auto-deleted after cloning

This follows the same RAII pattern already used in buildRowColumnFilter().
2026-01-19 18:28:50 +04:00
mariadb-AlanMologorsky
98cedae877 fix(cmapi): Invariant checks follows symlinks.
Now invariant checks look at given directory and check if it is symlink.
If yes then real path will be used.
2026-01-16 13:48:34 +01:00
Leonid Fedorov
02f135a09a chore(ci): update Rust version 2026-01-14 17:39:34 +04:00
Timofey Turenko
5751d1ce6a Merge pull request #3895 from mariadb-corporation/version-bump-23.10.8
Bump VERSION to 23.10.8
2026-01-13 15:34:42 +02:00
Leonid Fedorov
c67a06e151 Bump VERSION to 23.10.8 2026-01-13 13:21:38 +00:00
Alexey Antipovsky
e4f0e95274 fix(PP,THJS): MCOL-6083 fix disk joins freezes (#3861)
* fix(PP,THJS): MCOL-6083 fix THJS freezing in case of low memory
* fix TupleJoiner::copyForDiskJoin
* fix group_concat data deserialization

---------

Co-authored-by: Aleksei Antipovskii <alexey.antipovsky@gmail.com>
2026-01-12 16:19:28 +04:00
Leonid Fedorov
6a70083a00 fix(plugin): more generic stacks cleanup to prevent memory leaks 2026-01-10 01:02:09 +04:00
Leonid Fedorov
e3464a0ca8 fix(dmlproc): add trycatch to fix coredump 2026-01-10 01:02:09 +04:00
Leonid Fedorov
a8628476f4 fix(ci): skip test011 for ASAN 2026-01-10 01:02:09 +04:00
Timofey Turenko
3f496a052e set collation in the mcs63_crossengine_views test to avoid sorting differences in 11.8 2026-01-09 17:44:22 +04:00
Timofey Turenko
30e9e2fd10 add sorting to unstable multinode tests 2026-01-09 17:44:22 +04:00
Serguey Zefirov
3506ef6329 fix(rbo): Partial fix MCOL-6251 - only two TPC-H queries fail
This fix contains slightly generalized walk on WHERE/HAVING filters and
slightly better naming of subqueries for better diagnostics.
2025-12-31 20:43:20 +03:00
Leonid Fedorov
aa86a91ae4 skip test009 for ASAN 2025-12-29 22:42:30 +04:00
Leonid Fedorov
2a472bf37f sans only 2025-12-29 22:42:30 +04:00
Leonid Fedorov
2639e86bce some 2025-12-29 22:42:30 +04:00
Leonid Fedorov
53540ac62d skip some tests for asan 2025-12-29 22:42:30 +04:00
Leonid Fedorov
df88bf05fe fix(ubsan): suppress overflow in header 2025-12-29 22:42:30 +04:00