1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-20 09:07:44 +03:00

106 Commits

Author SHA1 Message Date
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
David Hall
f9f7b79a2b MCOL-3749 Assertion on error
Correct error code return stops assertion
2020-02-05 11:10:54 -06:00
David Hall
fc4f0e4f97 MCOL-3749 Return error when update truncates 2020-01-29 16:26:41 -06:00
Patrick LeBlanc
092994d00d
Merge pull request #1006 from LinuxJedi/change-engine
MCOL-128 Support ALTER TABLE...ENGINE=Columnstore
2020-01-24 09:26:13 -06:00
Andrew Hutchings
4b86890cf7 MCOL-128 Support ALTER TABLE...ENGINE=Columnstore
Also implements:

* ALTER TABLE from Columnstore to another engine
* MCOL-3349 CREATE TABLE ... AS SELECT.
2020-01-23 21:12:33 +00:00
Roman Nozdrin
c6aaa3f227 This commit fixes MDB crash that happens when table lock timeout fires
with multiply DML run in separate transactions.

This commit also fixes GCC unused variable warning.
2020-01-21 16:48:15 -05:00
Patrick LeBlanc
b6dfdd6e99 Merge pull request #1000 from drrtuy/MCOL-1734_2
MCOL-1734 CS now behaves similar to MDB in case of NOT IN + correlated subquery if the subquery returns empty set.
2020-01-21 16:45:24 -05:00
Andrew Hutchings
cd80b0ace5
Merge pull request #1003 from mariadb-corporation/fix-doUpdateDelete
This commit fixes MDB crash that happens when table lock timeout fires
2020-01-17 08:25:44 -08:00
Roman Nozdrin
f21998eff3
Merge pull request #1002 from LinuxJedi/10.5-compatible
MariaDB 10.5 Compatibility
2020-01-15 19:10:49 -08:00
Roman Nozdrin
f178f2c22f This commit fixes MDB crash that happens when table lock timeout fires
with multiply DML run in separate transactions.

This commit also fixes GCC unused variable warning.
2020-01-14 22:44:35 +00:00
Andrew Hutchings
a959aad92d MariaDB 10.5 Compatibility
Several changes have happened in MariaDB 10.5, most notably:

* Information Schema table definitions have changed
* More things use LEX_CSTRING

This fixes all the compile issues
2020-01-13 10:47:14 -08:00
drrtuy
8595fa0226 MCOL-1734 CS now behaves similar to MDB in case of
NOT IN + correlated subquery if the subquery returns empty set.
CS now returns full outer record set.

gcc 8.2 complains about unused variable in ha_mcs_impl.cc
2020-01-07 17:23:17 +03:00
Sergei Golubchik
96adf535ae don't create a ResourceManager to initialize a global variable
this is executed when ha_columnstore is loaded, at dlopen time
before any initialization code is run and crashes any dlopen
attemps.

Crashes - because a missing config file is a crashing offence,
but it's an issue for another day
2019-12-19 19:42:38 +01:00
Patrick LeBlanc
d8e763655c MCOL-3654: Fix row-based repl detection
if 0'd the row-based repl checks for now to prevent ruling out
stmts we should be able to process.
2019-12-17 13:26:18 -05:00
Patrick LeBlanc
e02302908b MCOL-3674: Fix row-based replication detection
Changed the row-based repl detection mechanism so stmt-based repl works
again, however, the detection mechanism is still wrong somehow.  What it
should be is currently unknown.
2019-12-17 13:15:58 -05:00
Andrew Hutchings
b7396129c7 MCOL-3672 Fix regression in deletes
Deletes appear to only use the direct delete path. This allows that to
happen.
2019-12-13 07:33:29 +00:00
Andrew Hutchings
9734a25a35 MCOL-3672 Fix double-DML execution
Direct update/delete executed doUpdateDelete as well as the regular
execution route for doUpdateDelete.

This patch only executes doUpdateDelete the first time and direct
update/delete collects the counts.
2019-12-12 22:58:20 +00:00
Andrew Hutchings
3f5e1fd0c8
Merge pull request #964 from mariadb-corporation/MCOL-3529
MCOL-3529 This patch implements direct_update and direct_delete features
2019-12-09 09:40:33 +00:00