1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00
Commit Graph

1621 Commits

Author SHA1 Message Date
c67f70f385 MCOL-4689 [135B blob data] in PrimPrim jounralctl records 2021-04-22 10:46:26 +04:00
1f46baa980 Merge pull request #1827 from cvicentiu/fetch-first-refactor
MCOL-4645 Update columnstore usage of select_lex
2021-04-21 14:24:43 +03:00
cd552d04e1 MCOL-4679 Using a correct id creating DEC connections 2021-04-20 08:24:57 +00:00
9c2f2f5084 MCOL-4681 Fix install_mcs_mysql.sh.in to do CREATE FUNCTION instead of INSERT INTO mysql.func 2021-04-16 17:26:04 +04:00
c9b353e975 Simplify PMS connection entries configuration 2021-04-16 10:52:13 +00:00
f4b02a7aca Merge pull request #1828 from tntnatbry/MCOL-4543-4589
MCOL -4543/MCOL-4589 Subquery optimization
2021-04-14 13:50:46 +03:00
5546f6a3d5 Merge pull request #1861 from mariadb-corporation/bar-develop-MCOL-4674
MCOL-4674 Fix ColumnStore to run MTR tests in a build directory
2021-04-13 12:34:56 -05:00
75e3bbc31e MCOL-4674 Fix ColumnStore to run MTR tests in a build directory 2021-04-13 11:25:25 +04:00
362bfcd15e MCOL-4361 Replace pow(10.0, (double)scale) expressions with a static dictionary lookup. 2021-04-09 12:41:04 +04:00
47b1ea1cf9 Merge pull request #1849 from mariadb-corporation/bar-develop-MCOL-4666
MCOL-4666 Empty set when using BIT OR and BIT AND functions in WHERE
2021-04-08 03:04:54 -04:00
a6a85d157d MCOL-4666 Empty set when using BIT OR and BIT AND functions in WHERE 2021-04-07 14:37:39 +04:00
c1138c4793 Merge pull request #1771 from mariadb-SergeyZefirov/MCOL-2044-update-ranges-during-DML
Mcol 2044 update ranges during dml
2021-04-06 12:46:02 +03:00
69911c2710 A joint patch for MCOL-4614, MCOL-4615, MCOL-4660 (decimal to string conversion)
This patch fixes:
- MCOL-4614 calShowPartitions() precision loss for huge narrow decimal
- MCOL-4615 GROUP_CONCAT() precision loss for huge narrow decimal
- MCOL-4660 Narow decimal to string conversion is inconsistent about zero integral

Changes:
- Implementing Row::getDecimalField()

- Removing double arithmetic from the code printing DECIMAL values
  in TypeHandlerXDecimal::format64() and GroupConcator::outputRow().
  Using Decimal::toString() instead.

- Rewriting Decimal::toStringTSInt64(). The old implementation
  was wrong, too complex and slow (used unnecessary memmove, memcpy).

An additional cleanup:
- Removing the ENGINE=COLUMNSTORE clause from tests for MCOL-4532 and MCOL-4640
  type_decimal.test is combinations-aware. It's run two times with
  default_storage_engine=MyISAM and default_storage_engine=COLUMNSTORE.
  So the CREATE TABLE statements should not specify the engine explicitly.
- Adding --disable_warnings in the old fixed test.
  We needed to suppress warnings when the MyISAM combination is being run.
  Previously the table was erroneously created with ENGINE=COLUMNSTORE
  even with the MyISAM combination run. So warning were not generated.
2021-04-05 16:36:19 +04:00
4545a86a80 Porting old MCOL-2044-update...: new interface for writeColRecs
Progress keep and test commit

Progress keep and test commit

Progress keep and test commit

Again, trying to pinpoint problematic part of a change

Revert "Again, trying to pinpoint problematic part of a change"

This reverts commit 71874e7c0d7e4eeed0c201b12d306b583c07b9e2.

Revert "Progress keep and test commit"

This reverts commit 63c7bc67ae55bdb81433ca58bbd239d6171a1031.

Revert "Progress keep and test commit"

This reverts commit 121c09febd78dacd37158caeab9ac70f65b493df.

Small steps - I walk minefield here

Propagating changes - now CPInfo in convertValArray

Progress keep commit

Restoring old functionality

Progress keep commit

Small steps to avoid/better locate old problem with the write engine.

Progress keeping commit

Thread the CPInfo up to convertValArray call in writeColumnRec

About to test changes - I should get no regression and no updates in
ranges either.

Testing out why I get a regression

Investigating source of regression

Debugging prints

Fix compile error

Debugging print - debug regression

I clearly see calls to writeColumnRec and prints there added to discern
between these.

Fix warning error

Possible culprit

Add forgotten default parameter for convertValArray

New logic to test

Max/min gets updated during value conversion

