1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-21 19:45:56 +03:00

35 Commits

Author SHA1 Message Date
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
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
Roman Nozdrin
5cedeb110b MCOL-3529 This patch implements direct_update and direct_delete features
to properly report the number of rows affected by UPDATE|DELETE.
2019-11-27 09:33:21 -06:00
Roman Nozdrin
3fabf01e93 MCOL-3593 Disabled full optimizer run and enabled copy-pasted simplify_joins.
Disabled 4th if block in buildOuterJoin to handle non-optimized MDB query
    structures.

    Broke getSelectPlan into pieces: processFrom, processWhere.

MCOL-3593 UNION processing depends on two flags isUnion that comes as
arg of getSelectPlan and unionSel that is a local variable in
getSelectPlan. Modularization of getSelectPlan broke the mechanizm.
This patch is supposed to partially fix it.

MCOL-3593 Removed unused if condition from buildOuterJoin that allows
unsupported construct subquery in ON expression.
Fixed an improper if condition that ignors tableMap entries w/o condition
in external_lock thus external_lock doesn't clean up when the query
finishes.
Fixed wrong logging for queries processed in tableMode. Now rnd_init
properly sends queryText down to ExeMgr to be logged.

MCOL-3593 Unused attribute FromSubQuery::fFromSub was removed.
 getSelectPlan has been modularized into: setExecutionParams,
 processFrom, processWhere. SELECT, HAVING, GROUP BY, ORDER BY
 still lives in getSelectPlan.
Copied optimization function simplify_joins_ into our pushdown
 code to provide the plugin code with some rewrites from MDB it
 expects.
The columnstore_processing_handlers_fallback session variable
 has been removed thus CS can't fallback from SH to partial
 execution paths, e.g. DH, GBH or plugin API.

MCOL-3602 Moved MDB optimizer rewrites into a separate file.

Add SELECT_LEX::optimize_unflattened_subqueries() call to fix IN
 into EXISTS rewrite for semi-JOINs with subqueries.

disable_indices_for_CEJ() add index related hints to disable
 index access methods in Cross Engine Joins.

create_SH() now flattens JOIN that has both physical tables and
 views. This fixes most of views related tests in the regression.
2019-11-25 10:03:32 -06:00
Andrew Hutchings
1a94d530fd Use execvp instead execv for cpimport
execv() doesn't use PATH settings so can't find cpimport for
INSERT...SELECT and LOAD DATA INFILE. Switch to execvp() as we have done
in other parts of the codebase.
2019-11-18 07:35:48 +00:00
Andrew Hutchings
8ab9ebb0f4 MCOL-3606 Make ColumnStore use generic paths
ColumnStore now uses standard bin/lib paths for pretty much everything.
Data path is now hard-coded to /var/lib/columnstore.

This patch also:

* Removes v1 decompression
* Removes a bunch of unneeded files
* Removes COLUMNSTORE_INSTALL_DIR / $INSTALLDIR
* Makes my.cnf.d work for all platforms (MCOL-3558)
* Changes configcpp to use recursive mutex (fixes possible config write deadlock)
* Fixes MCOL-3599 Fix regr functions, The library was installed in the wrong location
* Fixes a bunch of Ubuntu packaging issues
* Changes the binary names of several of the executables so as not to
clash with potential executables from other packages
2019-11-09 16:53:05 +00:00
Andrew Hutchings
20c1949152 Replication improvements
This patch fixes:

MCOL-3557 - Row Based Replication events to ColumnStore tables will no
longer cause MariaDB to crash, it will error instead.

MCOL-3556 - Remove the Columnstore.xml variable to turn on ColumnStore
tables applying replication events and instead make it a system variable
that can be set in my.cnf called "columnstore_replication_slave". This
allows it to be set per-UM.
2019-10-14 11:54:48 +01:00
Gagan Goel
c8df46ed26 Replace ha_calpont with ha_mcs in the source code and filenames in the plugin code. 2019-10-11 17:33:43 +00:00