1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-06-07 19:22:02 +03:00

1064 Commits

Author SHA1 Message Date
Leonid Fedorov
2158b3553a proper use of deps for GenError 2025-05-30 03:50:10 +00:00
Leonid Fedorov
8788cd7372 no ${NETSNMP_LIBRARIES} 2025-05-30 03:27:05 +00:00
Leonid Fedorov
7486ebfe94 common library freed from circulars, statistics_manager and mariadb_charset isolated 2025-05-30 03:27:05 +00:00
Leonid Fedorov
cfe0021948 chore(build): use custom cmake commands for components, mariadb-plugin-columnstore.install generated 2025-05-30 03:27:04 +00:00
Leonid Fedorov
05ff8c1cbe chore(build): massive removals, auto add files to debian install file 2025-05-30 03:27:04 +00:00
drrtuy
35578f5f05 fix(): fix API return type difference b/w server versions. 2025-05-29 19:05:34 +01:00
drrtuy
7cf3003727 fix(formating): return to the original formatting 2025-05-29 19:05:34 +01:00
drrtuy
44040b4367 feat(plugin): Replaced THDVAR with more lightweight SYSVAR 2025-05-29 19:05:34 +01:00
drrtuy
9038f0df09 feat(plugin): All InnoDB queries are pushed down to Columnstore if columnstore_innodb_queries_uses_mcs = ON in the configuration before server start 2025-05-29 19:05:34 +01:00
drrtuy
11e5e481ab feat(plugin): fixup for side effects 2025-05-29 19:05:34 +01:00
drrtuy
7b02299f50 feat(plugin): unconditional innodb into MCS pushdown 2025-05-29 19:05:34 +01:00
Leonid Fedorov
dc4ca8d588
MCOL-5943: MCOL-4740 update rows counter for multi-table update (#3555)
* fix(plugin): MCOL-4740: This fixes update rows counter for multi-table update
For UPDATEs involving a single table, the server call to handler::direct_update_rows() is used to correctly set the count for the number of updated rows in the UPDATE statement.
However, for UPDATEs involving multi-tables, the server does not call handler::direct_update_rows(). This patch adds support to correctly report the number of updated rows to the client by setting
multi_update::updated and multi_update::found in handler::rnd_end().

* fix(plugin): MCOL-4740: this is to addres the original patch QA found in the original patch

---------

Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
Co-authored-by: drrtuy <roman.nozdrin@mariadb.com>
2025-05-29 14:23:37 +01:00
Aleksei Antipovskii
221ccfd5b6 fix(dbcon): MCOL-4756: having not() provokes an ERROR 2013
The `NOT()` function in the HAVING clause was handled
    incorrectly, which caused the server to crash.
2025-05-23 05:12:17 +04:00
Leonid Fedorov
13b23e8510 chore(codestyle): MCOL-5405: repace windows CRLF with virtious linux one 2025-05-23 05:12:17 +04:00
Leonid Fedorov
bfe49a8345 bug(priproc) make last_day type a bit more accurate
This fixes discrepance with the server, which assigns DATE type to
last_day()'s result.

Now we also assigns DATE result type and, also, use proper
dataconvert::Day data structure to return date.

Tests agree with InnoDB.

Also, this patch includes test for MCOL-5669, to show we fixed it.
2025-05-23 05:12:17 +04:00
Sergey Zefirov
ef451af860 feat(ddl): MCOL-5744: better handling of utf8 charset aliases (#3174)
Server expands ut8_XXX aliases to utf8mb3_XXX or utf8mb4_XXX depending
on the UTF8_IS_UTF8MB3 setting in the OLD_MODE environment variable.

Server already has the necessary code implemented in the get_utf8_flag()
method of class THD. There are several uses of this flag and all we have
to do to be in line with server is to use it.

This patch does that for DDL as work on MCOL-5705 uncovered some
problems in that area.
2025-05-23 05:12:17 +04:00
Sergey Zefirov
5f6080e09c fix(join): Fixes MCOL-5056, an error of joining TEXT column from InnoDB (#3160)
We incorrectly identified TEXT columns from external tables as BLOB.
Alexander Barkov suggested a way to discriminate them which I
implemented here.
2025-05-23 05:12:17 +04:00
Aleksei Antipovskii
0f202fb633 fix(plugin): MCOL-5703 fix server crash on 'UNION ALL VALUES' queries
Such queries are not supported by the ColumnStore anyway.
2025-05-23 05:12:17 +04:00
Leonid Fedorov
0359a1fd3a chore(server_support): fixes to build columnstore branch with server >= 11.5 2025-05-22 17:14:38 +04:00
Leonid Fedorov
a1019b7c0e
chore(build): refactor main CMakeLists.txt (#3543)
* chore(build): refactor main CMakeLists.txt

* chore(build): fix boost version for packages, set clang-20 only for amd and arm

* chore(build): boost 4 sm

* chore(build): boost dep for rowgroup

* chore(build): toolset for boost

* chore(build): suppress clang warnings for boost

* chore(ci, build): use ASAN for unittest on ubuntu 24.04 only, added custom cmake flag option for bootstrap, custom params for new and existing pipelines

* chore(build): sort bootstrap flags

* chore(CI): remove publish pkg step, adding clickable link instead to publish steps, fix customenv
2025-05-20 05:00:48 +04:00
Leonid Fedorov
fc028983b9 chore(build): more fixes for the new warnings 2025-05-15 19:05:38 +04:00
Leonid Fedorov
a0bee173f6 chore(build): fixes to satisfy clang19 warnings 2025-05-15 19:05:38 +04:00
Serguey Zefirov
bd1622f331 feat(MCOL-5886): support InnoDB's table partitions in cross-engine joins
The purpose of this changeset is to obtain list of partitions from
SELECT_LEX structure and pass it down to joblist and then to
CrossEngineStep to pass to InnoDB.
2025-04-23 08:24:10 +03:00
Leonid Fedorov
6a712dc0ad
MCOL-5932: fix heap buffer overflow with minimal revert of MCOL-5776 breaking change (#3445) 2025-04-15 14:46:25 +01:00
Aleksei Antipovskii
4bea7e59a0 feat(PrimProc): MCOL-5852 disk-based GROUP_CONCAT & JSON_ARRAYAGG
* move GROUP_CONCAT/JSON_ARRAYAGG storage to the RowGroup from
  the RowAggregation*
* internal data structures (de)serialization
* get rid of a specialized classes for processing JSON_ARRAYAGG
* move the memory accounting to disk-based aggregation classes
* allow aggregation generations to be used for queries with
  GROUP_CONCAT/JSON_ARRAYAGG
* Remove the thread id from the error message as it interferes with the mtr
2025-04-11 15:21:07 +02:00
drrtuy
6b8adb822b
chore(connector): remove unused and disabled group by handler (#3481) 2025-04-04 21:27:07 +01:00
drrtuy
16904ab97d chore(compilation): fix to satisfy specific warning 2025-03-27 21:35:11 +04:00
drrtuy
87981483e2 chore(compilation): to resolve unexpected boost warnings 2025-03-27 21:35:11 +04:00
Serguey Zefirov
230506b996 fix(MCOL-5396): Fix possible infinite loop in plugin--PrimProc communication
If you manage to shut down PrimProc just before plugin is trying to send
Calpont Select Execution Plan to PrimProc, you now get a nice error
message about PrimProc being down instead of endless logs of failed
reconnection attempts.
2025-03-11 09:38:18 +03:00
Aleksei Antipovskii
cbf4fef47c more overrides 2025-02-21 20:01:34 +04:00
Aleksei Antipovskii
a4c1e2cbcb add missing override 2025-02-21 20:01:34 +04:00
Aleksei Antipovskii
0ab03c7258 chore(codestyle): mark virtual methods as override 2025-02-21 20:01:34 +04:00
drrtuy
d5dcae52cb
fix(BRM): MCOL-5879 DBRM::clearShm runs crit sections w/o sync mechanism (#3391) 2025-02-20 16:33:44 +00:00
Serguey Zefiov
6e539b8336 fix(MCOL-5889): Improper handle of DOUBLE result type with DECIMAL arguments
Sometimes server assigns DOUBLE type for arithmetic operations over
DECIMAL arguments. In this rare case width of result was incorrectly
adjusted and it triggered an assertion.

Now width of result gets adjusted only if result type is also DECIMAL.
2025-02-12 18:41:55 +04:00
Sergei Golubchik
9618ff5e61
compilation fixes for MDEV-34811 handlerton (#3341)
Co-authored-by: Leonid Fedorov <79837786+mariadb-LeonidFedorov@users.noreply.github.com>
2025-01-12 16:08:34 +04:00
mariadb-AlanMologorsky
d7cfa15d2a fix(client): MCOL-5587: Add quick-max-column-width for maridb clients.
This changeset enables quick (mariadb -q) mode when columnstore is
installed. Quick mode precludes client CLI program from storing too
much data in memory, preventing out of memory conditions.
Add quick-max-column-width=0 to prevent extra garbage dashes in output.
2024-12-22 16:59:13 +04:00
Sergey Zefirov
60dc7550f1
fix(group by, having): MCOL-5776: GROUP BY/HAVING closer to server's (#3371)
This patch introduces an internal aggregate operator SELECT_SOME that
is automatically added to columns that are not in GROUP BY. It
"computes" some plausible value of the column (actually, last one
passed).

Along the way it fixes incorrect handling of HAVING being transferred
into WHERE, window function handling and a bit of other inconsistencies.
2024-12-20 19:11:47 +00:00
Serguey Zefirov
39a976c39a fix(ubsan): MCOL-5844 - iron out UBSAN reports
The most important fix here is the fix of possible buffer overrun in
DATEFORMAT() function. A "%W" format, repeated enough times, would
overflow the 256-bytes buffer for result. Now we use ostringstream to
construct result and we are safe.

Changes in date/time projection functions made me fix difference between
us and server behavior. The new, better behavior is reflected in changes
in tests' results.

Also, there was incorrect logic in TRUNCATE() and ROUND() functions in
computing the decimal "shift."
2024-12-10 20:30:58 +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
4cba8301d5
fix(logging): Add setddldebuglevel command (#3312) (#3344) 2024-11-09 21:38:19 +00:00
drrtuy
6f6e69815d feat(bytestream,serdes): Distribute BS buf size data type change to avoid implicit data type narrowing 2024-11-08 16:28:51 +04:00
Aleksei Antipovskii
ca6c35abdd fix(dbcon) MCOL-5812 server crash related to stored functions
Using the stored function's return value as an argument
for another function was handled incorrectly, leading
to a server crash.
2024-11-05 20:33:41 +04:00
Leonid Fedorov
4b411b3968 MCOL-4696: get rid of boost::iequals 2024-08-21 21:35:52 +04:00
Leonid Fedorov
10d9e583ab
Merge branch 'stable-23.10' into 23.10.1-2 2024-07-31 18:15:01 +04:00
Leonid Fedorov
cd626ac8a0
fix(): MCOL-5587: revert quick mode due the interactive console bug (#3255) 2024-07-30 13:40:49 +01:00
mariadb-AlanMologorsky
e5e93a361a MCOL-5587: Fix columnstore.cnf.
fix(client): Fix columnstore.cnf file

This fix changes option file to apply '--quick' option only for 'mariadb' and 'mysql' clients instead of all MariaDB clients.
Otherwise 'mysqladmin' uses this option, but it doesn't exist. As a result broken CI multinode MTR stage.
2024-07-26 17:36:18 +04:00
Sergey Zefirov
7f0c281518
fix(client): MCOL-5587: enable quick mode for predictable performance (#3240) (#3243)
This changeset enables quick (mariadb -q) mode when columnstore is
installed. Quick mode precludes client CLI program from storing too
much data in memory, preventing out of memory conditions.
2024-07-11 19:05:36 +01:00
Sergey Zefirov
db4cb1d657
MCOL-4234 and MCOL 5772 cherry-picked into [stable 23.10] (#3226)
* MCOL-4234: improve GROUP BY and ORDER BY interaction (#3194)

This patch fixes the problem in MCOL-4234 and also generally improves
behavior of GROUP BY.

It does so by introducing a "dummy" aggregate and by wrapping columns
into it. This allows for columns that are not in GROUP BY to be used
more freely, for example, in SELECT * FROM tbl GROUP BY col - all
columns that are not "col" will be wrapped into an aggregate and query
will proceed to execution.

The dummy aggregate itself does nothing more than remember last value
passed into it.

There also an additional error message that tries to explain what types
of expressions can be wrapped into an aggregate.

* MCOL-5772: incorrect ORDER BY ordering for a columns not in GROUP BY (#3214)

When ORDER BY column is not in GROUP BY, is not an aggregate and there
is a SELECT column that is also not an aggregate, there was a problem:
ordering happened on the SELECTed column, not ORDERed one.

This patch fixes that particular problem and also performs some tidying
around newly added aggregate.

---------

Co-authored-by: Leonid Fedorov <79837786+mariadb-LeonidFedorov@users.noreply.github.com>
2024-06-28 00:31:53 +04:00
Denis Khalikov
88e3af4ba5
fix(plugin): MCOL-5236 Take Item from Ref_Item for group by list (#3162) (#3163)
Co-authored-by: Leonid Fedorov <79837786+mariadb-LeonidFedorov@users.noreply.github.com>
2024-06-27 17:25:57 +04:00
Leonid Fedorov
54331e1231
MCOL-4480: TEXT type added for alter table add column (#3221) 2024-06-27 17:22:41 +04:00