To test results of updates

Debug logs

Debug logs

An attempt to provide proper sequence index

Debug logs

An attempt to provide proper sequence index - now magic for resetting

Debug logs

Debug logs

Debug logs

Trying to perform correct updates

Trying to perform correct updates - seqNum woes fight

COMMIT after INSERT performs 'mark extent as invalid' operation - investigating

To test: cut setting of CPInfo upon commit from DML processor

It may be superfluous as write engine does that too

Debug logs

Debug logs

Better interface for CPMaxMin

Old interface forgot to set isBinaryColumn field

Possible fix for the problems

I forgot to reassign the value in cpinfoList

Debug logs

Computation of 'binary' column property

logs indicated that it was not set in getExtentCPMaxMin, and it was impossible to compute there so I had to move that into writeengine.

To test: code to allow cross-extent insertion

To test: removed another assertion for probable cause of errors

Debug logs

Dropped excessive logs

Better reset code

Again, trying to fix ordering

Fixing order of rowids for LBID computation

Debug logs

Remove update of second LBID in split insert

I have to validate incorrect behaviour for this test

Restoring the case where everything almost worked

Tracking changes in newly created extents

Progress keeping commit

Fixing build errors with recent server

An ability to get old values from blocks we update

Progress keeping commit

Adding analysis of old values to write engine code.

It is needed for updates and deletes.

Progress keeping commit

Moving max/min range update from convertValArray into separate function with simpler logic.

To test and debug - logic is there

Fix build errors

Update logic to debug

There is a suspicious write engine method updateColumnRecs which
receives a vector of column types but does not iterate over them
(otherwise it will be identical to updateColumnRec in logic).

Other than that, the updateColumnRec looks like the center of all
updates - deleteRow calls it, for example, dml processor also calls it.

Debug logs for insert bookkeeping regression

Set up operation type in externally-callable interface

Internal operations depend on the operation type and consistency is what matters there.

Debug logs

Fix for extent range update failure during update operation

Fix build error

Debug logs

Fix for update on deletion

I am not completely sure in it - to debug.

Debug log

writeColumnRec cannot set m_opType to UPDATE unconditionally

It is called from deleteRow

Better diagnostics

Debug logs

Fixed search condition

Debug logs

Debugging invalid LBID appearance

Debug logs - fixed condition

Fix problems with std::vector reallocation during growth

Fix growing std::vector data dangling access error

Still fixing indexing errors

Make in-range update to work

Correct sequence numbers

Debug logs

Debug logs

Remove range drop from DML part of write engine

A hack to test the culprit of range non-keeping

Tests - no results for now

MTR-style comments

Empty test results

To be filled with actual results.

Special database and result selects for all tests

Pleasing MTR with better folder name

Pleasing MTR - testing test result comparison

Pleasing MTR by disabling warnings

All test results

Cleaning up result files

Reset ranges before update

Remove comments from results - point of failure in MTR

Remove empty line from result - another MTR failure point

Probably fix for deletes

Possible fix for remaining failed delete test

Fix a bug in writeRows

It should not affect delete-with-range test case, yet it is a bug.

Debug logs

Debug logs

Tests reorganization and description

Support for unsigned integer for new tests

Fix type omission

Fix test failure due to warnings on clean installation

Support for bigint to test

Fix for failed signed bigint test

Set proper unsignedness flag

Removed that assignment during refactoring.

Tests for types with column width 1 and 2

Support for types in new tests

Remove trailing empty lines from results

Tests had failed because of extra empty lines.

Remove debug logs

Update README with info about new tests

Move tests for easier testing

Add task tag to tests

Fix invalid unsaigned range check

Fix for signed types

Fix regressions - progress keeping commit

Do not set invalid ranges into valid state

A possible fix for mcs81_self_join test

MCOL 2044 test database cleanup

Missing expected results

Delete extraneous assignment to m_opType

nullptr instead of NULL

Refactor extended CPInfo with TypeHandler

Better handling of ranges - safer types, less copy-paste

Fix logic error related to typo

Fix logic error related to typo

Trying to figure out why invalid ranges aren't displayed as NULL..NULL

Debug logs

Debug logs

Debug logs

Debug logs for worker node

Debug logs for worker node in extent map

Debugging virtual table fill operation

Debugging virtual table fill operation

Fix for invalid range  computation

Remove debug logs

Change handling of invalid ranges

They are also set, but to invalid state.

Complete change

Fix typo

Remove unused code

"Fix" for tests - -1..0 instead of NULL..NULL for invalid unsigned ranges

Not a good change, yet I cannot do better for now.

MTR output requires tabs instead of spaces

Debug logs

Debug logs

Debug logs - fix build

Debug logs and logic error fix

Fix for clearly incorrect firstLBID in CPInfo being set - to test

