1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-05-27 01:57:30 +03:00

48 Commits

Author SHA1 Message Date
David.Hall
10cc1159a2
Merge pull request #2040 from tntnatbry/MCOL-641-move-mtr-tests
MCOL-641 Move MTR tests from future/ to basic/
2021-07-12 15:47:45 -05:00
Gagan Goel
78dbf3a7e1 MCOL-641 Move MTR tests from future/ to basic/ 2021-07-12 13:01:45 +00:00
Gagan Goel
3d557a2f1e
Merge pull request #2044 from dhall-MariaDB/MCOL-3738
MCOL-3738 COUNT(DISTINCT) with multiple parms
2021-07-12 07:34:56 -04:00
Sergey Zefirov
69eec2cc0f MCOL-2044 Test sources made more resilient 2021-07-09 18:21:08 +03:00
David Hall
76607be63a MCOL-3738 COUNT(DISTINCT) with multiple parms
Fixed regression
Added a few more mtr tests
2021-07-09 09:07:03 -05:00
Sergey Zefirov
9e0851e4cf MCOL-4766 ROLLBACK kept ranges changed inside rolled back transaction
Now ROLLBACK drops ranges to INVALID state which makes engine to rescan
blocks and discover correct ranges.
2021-07-07 18:16:56 +03:00
David.Hall
237cad347f
MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB (#1995)
MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB

Also add the original test case from MCOL-3879.
2021-07-05 02:09:41 -04:00
Denis Khalikov
a576981db0 MCOL-1205 Remove old tests.
This patch removes some tests which check `circular join` error.
2021-07-03 15:29:35 +03:00
Denis Khalikov
1d5f309b8f MCOL-1205 Support queries with circular joins
This patch adds support for queries with circular joins.
Currently support added for inner joins only.
2021-07-02 18:37:07 +03:00
Roman Nozdrin
6dc356ed60
Merge pull request #1989 from denis0x0D/MCOL-4713
MCOL-4713 Analyze table implementation.
2021-07-02 16:17:07 +03:00
Denis Khalikov
c20015a7b2 MCOL-4713 Analyze table implementation. 2021-07-02 12:37:12 +03:00
David Hall
6ae64bc750 MCOL-4789 Make mcs51_cpimport_select_from deterministic 2021-07-01 16:29:37 -05:00
Roman Nozdrin
325bb6c9e0
Merge pull request #1986 from tntnatbry/MCOL-1482
MCOL-1482 An UPDATE operation on a non-ColumnStore table involving a cross-engine join
2021-07-01 14:25:32 +03:00
David.Hall
132146b9c8
Mcol 3738 Allow COUNT(DISTINCT to have multiple parms) (#2002)
* MCOL-3738 allow COUNT(DISTINCT) multiple parameters
Changes in the way tupleaggregatestep sets up the aggregate arrays.

* MCOL-3738 mtr test
2021-06-28 20:14:44 +03:00
Gagan Goel
49255f5cbd MCOL-1482 An UPDATE operation on a non-ColumnStore table involving a
cross-engine join with a ColumnStore table errors out.

ColumnStore cannot directly update a foreign table. We detect whether
a multi-table UPDATE operation is performed on a foreign table, if so,
do not create the select_handler and let the server execute the UPDATE
operation instead.
2021-06-25 15:27:54 +00:00
Roman Nozdrin
96f2a55eea
Merge pull request #1970 from tntnatbry/MCOL-4525
MCOL-4525 Implement columnstore_select_handler=AUTO.
2021-06-14 10:43:34 +03:00
Gagan Goel
5155a08a67
Merge pull request #1987 from mariadb-corporation/bar-develop-MCOL-4700
MCOL-4700 Wrong result of a UNION for INT and INT UNSIGNED
2021-06-14 02:36:10 -04:00
Alexander Barkov
67449418ed MCOL-4700 Wrong result of a UNION for INT and INT UNSIGNED 2021-06-11 19:31:51 +04:00
Gagan Goel
e3d8100150 MCOL-4525 Implement columnstore_select_handler=AUTO.
This feature allows a query execution to fallback to the server,
in case query execution using the select_handler (SH) fails. In case
of fallback, a warning message containing the original reason for
query failure using SH is generated.

To accomplish this task, SH execution is moved to an earlier step when
we create the SH in create_columnstore_select_handler(), instead of the
previous call to SH execution in ha_columnstore_select_handler::init_scan().
This requires some pre-requisite steps that occur in the server in
JOIN::optimize() and JOIN::exec() to be performed before starting SH execution.

In addition, missing test cases from MCOL-424 are also added to the MTR suite,
and the corresponding fix using disable_indices_for_CEJ() is reverted back
since the original fix now appears to be redundant.
2021-06-11 11:35:34 +00:00
Alexander Barkov
d00ace2398 MCOL-4757 Empty set in SELECT * INFORMATION_SCHEMA.COLUMNSTORE_TABLES WHERE TABLE_NAME='t1' 2021-06-11 12:00:23 +04: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
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
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
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
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
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
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
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
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
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
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
Gagan Goel
3ed9993fe7 MCOL-4410 SELECT bypasses select handler if @variables are involved
in the query projection list.

With this patch, we enable SELECT/DERIVED handler execution for
queries involving 'get_user_var' function. Whereas for 'set_user_var'
function, the handlers are still disabled and the query execution
fallsback to the server, except for some edges case described in
the test file mcol-4410.test, in which case, an appropriate error
message is returned to the client.
2021-05-05 07:14:16 +00:00
Gagan Goel
22c7fb7c01 MCOL-4680 FROM subquery containing nested joins returns an error.
Main theme of the patch is to fix joins processing in the plugin
code. We now use SELECT_LEX::top_join_list and process the nested
joins recursively, instead of SELECT_LEX::table_list struct which
we earlier used to build the join filters. The earlier approach
did not process certain nested join ON expressions, causing certain
queries to incorrectly error out such as that described in MCOL-4680.

In addition, some legacy code is also removed.
2021-05-03 06:28:27 +00:00
David.Hall
1ac4c36a62
Merge pull request #1887 from mariadb-corporation/bar-develop-MCOL-4678
Part#2 : MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
2021-04-30 13:12:14 -05:00
Alexander Barkov
2697c9bce7 MCOL-4687 Insert from view regression 2021-04-30 14:20:26 +04:00
Gagan Goel
f167a6e505 MCOL-4617 Move in-to-exists predicate creation and injection into the engine.
We earlier leveraged the server functionality provided by

Item_in_subselect::create_in_to_exists_cond and
Item_in_subselect::inject_in_to_exists_cond

to create and inject the in-to-exists predicate into an IN
subquery's JOIN struct. With this patch, we leave the IN subquery's
JOIN unaltered and instead directly perform this predicate creation
and injection into ColumnStore's select execution plan.
2021-04-30 07:57:00 +00:00
Gagan Goel
c3568412a9 MCOL-4543 Update the test files location from mtr/basic to
mysql-test/columnstore/basic.
2021-04-27 11:33:26 +00:00
Alexander Barkov
dad9c811fd Part#2 : MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
This patch fixes failures in mtr (without --remote) in the following tests:

columnstore/basic.mcs88_import_export_csv
columnstore/basic.mcs47_cpimport_central_loc_sin_source
columnstore/basic.mcs49_cpimport_parallel_dist
columnstore/basic.mcs50_cpimport_stdin
columnstore/basic.mcs55_cpimport_binary_source
columnstore/basic.mcs56_cpimport_negative
columnstore/basic.mcs68_cpimport_datafile_separators
2021-04-23 17:09:10 +04:00
Alexander Barkov
ccd6b83be5 MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
Also fixing the problem with missing UDFs for the affected tests.
(see MCOL-4659 for details):
When mtr runs without --remote, the UDFs must be installed inside
the test using CREATE FUNCTION.

Note, there are still more tests left with missing UDFs. They'll be
fixed separately.
2021-04-16 09:04:25 +04:00
Alexander Barkov
625af12c63 MCOL-4676 ColumnStore MTR tests: missing have_innodb.inc and unpredictable default_storage_engine 2021-04-15 11:53:53 +04:00
Alexander Barkov
75e3bbc31e MCOL-4674 Fix ColumnStore to run MTR tests in a build directory 2021-04-13 11:25:25 +04:00