1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-05-10 02:01:04 +03:00

73 Commits

Author SHA1 Message Date
Alexander Barkov
d5c6645ba1 Adding mcs_basic_types.h
For now it consists of only:

using int128_t = __int128;
using uint128_t = unsigned __int128;

All new privitive data types should go into this file in the future.
2020-11-18 13:53:15 +00:00
Alexander Barkov
129d5b5a0f MCOL-4174 Review/refactor frontend/connector code 2020-11-18 13:53:15 +00:00
David Hall
638202417f MCOL-4171 2020-11-18 13:52:19 +00:00
Roman Nozdrin
3d94ec1568 MCOL-641 Followup on functions commit. 2020-11-18 13:51:25 +00:00
Gagan Goel
74b64eb4f1 MCOL-641 1. Add support for int128_t in ParsedColumnFilter.
2. Set Decimal precision in SimpleColumn::evaluate().
3. Add support for int128_t in ConstantColumn.
4. Set IDB_Decimal::s128Value in buildDecimalColumn().
5. Use width 16 as first if predicate for branching based on decimal width.
2020-11-18 13:47:45 +00:00
Roman Nozdrin
0bd172cd6e MCOL-641 The fix to support recent changes in 10.5.1. 2020-11-18 13:47:44 +00:00
Roman Nozdrin
2e8e7d52c3 Renamed datatypes/decimal.* into csdecimal to avoid collision with MDB. 2020-11-18 13:47:44 +00:00
Roman Nozdrin
238386bf63 MCOL-641 Replaced IDB_Decima.__v union with int128_t attribute.
Moved all tests into ./test

Introduced ./datatypes directory
2020-11-18 13:47:44 +00:00
Gagan Goel
824615a55b MCOL-641 Refactor empty value implementation in writeengine. 2020-11-18 13:47:44 +00:00
Roman Nozdrin
97ee1609b2 MCOL-641 Replaced NULL binary constants.
DataConvert::decimalToString, toString, writeIntPart, writeFractionalPart are not templates anymore.
2020-11-18 13:47:44 +00:00
Roman Nozdrin
de85e21c38 MCOL-641 This commit cleans up Row methods and adds couple UT for Row. 2020-11-18 13:47:02 +00:00
Gagan Goel
b07db9a8f4 MCOL-641 Basic support for updates. 2020-11-18 13:47:01 +00:00
drrtuy
54c152d6c8 MCOL-641 This commit introduces templates for DataConvert and RowGroup methods. 2020-11-18 13:47:01 +00:00
Gagan Goel
77e1d6abe3 Basic SELECT support for Decimal38 2020-11-18 13:47:00 +00:00
Roman Nozdrin
c9f42fb5cc MCOL-641 PoC version for DECIMAL(38) using BINARY as a basis. 2020-11-18 13:47:00 +00:00
Gagan Goel
32f6167067 MCOL-641 Work of Ivan Zuniga on basic read and write support for Binary16 2020-11-18 13:47:00 +00:00
Gagan Goel
13264feb7d MCOL-4320/4364/4370 Fix multibyte processing for LDI/Insert...Select
For CHAR/VARCHAR/TEXT fields, the buffer size of a field represents
the field size in bytes, which can be bigger than the field size in
number of characters, for multi-byte character sets such as utf8,
utf8mb4 etc. The buffer also contains a byte length prefix which can be
up to 65532 bytes for a VARCHAR field, and much higher for a TEXT
field (we process a maximum byte length for a TEXT field which fits in
4 bytes, which is 2^32 - 1 = 4GB!).

There is also special processing for a TEXT field defined with a default
length like so:
  CREATE TABLE cs1 (a TEXT CHARACTER SET utf8)
Here, the byte length is a fixed 65535, irrespective of the character
set used. This is different from a case such as:
  CREATE TABLE cs1 (a TEXT(65535) CHARACTER SET utf8), where the byte length