Fix for system catalog operations suppot

Better interface to fix build errors

Delete tests we cannot satisfy due to extent rescan due to WHERE

Tests for wide decimals

Testing support for wide decimals

Fix for wide decimals tests

Fix for delete within range

Memory leak fix and, possible, double free fix

Dispatch on CalpontSystemCatalog::ColDataType is more robust

Add support for forgotten MEDINT type

Add forgottent BIGINT

empty() instead of size() > 0

Better layout

Remove confusing comment

Sensible names for special values of seqNum field

Tests for wide decimal support

Addressing concerns of drrtuy

Remove test we cannot satisfy

Final touches for PR

Remove unused result file
2021-04-05 14:18:22 +03:00
a0b46425dc Merge pull request #1787 from mariadb-corporation/bar-develop-like
MCOL-4498 LIKE is not collation aware
2021-04-02 11:57:06 +03:00
30fe666a8f A join patch for MCOL-4609, MCOL-4610, MCOL-4619, MCOL-4650, MCOL-4651
This patch is fixing the following bugs:

- MCOL-4609 TreeNode::getIntVal() does not round: implicit DECIMAL->INT cast is not MariaDB compatible
- MCOL-4610 TreeNode::getUintVal() looses precision for narrow decimal
- MCOL-4619 TreeNode::getUintVal() does not round: Implicit DECIMAL->UINT conversion is not like in InnoDB
- MCOL-4650 TreeNode::getIntVal() looses precision for narrow decimal
- MCOL-4651 SEC_TO_TIME(hugePositiveDecimal) returns a negative time
2021-03-30 16:37:05 +04:00
dfa9657f2e MCOL-4589 Follow up on MCOL-4543 to optimize out non-referenced
columns from a subquery involving UNIONs.
2021-03-29 12:07:36 +00:00
8a03e6c7d1 MCOL-4543 Subquery optimization.
For a query of the form:

SELECT COUNT(c2) FROM (SELECT * FROM t1) q;

where t1 contains 10 columns c1, c2, ... , c10.

We currently create an intermediate RowGroup in ExeMgr with
a row of the form (1, c2_value1, 1, 1, 1, 1, 1, 1, 1, 1), i.e.
for all the columns of the subquery which are not referenced in
the outer query, we substitute a constant value, which is wasteful.

With this optimization, we are trimming the RowGroup to a row
of the form (1, c2_value1). This can have non-trivial query
execution time improvements if the subquery contains large number
of columns (such as a "select *" on a very wide table) and the outer
query is only referencing a subset of these columns with lower
index values from the subquery (as an example, c1 or c2 above).
That is, the current limitation of this optimization is we are not
removing those non-referenced subquery columns (c1 in the query above)
which are to the left of a referenced column.
2021-03-29 11:56:04 +00:00
0643125426 Update columnstore usage of select_lex
After the cleanup work done for FETCH FIRST ... WITH TIES
SELECT_LEX members select_limit, explicit_limit and offset_limit are now moved
to SELECT_LEX::limit_params.
2021-03-28 16:07:32 +03:00
1e3ae2aa6d MCOL-4638 Add csNumAgg to count(distinct) with UM only 2021-03-26 10:05:01 -05:00
765858bc5b MCOL-4498 LIKE is not collation aware 2021-03-22 20:42:01 +04:00
907e99cf20 changes to match upmerge from 10.4 2021-02-17 17:11:47 +00:00
afa88866bb MCOL-4483: Fix and consolidate log files and cpimport logging. 2021-02-12 15:40:16 -06:00
229fd5d1bd Merge pull request #1756 from benthompson15/MCOL-4193-dev
MCOL-4193-dev
2021-02-12 22:41:29 +03:00
846f7fb29b MCOL-4193: Delete unused OAM and applications, ProcMon, ProcMgr, and no longer build all tools for packages 2021-02-08 17:51:09 -06:00
222b214287 Merge pull request #1750 from tntnatbry/MCOL-4515-develop
MCOL-4515 Binlog replication to CS slave hangs for INSERT .. SELECT query on master.
2021-02-08 16:27:37 +03:00
049d60f1cf Merge pull request #1749 from tntnatbry/MCOL-4493-develop
MCOL 4493
2021-02-05 12:19:32 +03:00
abf45bf46c MCOL-4493 Add ON expressions for WHERE processing when the JOIN
type is not LEFT/RIGHT.

In buildOuterJoin(), do not add ON expressions for WHERE
processing when the JOIN type is not LEFT/RIGHT.

Test cases to check correct processing of INNER JOIN ON expressions
with possible/impossible WHERE conditions are added for
  1. One side of the LEFT JOIN being INNER JOIN.
  2. One side of the LEFT JOIN being an INNER JOIN inside an INNER JOIN.
  3. Both sides of the LEFT JOIN being an INNER JOIN.
