1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00
Commit Graph

6198 Commits

Author SHA1 Message Date
Roman Nozdrin
f96c6bbc77 Merge pull request #2148 from drrtuy/columnstore-fix-ubuntu-2104
Fix compilation failure on aarch64 with gcc 10.3 Ubuntu 21.04
2021-11-04 18:02:44 +03:00
Denis Khalikov
b382f681a1 [MCOL-4849] Parallelize the processing of the bytestream vector.
This patch changes the logic of the `receiveMultiPrimitiveMessages`
function in the following way:

1. We have only one aggregation thread which reads the data from Queue (which is populated
by messages from BPPs).
2. Processing of the received `bytestream vector` could be in parallel depends on the
type of `TupleBPS` operation (join, fe2, ...) and actual thread pool workload.

The motivation is to eliminate some amount of context switches.
2021-11-04 13:28:22 +03:00
Vicențiu Ciorbaru
342f71e7fb Fix compilation failure on aarch64 with gcc 10.3 Ubuntu 21.04
According to C++ spec:
If an inline function or variable (since C++17) with external linkage is defined
differently in different translation units, the behavior is undefined.

The undefined behaviour causes link errors for cpimport binary.
/usr/bin/ld: /tmp/cpimport.bin.av067N.ltrans0.ltrans.o:(.data.rel.ro+0x6c8):
undefined reference to `WriteEngine::ColumnOp::isEmptyRow(unsigned long*, unsigned char const*, int)'

The isEmptyRow method is defined as inline in the cpp file and not
inline in the header file. As the method is not used as part of an
external API by any of the callers, nor is it subclassed, mark it as a
normal (non virtual) *inline* member function.
2021-11-04 10:04:08 +00:00
Roman Nozdrin
650d45fcc1 Merge pull request #2135 from mariadb-corporation/cpp17
C++17 for columnstore
2021-11-02 00:08:41 +03:00
Roman Nozdrin
61589c60d4 Merge pull request #2124 from denis0x0D/MCOL-4810_fix
MCOL-4810 Add support for missed operation.
2021-11-01 18:21:37 +03:00
Roman Nozdrin
b966dbb4ee Merge pull request #2140 from drrtuy/update-docs-develop
Update docs
2021-11-01 10:22:34 +03:00
Leonid Fedorov
69fb9d412e .clang-format moved to another PR 2021-10-29 14:57:11 +00:00
Leonid Fedorov
fdb34f8551 clang changed to stable 12 version 2021-10-29 14:57:11 +00:00
Leonid Fedorov
416b126b61 ubuntu 18.04 clang 14 instead of gcc 2021-10-29 14:57:11 +00:00
Leonid Fedorov
762ed6f972 Debian clang install 2021-10-29 14:57:11 +00:00
Leonid Fedorov
8b296c9595 Drone gcc10 install 2021-10-29 14:57:11 +00:00
Leonid Fedorov
96e4ee1905 C++17 turn on 2021-10-29 14:57:11 +00:00
Leonid Fedorov
6a00fa9839 byson unused function fix 2021-10-29 14:57:11 +00:00
Leonid Fedorov
1973168e03 c++17 fix 2021-10-29 14:57:11 +00:00
Leonid Fedorov
56d8a33f0b filesystem ambiguaty 2021-10-29 14:57:11 +00:00
Leonid Fedorov
3c4c6687b6 ctest files ignore 2021-10-29 14:57:11 +00:00
Leonid Fedorov
304031dfaa Clang Format start file 2021-10-29 14:57:11 +00:00
Roman Nozdrin
308b90c17d Merge pull request #2143 from mariadb-corporation/lz4fix
Fix build with duplicate lz4 header
2021-10-29 17:53:56 +03:00
Leonid Fedorov
c735c9fdc9 Fix build with duplicate lz4 header 2021-10-29 13:36:15 +00:00
Roman Nozdrin
96f8d00a13 Update docs 2021-10-28 13:19:12 +00:00
Denis Khalikov
6393c6d019 MCOL-4810 Add support for missed operation for longStrings. 2021-10-28 10:02:02 +03:00
Roman Nozdrin
df88ef56ee Merge pull request #2133 from mariadb-corporation/gtest-centos8-7
add powertools repo for gtest on centos8
2021-10-26 21:18:12 +03:00
mariadb-RomanNavrotskiy
6b9f1effb8 add powertools repo for gtest on centos8 2021-10-26 15:12:03 +02:00
Alexey Antipovsky
21541c6040 Merge pull request #2130 from drrtuy/fixing-octet2hex-namespace-develop
This patch puts octet2hex symbol into a correct namespace
2021-10-25 23:33:09 +03:00
Roman Nozdrin
0324cedc88 This patch puts octet2hex symbol into a correct namespace 2021-10-25 18:08:18 +00:00
Roman Nozdrin
07f2e59d65 Merge pull request #2122 from drrtuy/MCOL-4876-dev
MCOL-4876. ! First merge PR #2121
2021-10-06 17:20:28 +03:00
Roman Nozdrin
3de038c1da MCOL-4876 This patch enables continues buffer to be used by ColumnCommand and aligns BPP::blockData
that in most cases was unaligned
2021-10-06 09:23:40 +00:00
Roman Nozdrin
c376472209 Merge pull request #2121 from drrtuy/ctest-develop
This patch migrates filtering UT to ctest and elimites static files d…
2021-10-06 12:21:04 +03:00
Roman Nozdrin
4cb9fe4850 This patch migrates filtering UT to ctest and elimites static files dependencies of the UT 2021-10-05 15:03:18 +00:00
Alexander Barkov
fa9f18553a MCOL-4728 Query with unusual use of aggregate functions on ColumnStore table crashes MariaDB Server
After an AggreateColumn corresponding to SUM(1+1) is created,
it is pushed to the list:

    gwi.count_asterisk_list.push_back(ac)

Later, in getSelectPlan(), the expression SUM(1+1) was erroneously
treated as a constant:

  if (!hasNonSupportItem && !nonConstFunc(ifp) && !(parseInfo & AF_BIT) && tmpVec.size() == 0)
  {
     srcp.reset(buildReturnedColumn(item, gwi, gwi.fatalParseError));

This code freed the original AggregateColumn and replaced to a ConstantColumn.

But gwi.count_asterisk_list still pointer to the freed AggregateColumn().

The expression SUM(1+1) was treated as a constant because tmpVec
was empty due to a bug in this code:

                    // special handling for count(*). This should not be treated as constant.
                    if (isp->argument_count() == 1 &&
                            ( sfitempp[0]->type() == Item::CONST_ITEM &&
                                (sfitempp[0]->cmp_type() == INT_RESULT ||
                                 sfitempp[0]->cmp_type() == STRING_RESULT ||
                                 sfitempp[0]->cmp_type() == REAL_RESULT ||
                                 sfitempp[0]->cmp_type() == DECIMAL_RESULT)
                            )
                        )
                    {
                        field_vec.push_back((Item_field*)item); //dummy

Notice, it handles only aggregate functions with explicit literals
passed as an argument, while it does not handle constant expressions
such as 1+1.

Fix:

- Adding new classes ConstantColumnNull, ConstantColumnString,
  ConstantColumnNum, ConstantColumnUInt, ConstantColumnSInt,
  ConstantColumnReal, ValStrStdString, to reuse the code easier.

- Moving a part of the code from the case branch handling CONST_ITEM
  in buildReturnedColumn() into a new function
  newConstantColumnNotNullUsingValNativeNoTz(). This
  makes the code easier to read and to reuse in the future.

- Adding a new function newConstantColumnMaybeNullFromValStrNoTz().
  Removing dulplicate code from !!!four!!! places, using the new
  function instead.

- Adding a function isSupportedAggregateWithOneConstArg() to
  properly catch all constant expressions. Using the new function parse_item()
  in the code commented as "special handling for count(*)".
  Now it pushes all constant expressions to field_vec, not only
  explicit literals.

- Moving a part of the code from buildAggregateColumn()
  to a helper function processAggregateColumnConstArg().
  Using processAggregateColumnConstArg() in the CONST_ITEM
  and NULL_ITEM branches.

- Adding a new branch in buildReturnedColumn() handling FUNC_ITEM.
  If a function has constant arguments, a ConstantColumn() is
  immediately created, without going to
  buildArithmeticColumn()/buildFunctionColumn().

- Reusing isSupportedAggregateWithOneConstArg()
  and processAggregateColumnConstArg() in buildAggregateColumn().
  A new branch catches aggregate function has only one constant argument
  and immediately creates a single ConstantColumn without
  traversing to the argument sub-components.
2021-09-21 14:00:56 +04:00
Roman Nozdrin
d2d2491921 Merge pull request #2065 from mariadb-AlexeyAntipovsky/MCOL-4829-dev
[MCOL-4829] Compression for the temp disk-based aggregation files
2021-09-13 23:13:53 +03:00
Roman Nozdrin
ff72a12a6e Merge pull request #2114 from cvicentiu/develop-messageids-race-condition
MCOL-4852: Eliminate build race condition, messageids is generated
2021-09-09 21:12:03 +03:00
Vicențiu Ciorbaru
2556e783c6 Eliminate build race condition, messageids is generated
This ensures that building loggingcpp has messageids.h generated
beforehand, just like errorids.h .
2021-09-09 12:09:48 +03:00
Alexey Antipovsky
6a4140394d [MCOL-4829] More accurate memory counting 2021-09-07 19:52:20 +03:00
Roman Nozdrin
d7c64845b9 Merge pull request #2110 from drrtuy/MCOL-4809-develop
MCOL-4809 The patch replaces legacy scanning/filtering code with a nu…
2021-09-07 09:01:24 +03:00
Roman Nozdrin
bc85e3ab03 Merge pull request #2108 from drrtuy/MCOL-4858-dev
MCOL-4858 This patch fixes HWM comparison for 16 columns and reduces …
2021-09-07 09:00:25 +03:00
Roman Nozdrin
550d1cf1c4 MCOL-4858 This patch fixes HWM comparison for 16 columns and reduces boilerplate code for other column widths 2021-09-06 17:10:33 +00:00
Roman Nozdrin
67c85dae15 MCOL-4809 The patch replaces legacy scanning/filtering code with a number of templates that
simplifies control flow removing needless expressions
2021-09-06 17:04:52 +00:00
Alexey Antipovsky
7fea3c988e [MCOL-4829] Compression for the temp disk-based aggregation files 2021-09-02 19:30:25 +03:00
Roman Nozdrin
7d7c982d9e Merge pull request #2075 from mariadb-corporation/updates-from-5.6.2-2-develop
Updates from 5.6.2 2 develop
2021-09-02 15:46:44 +03:00
Roman Nozdrin
6ef2af1fae Merge pull request #2104 from denis0x0D/MCOL-4566_fix_review
MCOL-4566 Fixes after review.
2021-09-02 15:43:28 +03:00
Denis Khalikov
a591de666f MCOL-4566 Fixes after review.
Added:
1. More output logs.
2. Save EM to file after rebuilding.
2021-09-02 12:18:29 +03:00
Roman Nozdrin
83c0c84aea This patch adds MTR's --sorted_result option to make the tests outputs deterministic (#2107) 2021-09-01 23:43:29 +03:00
Roman Nozdrin
46cf13ffa8 Merge pull request #2101 from denis0x0D/MCOL-4810_2
MCOL-4810 Redundant copying and wasting memory in PrimProc
2021-08-27 14:05:51 +03:00
Denis Khalikov
7bda598fbf MCOL-4810 Redundant copying and wasting memory in PrimProc
This patch eliminates a copying `long string`s into the bytestream.
2021-08-26 12:16:23 +03: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
923bbf4033 MCOL-1356: Add convert_tz (#2099) 2021-08-19 17:47:10 -05:00
mariadb-RomanNavrotskiy
0e11a6c294 ci: disable preventing running mariadb service on pkgs installation 2021-08-19 12:24:40 +02:00
Leonid Fedorov
517e793843 One more bool* to bool cast bug (#2097) 2021-08-18 15:56:57 -05:00
Gagan Goel
98473a45cc Merge pull request #2079 from dhall-MariaDB/MCOL-3741
Mcol 3741 Change IDB-xxxx error codes to MCS-xxxx
2021-08-18 14:01:04 -04:00