for the field will be 65535*3.
2020-10-26 17:51:24 +00:00
Gagan Goel
5646164a46
Merge pull request #1459 from dhall-MariaDB/MCOL-4144-dev
MCOL-4144-dev Enable lower_case_table_names
2020-09-24 19:10:22 -04:00
David Hall
35c4b66a67 MCOL-4144 Enable lower_case_table_names
Create tables and schemas with lower case name only if the flag is set.
During operations, convert to lowercase in plugin. Byt the time a query gets to ExeMgr, DDLProc etc., everything must be lower case if the flag is set, and undisturbed if not.
2020-09-24 15:21:13 -05:00
Roman Nozdrin
df0c2b2fbe MCOL-4278 MCS quits early from rnd_end() in the presense of sql_select_limit session variable
Renamed a couple methods to align their names with others
2020-09-24 08:46:00 +00:00
Alexander Barkov
7f6ad16728 MCOL-4303 UPDATE..SET using another table is not updating
The change for MCOL-4264 erroneously added the "lock_type" member
to cal_connection_info, which is shared between multiple tables.
So some tables that were opened for write erroneously identified
themselves as read only.

Moving the member to ha_mcs instead.
2020-09-11 12:26:26 +04:00
Alexander Barkov
f00cc571b5 MCOL-4264 [Cross-Engine] UPDATE to INNODB table with WHERE clause using Columnstore as sub query failing
Problem:

When processing cross-engine queries like:

update cstab1 set a=100 where a not in (select a from innotab1 where a=11);
delete from innotab1  where a not in (select a from cstab1 where a=1);

the ColumnStore plugin erroneously executed the whole query inside
ColumnStore.

Fix:

- Adding a new member cal_connection_info::lock_type and setting it
  inside ha_mcs_impl_external_lock() to the value passed in the parameter
  "lock_type".

- Adding a method cal_connection_info::isReadOnly() to test
  if the last table lock made in ha_mcs_impl_external_lock()
  for done for reading.

- Adding a new condition checking cal_connection_info::isReadOnly() inside
  ha_mcs_impl_rnd_init(). If the current table was locked last time for reading,
  then doUpdateDelete() should not be executed.
2020-09-08 07:06:52 +04:00
Gagan Goel
b44e1e2566
Merge pull request #1372 from dhall-MariaDB/MCOL-4236
Mcol 4236
2020-08-24 19:04:33 -04:00
David Hall
7bd878de0a MCOL-4236 remove type casting *f to something it's not
During data retrieval, we were type casting a field type to what we thought was the correct type. Often it was not. Since we're calling virtual functions on *f, there's no need to type cast in most cases. This was a relic from days gone by.
2020-08-19 14:37:38 -05:00
Gagan Goel
86fb66365c 1. Set 1M as the threshold on the number of records to flush the cache.
2. Set 100k as the batch size when flushing records into ColumnStore, i.e.,
a flush of 1M records will be performed in 10 batches, each being 100k.

3. For INSERT ... SELECT on the cache, use the default insertion method of cpimport.
2020-08-18 18:01:40 -04:00
David Hall
2880d0871f MCOL-4247 add break to case 2020-08-18 11:47:06 -05:00
David Hall
7ba40a5544 MCOL-4247 TYpecast causes wrong virtual function 2020-08-17 17:34:58 -05:00
benthompson15
219f67d162 MCOL-4181: Possible setting of ci->stats.fUser to NULL causing crash. 2020-07-20 15:18:58 -05:00
David Hall
085b06d422 Merge branch 'develop' into MCOL-4126 2020-06-30 11:25:11 -05:00
David Hall
8179ffffdf MCOL-4126 Don't reset ci->tableOid if not autocommit. 2020-06-30 11:21:30 -05:00
Patrick LeBlanc
41745490ed
Revert "MCOL-4126 reset ci->tableOid after INSERT|DELETE" 2020-06-30 10:37:34 -05:00
David Hall
0a2fe7d2fb MCOL-4126 reset ci->tableOid after INSERT|DELETE 2020-06-29 16:20:05 -05:00
Gagan Goel
c30d105c30 Use batch inserts for the cache flush. 2020-06-03 15:20:03 -04:00
Gagan Goel
57f393feaf
Merge pull request #1246 from pleblanc1976/mcol-4023-1.5
Merge MCOL-4023 fix into 1.5
2020-06-02 11:33:10 -04:00
Patrick LeBlanc
4bddc92092 MCOL-4010 - fixes compilation errors on x64 w/-Werror
Merged in Sergei's patch.
2020-06-01 12:52:43 -04:00
Gagan Goel
01ff2652a6 MCOL-4023 Pushdown WHERE conditions for UPDATE/DELETE.
For certain queries, such as:
  update cs1 set i = 41 where i = 42 or (i is null and 42 is null);
