1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-13 23:02:14 +03:00
Commit Graph

5453 Commits

Author SHA1 Message Date
mariadb-RomanNavrotskiy
ce9b1d2c68 ci: fix centos8 cmake upd 2021-06-08 15:54:34 +02:00
Denis Khalikov
caa02a383a MCOL-4685 Fix bug after rebase and add comments. 2021-06-07 13:00:11 +03:00
Alexey Antipovsky
475104e4d3 [MCOL-4709] Disk-based aggregation
* Introduce multigeneration aggregation

* Do not save unused part of RGDatas to disk
* Add IO error explanation (strerror)

* Reduce memory usage while aggregating
* introduce in-memory generations to better memory utilization

* Try to limit the qty of buckets at a low limit

* Refactor disk aggregation a bit
* pass calculated hash into RowAggregation
* try to keep some RGData with free space in memory

* do not dump more than half of rowgroups to disk if generations are
  allowed, instead start a new generation
* for each thread shift the first processed bucket at each iteration,
  so the generations start more evenly

* Unify temp data location

* Explicitly create temp subdirectories
  whether disk aggregation/join are enabled or not
2021-06-06 16:09:15 +03:00
Roman Nozdrin
47e9fc0312 Merge pull request #1922 from denis0x0D/MCOL-4685
MCOL-4685: Eliminate some irrelevant settings (uncompressed data and extents per file)
2021-06-06 16:00:29 +03:00
Gagan Goel
3537c0d635 Merge pull request #1962 from tntnatbry/MCOL-4642
MCOL-4642 NOT IN subquery containing an isnull in the OR predicate crashes server.
2021-06-04 07:18:46 -04:00
Alexander Barkov
a04ea450cd MCOL-4749 mcs247_from_unixtime_funtion fails if local time zone is not GMT 2021-06-04 11:53:46 +02:00
Alexander Barkov
107e417715 Merge pull request #1967 from mariadb-corporation/bar-develop-MCOL-4748
MCOL-4748 mtr mcs229_data_compression_type fails without --extern
2021-06-04 09:03:44 +04:00
Roman Nozdrin
911a41f5be Merge pull request #1935 from tntnatbry/MCOL-4665
MCOL-4665 Move outer join to inner join conversion into the engine.
2021-06-03 16:05:58 +03:00
Denis Khalikov
606194e6e4 MCOL-4685: Eliminate some irrelevant settings (uncompressed data and extents per file).
This patch:
1. Removes the option to declare uncompressed columns (set columnstore_compression_type = 0).
2. Ignores [COMMENT '[compression=0] option at table or column level (no error messages, just disregard).
3. Removes the option to set more than 2 extents per file (ExtentsPreSegmentFile).
4. Updates rebuildEM tool to support up to 10 dictionary extent per dictionary segment file.
5. Adds check for `DBRootStorageType` for rebuildEM tool.
6. Renamed rebuildEM to mcsRebuildEM.
2021-06-03 14:44:33 +03:00
Alexander Barkov
ddf19a9cc3 Merge pull request #1961 from mariadb-corporation/bar-develop-m4743
MCOL-4743 Regression: TIME_TO_SEC(const_expr) erroneosly returns 0
2021-06-03 15:16:10 +04:00
Gagan Goel
e0d2a21cb9 MCOL-4665 Move outer join to inner join conversion into the engine.
This is a subtask of MCOL-4525 Implement select_handler=AUTO.

Server performs outer join to inner join conversion using simplify_joins()
in sql/sql_select.cc, by updating the TABLE_LIST::outer_join variable.
In order to perform this conversion, permanent changes are made in some
cases to the SELECT_LEX::JOIN::conds and/or TABLE_LIST::on_expr.
This is undesirable for MCOL-4525 which will attemp to fallback and execute
the query inside the server, in case the query execution fails in ColumnStore
using the select_handler.

For a query such as:
  SELECT * FROM t1 LEFT JOIN t2 ON expr1 LEFT JOIN t3 ON expr2
In some cases, server can update the original SELECT_LEX::JOIN::conds
and/or TABLE_LIST::on_expr and create new Item_cond_and objects
(e.g. with 2 Item's expr1 and expr2 in Item_cond_and::list).
Instead of making changes to the original query structs, we use
gp_walk_info::tableOnExprList and gp_walk_info::condList. 2 Item's,
expr1 and expr2, in the condList, mean Item_cond_and(expr1, expr2), and
hence avoid permanent transformations to the SELECT_LEX.

We also define a new member variable
ha_columnstore_select_handler::tableOuterJoinMap
which saves the original TABLE_LIST::outer_join values before they are
updated. This member variable will be used later on to restore to the original
state of TABLE_LIST::outer_join in case of a query fallback to server execution.

The original simplify_joins() implementation in the server also performs a
flattening of the JOIN nest, however we don't perform this operation in
convertOuterJoinToInnerJoin() since it is not required for ColumnStore.
2021-06-03 11:13:19 +00:00
Alexander Barkov
d61690748e MCOL-4743 Regression: TIME_TO_SEC(const_expr) erroneosly returns 0 2021-06-03 11:16:53 +04:00
Alexander Barkov
20bb1b3031 MCOL-4748 mtr mcs229_data_compression_type fails without --extern 2021-06-03 11:12:05 +04:00
Gagan Goel
6f69194462 MCOL-4642 NOT IN subquery containing an isnull in the OR predicate crashes server.
InSub::handleFunc() was incorrectly exiting early for an IN subquery
containing an isnull predicate in the OR operation in the WHERE clause.
This patch properly handles the OR predicate containing an isnull/isnotnull
predicate in the WHERE clause. We don't remove the isnull operand from the
filter ParseTree in 6.x as the server no longer injects the isnull predicate
in the IN subquery due to MCOL-4617, where we moved the creation and injection
of in-to-exists predicate into the engine.
2021-06-03 01:34:14 -04:00
mariadb-RomanNavrotskiy
8a68adcac4 rename mtr disabled list files 2021-06-02 17:08:35 +02:00
Alexander Barkov
bc7b8484e5 Merge pull request #1958 from mariadb-corporation/bar-develop-mtr2
Part#3 : MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
2021-06-02 15:15:27 +04:00
Alexander Barkov
cad1b5fbba Part#3 : MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
Some MTR test still failed when running without --extern

Fixing the following problems:
- Changing "--exec mariadb" to "--exect $MYSQL" to properly pass the socket
- Changing ./suite/columnstore/std_data/ to MTR_SUITE_DIR/../std_data/
- Changing "cpimport" to $MCS_CPIMPORT.
  Detecting and exporting a proper $MCS_CPIMPORT in suite.pm
2021-06-01 18:13:40 +04:00
David.Hall
d8607be776 Merge pull request #1953 from mariadb-corporation/bar-develop-mtr
MCOL-4736 Fix cross-engine tests to run without --extern
2021-06-01 08:54:31 -05:00
Sergey Zefirov
964113636a Merge pull request #1956 from drrtuy/MCOL-4652
MCOL-4652 Fixes for wide-decimal support in bulk insert operations
2021-06-01 11:57:32 +03:00
Sergey Zefirov
04d5b55c37 MCOL-4652 Fixes for wide-decimal support in bulk insert operations
Previously cpimport didn't send wide min/max-es talking to BRM
2021-05-31 18:40:57 +00:00
Roman Nozdrin
4d835d78d3 Merge pull request #1954 from mariadb-corporation/MCOL-4675-dr
DMLProc now automatically and gracefully shutdowns
2021-05-29 09:25:39 +03:00
benthompson15
1123018b0e Merge pull request #1949 from dhall-MariaDB/MCOL-4597
MCOL-4597: logic from postConfigure migrated to post-install
2021-05-28 17:08:30 -05:00
Leonid Fedorov
d08eff75ba Added _exit in Child dmlproc service 2021-05-28 10:09:35 +00:00
Alexander Barkov
aaef69040a MCOL-4736 Fix cross-engine tests to run without --extern 2021-05-28 08:41:19 +04:00
David.Hall
7a30103925 Merge pull request #1941 from mariadb-corporation/ci-param-server-sha
ci: add server repo commit sha as build parameter
2021-05-27 12:57:16 -05:00
Roman Nozdrin
90397dfed0 MCOL-4675 DMLProc now automatically and gracefully shutdowns when a cluster state is set to
SS_SHUTDOWN_PENDING | SS_ROLLBACK
2021-05-27 11:07:32 +00:00
Roman Nozdrin
646ffb6f95 Merge pull request #1937 from mariadb-SergeyZefirov/sz-fix-warning
Fix different signedness comparison warning
2021-05-26 20:42:20 +03:00
benthompson15
12e3368ebf MCOL-4597: logic from postConfigure migrated to post-install to upgrade existing columnstore.cnf 2021-05-26 10:41:39 -05:00
mariadb-RomanNavrotskiy
440acb7b1b ci: add server repo commit sha as build parameter 2021-05-26 12:48:12 +02:00
Roman Nozdrin
69a2a003d4 Merge pull request #1947 from mariadb-corporation/bar-develop-mtr
MDEV-8334 Rename utf8 to utf8mb3
2021-05-26 09:00:11 +03:00
Alexander Barkov
d823b43932 MDEV-8334 Rename utf8 to utf8mb3
- Recording ColumnStore tests according to MDEV-8334 changes
- Fixing cs3_create_table_charset_collations to work without --extern
2021-05-26 08:00:19 +04:00
Alexander Barkov
35984b9ac1 Merge pull request #1946 from mariadb-corporation/MCOL-4734
MCOL-4734 Centos7 compilation fix
2021-05-26 05:35:39 +04:00
Roman Nozdrin
c15eb6531e MCOL-4734 Centos7 compilation fix 2021-05-25 18:25:48 +00:00
Sergey Zefirov
c89ae10f6a Fix different signedness comparison warning 2021-05-25 15:13:43 +03:00
Roman Nozdrin
42e710f817 Merge pull request #1942 from mariadb-corporation/bar-develop-compile-10.6
Fixing 10.6 + develop compilation failure
2021-05-25 14:31:37 +03:00
Alexander Barkov
9608533d92 MCOL-4734 Compilation failure: MariaDB-10.6 + ColumnStore-develop
mcsconfig.h and my_config.h have the following
pre-processor definitions:

1. Conflicting definitions coming from the standard cmake definitions:
- PACKAGE
- PACKAGE_BUGREPORT
- PACKAGE_NAME
- PACKAGE_STRING
- PACKAGE_TARNAME
- PACKAGE_VERSION
- VERSION

2. Conflicting definitions of other kinds:
- HAVE_STRTOLL - this is a dirt in MariaDB headers.
  Should be fixed in the server code. my_config.h erroneously
  performs "#define HAVE_STRTOLL" instead of "#define HAVE_STRTOLL 1".
  in some cases. The former is not CMake compatible style. The latter is.

3. Non-conflicting definitions:
  Otherwise, mcsconfig.h and my_config.h should be mutually compatible,
  because both are generated by cmake on the same host machine. So
  they should have exactly equal definitions like "HAVE_XXX", "SIZEOF_XXX", etc.

Observations:
- It's OK to include both mcsconfig.h and my_config.h providing that we
  suppress duplicate definition of the above conflicting types #1 and #2.
- There is no a need to suppress duplicate definitions mentioned in #3,
  as they are compatible!
- my_sys.h and m_ctype.h must always follow a CMake configuation header,
  either my_config.h or mcsconfig.h (or both).
  They must never be included without any preceeding configuration header.

This change make sure that we resolve conflicts by:
- either disallowing inclusion of mcsconfig.h and my_config.h
  at the same time
- or by hiding conflicting definitions #1 and #2
  (with their later restoring).
- also, by making sure that my_sys.h and m_ctype.h always follow
  a CMake configuration file.

Details:
- idb_mysql.h can now only be included only after my_config.h
  An attempt to use idb_mysql.h with mcsconfig.h instead of
  my_config.h is caught by the "#error" preprocessor directive.

- mariadb_my_sys.h can now be only included after mcsconfig.h.
  An attempt to use mariadb_my_sys.h without mcscofig.h
  (e.g. with my_config.h) is also caught by "#error".

- collation.h now can now be included in two ways.
  It now has the following effective structure:

    #if defined(PREFER_MY_CONFIG_H) && defined(MY_CONFIG_H)
    //  Remember current conflicting definitions on the preprocessor stack
    //  Undefine current conflicting definitions
    #endif
    #include "mcsconfig.h"
    #include "m_ctype.h"
    #if defined(PREFER_MY_CONFIG_H) && defined(MY_CONFIG_H)
    #    Restore conflicting definitions from the preprocessor stack
    #endif

  and can be included as follows:

  a. using only mcsconfig.h as a configuration header:

    // my_config.h must not be included so far
    #include "collation.h"

  b. using my_config.h as the first included configuration file:

    #define PREFER_MY_CONFIG_H // Force conflict resolution
    #include "my_config.h"     // can be included directly or indirectly
    ...
    #include "collation.h"

Other changes:

- Adding helper header files
     utils/common/mcsconfig_conflicting_defs_remember.h
     utils/common/mcsconfig_conflicting_defs_restore.h
     utils/common/mcsconfig_conflicting_defs_undef.h
  to perform conflict resolution easier.

- Removing `#include "collation.h"` from a number of files,
  as it's automatically included from rowgroup.h.

- Removing redundant `#include "utils_utf8.h"`.
  This change is not directly related to the problem being fixed,
  but it's nice to remove redundant directives for both collation.h
  and utils_utf8.h from all the files that do not really need them.
  (this change could probably have gone as a separate commit)

- Changing my_init() to MY_INIT(argv[0]) in the MCS services sources.
  After the fix of the complitation failure it appeared that ColumnStore
  services compiled with the debug build crash due to recent changes in
  safemalloc. The crash happened in strcmp() with `my_progname` as an argument
  (where my_progname is a mysys global variable). This problem should
  probably be fixed on the server side as well to avoid passing NULL.
  But, the majority of MariaDB executable programs also use MY_INIT(argv[0])
  rather than my_init(). So let's make MCS do like the other programs do.
2021-05-25 12:34:36 +04:00
Gagan Goel
a8ceb1d090 Merge pull request #1938 from mariadb-corporation/bar-develop-MCOL-4276
MCOL-4726 Wrong result of WHERE char1_col='A'
2021-05-24 06:43:11 -04:00
Roman Nozdrin
8699d1d66e Merge pull request #1891 from mariadb-SergeyZefirov/MCOL-4673-Regression-calShowPartition-returns-NA
Mcol 4673 regression cal show partition returns na
2021-05-24 12:10:55 +03:00
Alexander Barkov
284fc51bb7 MCOL-4726 Wrong result of WHERE char1_col='A' 2021-05-21 14:40:16 +04:00
Gagan Goel
6448742225 Merge pull request #1936 from mariadb-corporation/bar-develop-MCOL-4721
MCOL-4721 CHAR(1) is not collation-aware for GROUP/DISTINCT
2021-05-19 08:51:14 -04:00
Alexander Barkov
bd4cbb542d MCOL-4721 CHAR(1) is not collation-aware for GROUP/DISTINCT 2021-05-18 16:14:53 +04:00
Sergey Zefirov
47b1430121 Fixes to COMMIT operation logic to keep ranges in valid state 2021-05-17 14:23:43 +03:00
Roman Nozdrin
9a2887748e Merge pull request #1928 from mariadb-corporation/ci-deb-dep
ci: add dh-systemd build dependency for debs
2021-05-13 17:29:43 +03:00
mariadb-RomanNavrotskiy
924b0951af ci: add dh-systemd build dependency for debs 2021-05-12 18:16:48 +02:00
Roman Nozdrin
c6db1f9191 Merge pull request #1825 from tntnatbry/MCOL-4617
MCOL-4617 Move in-to-exists predicate creation and injection into the engine.
2021-05-07 13:33:02 +03:00
Roman Nozdrin
d7b7f23da2 Merge pull request #1925 from drrtuy/MCOL-4440-dev
MCOL-4440 Primary on S3 doesn't download BRM files anymore but waits …
2021-05-07 12:27:38 +03:00
Roman Nozdrin
28a5dc1266 Merge pull request #1924 from drrtuy/MCOL-4541-dev
MCOL-4541 CMAPI API version change
2021-05-07 12:27:07 +03:00
Roman Nozdrin
d65ba900d4 MCOL-4440 Primary on S3 doesn't download BRM files anymore but waits till SM
starts up
2021-05-06 17:04:51 +00:00
Roman Nozdrin
8cf2724e4d MCOL-4541 CMAPI API version change 2021-05-06 16:55:02 +00:00
Roman Nozdrin
b9094c1b69 Merge pull request #1912 from tntnatbry/MCOL-4680-dev
MCOL-4680 FROM subquery containing nested joins returns an error.
2021-05-06 13:52:36 +03:00