2021-02-05 09:10:38 +00:00
3096edc1d3 MCOL-3785 wrap names of db, table & columns in "`" 2021-02-04 11:40:14 +03:00
bdd0963ea3 MCOL-4515 Binlog replication to CS slave hangs for INSERT .. SELECT query on master.
An INSERT .. SELECT performed on a master node caused an infinite
loop on the slave node with columnstore_replication_slave=OFF.

The issue was ha_mcs_impl_select_next() was returning 0 if
the executing thread is a slave and returning early to avoid DML
execution on the slave. The calling code in select_handler::execute()
ran into an infinite loop due to this as it checked the return code
of the function as 0, and incorrectly thought there are more rows
to process.

The fix is to return HA_ERR_END_OF_FILE as the return value,
instead of 0. This is for the case of the query running on the
slave node with columnstore_replication_slave=OFF.
2021-02-04 06:35:00 +00:00
7277299628 Merge pull request #1742 from mariadb-AlexeyAntipovsky/MCOL-4031-dev
MCOL-4031 More accurate memory usage counting while sorting
2021-02-01 17:05:45 +03:00
42259cf612 Merge pull request #1744 from zhaorenhai/develop
Fixes MCOL-4511 and MCOL-4524
2021-01-31 09:03:32 +03:00
0ccf3a28e3 MCOL-4511 __float128 type is not supported on aarch64
long double is 128 bit on aarch64,  even if it is soft supported,
not hardware instrunction supported.
So, here we just use long double on aarch64.
2021-01-30 16:11:03 +08:00
5080e1ae53 MCOL-4031 More accurate memory usage counting while sorting 2021-01-29 18:31:20 +03:00
3e520aae63 MCOL-4188 Return true to process the error message from PP in ExeMgr 2021-01-27 15:20:45 +00:00
9c06474816 Merge pull request #1730 from mariadb-corporation/develop-10.6-build-test
Dynamic version numbering
2021-01-22 10:51:30 +03:00
363748cff1 Merge pull request #1727 from drrtuy/MCOL-4180
MCOL-4180 dbcon/execplan review
2021-01-21 18:37:59 +03:00
abbe2ebbf6 Dynamic version numbering 2021-01-21 10:30:46 +00:00
5c3b22ddf7 MCOL-4180 dbcon/execplan review 2021-01-20 16:18:02 +00:00
ab1d26127f Merge pull request #1726 from mariadb-AlexeyAntipovsky/MCOL-4505-dev
MCOL-4505 Fix DISTINCT with sub query gets wrong results
2021-01-20 10:10:35 -06:00
a9e96acf8b MCOL-4505 Fix DISTINCT with sub query gets wrong results 2021-01-20 15:40:25 +03:00
0b6dbcd4a8 MCOL-4456 Fix for bulk insertion of BLOBs 2021-01-20 11:27:56 +00:00
8206fafb7c MCOL-4496 Upmerged the commit 7fa5ca3a6 to generalise CHAR|VARCHAR|TEXT|BLOB
bulk insertion processing and fix the original issue introduced by MCOL-2000
2021-01-19 13:25:06 +00:00
b8cfda3bda A cleanup for MCOL-4464 Bitwise operations not like in MariaDB
CI with RelWithDebInfo builds revealed a problem in the main
patch for MCOL-4464, which did not show up with Debug builds.

Methods like:
- getDoubleVal()
- getDateIntVal()
- getDatetimeIntVal()
- getTimestampIntVal()
- getTimeIntVal()
- getUintVal()
- getIntVal()
- getStrVal()
require the caller to initialize the isNull argument to false.
This fact was not taken into account in MCOL-4464.

Adding proper initializations.
2021-01-13 16:51:38 +04:00
4abbe90302 MCOL-4464 Bitwise operations not like in MariaDB 2021-01-11 14:14:34 +04:00
e7b43b8299 MCOL-4455 Fix ignoring LIMIT offset
"SELECT DISTINCT col FROM table LIMIT O,N" should skip first O rows
2020-12-24 09:55:59 +03:00
45c34553db MCOL-4453 Fix SELECT ... LIMIT 0, now it returns an empty set as expected 2020-12-24 09:55:59 +03:00
b0f97611fc Merge pull request #1691 from drrtuy/MCOL-4465_MCOL-4466_MCOL-4452
Mcol 4465 mcol 4466 mcol 4452
2020-12-23 16:28:40 +03:00
994d9a5125 MCOL-4465 Use a proper ColType for UDAF in a projection RowGroup 2020-12-23 10:32:11 +00:00
c004da502a Merge pull request #1689 from drrtuy/MCOL-4463
MCOL-4463 Fix for BETWEEN() and wide DECIMAL columns
2020-12-22 12:07:29 +03:00