the SELECT_LEX.where does not contain the required where conditions.
Server sends the where conditions in the call to cond_push(), so
we are storing them in a handler data member, condStack, and later
push them down to getSelectPlan() for UPDATES/DELETEs.
2020-06-01 11:03:42 -04:00
Patrick LeBlanc
8d0338411d
Merge pull request #1202 from tntnatbry/develop-mcol4000
MCOL-4000 Allow columnstore_use_import_for_batchinsert to use a new value, ALWAYS.
2020-05-15 12:28:18 -05:00
Gagan Goel
e4dde6157d MCOL-4002 Reset cal_connection_info members at the end of
ha_mcs_impl_end_bulk_insert() for transactions as well.
2020-05-14 16:21:49 -04:00
Gagan Goel
816139d06d MCOL-4000 Allow columnstore_use_import_for_batchinsert to use a
new value, ALWAYS, which invokes cpimport for LDI and INSERT..SELECT
from within and outside a transaction.

Default value of the session variable, ON, remains unchanged.
2020-05-12 19:42:15 -04:00
Patrick LeBlanc
cb4228d982 Merge branch 'columnstore-1.4.3' into merge-hotfix-patches-1.5
Conflicts:
	VERSION
	dbcon/mysql/ha_mcs.cpp
	dbcon/mysql/ha_mcs_execplan.cpp
	dbcon/mysql/ha_mcs_impl.cpp
	dbcon/mysql/ha_mcs_pushdown.cpp
	oam/install_scripts/columnstore-post-install.in
	oam/install_scripts/columnstore-pre-uninstall.in
	oam/install_scripts/columnstore.in
	oam/install_scripts/post-mysql-install
2020-04-27 17:17:55 -04:00
benthompson15
e7caeb8722 Another check for Update/Delete with replication. 2020-04-13 14:02:06 -05:00
benthompson15
2bdb40ed64 add logic for ha_mcs_impl_direct_update_delete_rows to handle delete statements with replication enabled. 2020-04-10 17:43:21 -05:00
Roman Nozdrin
ab2003baaa MCOL-3903 Enable Select Handler to run query part of INSERT..SELECT.
Original SH implementation sends the result set back to the client
thus it can't be used in INSERT..SELECT, SELECT INTO OUTFILE,CREATE
TABLE AS SELECT etc.
CLX-77 feature has been backported into MDB to enable SH to run
query part of the mentioned queries.
2020-04-07 09:17:05 +00:00
Gagan Goel
6d9544a15e Merge pull request #1126 from drrtuy/MCOL-3903_1_4
MCOL-3903 Enable Select Handler to run query part of INSERT..SELECT.
Conflicts:
	dbcon/mysql/ha_mcs_pushdown.cpp
2020-04-01 13:45:00 -04:00
Gagan Goel
3d5d113a84 Merge pull request #1117 from drrtuy/MCOL-3828_1_4
MCOL-3828 This commit replaces the method that calls JOIN::optimise()
2020-04-01 13:43:10 -04:00
Roman Nozdrin
ce0311aa79 MCOL-3828 This commit replaces the method that calls JOIN::optimise()
internally(thus can remove equi-JOIN predicates) with a recursive f()
to inject equi-JOIN conditions for IN + correlated subquery Item.
This change both solves MCOL-3747 issue and remove issues I first
faced in union.sql test.

This commit also fixes a clean up for conditions pushed for table API
execution path and replaces NULL with nullptr in ha_mcs_impl.cpp.
2020-03-24 14:00:42 +00:00
Gagan Goel
b5373d227a MCOL-3777 Cleanup left-over values from a previously failed insert. 2020-03-05 02:26:58 +00:00
Patrick LeBlanc
9cc1e1c4f8 Merge pull request #1006 from LinuxJedi/change-engine
MCOL-128 Support ALTER TABLE...ENGINE=Columnstore
2020-02-28 13:54:54 -05:00
David Hall
a91f7b7d6e MCOL-3812 remove call to thd_set_ha_data()
MariaDB 10.5 doesn't want us to call this.
2020-02-20 10:19:45 -06:00
Gagan Goel
6d98de3922 Use const_cast to assign to field_length due to
change in server 10.4 commit 1394216e3db67152a1356fddd8ddcd563b4f38c3
2020-02-14 01:00:50 +00:00