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

158 Commits

Author SHA1 Message Date
ccb36e9794 Merge pull request #890 from drrtuy/separate_pushdown
MCOL-2178 Separate ha_mcs_pushdown.cpp compilation.
2019-10-07 18:50:01 -04:00
12cb5201ac MCOL-2178 Separate ha_mcs_pushdown.cpp compilation.
Set a proper type for string literals on ConstantColumn ctor
to fix the regression produced by MCOL-174.

Removed OPTIMIZER_SWITCH_EXISTS_TO_IN b/c MDB produces
unsupported optimization with it and CS couldn't create
ExistsFilter.
2019-10-07 03:12:37 -05:00
6aea9e68a5 Set constant value of type DECIMAL_RESULT/REAL_RESULT in an update statement. 2019-09-27 15:09:30 -04:00
abea9481b7 Preserve the sign when a double is -0 in fetchNextRow() 2019-09-19 15:48:14 -04:00
0c58f10d12 MCOL-2178 CS now sets optimizer flags like it did in the fork-era.
This happens in external_lock() whilst locking the table.

Fixes LIMIT=1 optimization for EXISTS_SUBS subqueries.

external_lock() contains if condition that gives false positive
for SH + pushed conditions.

external_lock() now resets in_subquery_conversion_threshold
variable that governs IN_INTO_SUBQUERY optimization for
queries run in table mode.

external_lock() now purges dynamicall allocated condInfo for
SH and DH execution path.

Commented out UNION check b/c if condition gives false positives
and silently enables table mode execution for queries w/o
UNION.
2019-09-15 07:12:50 -05:00
734518bb41 MCOL-2178 Fix for handlers fallback mechanism patch.
I returned if predicate that guards FE-BE initial connection
block. This predicated had been removed by accident in cb36041

Since we switched to internal ORDER BY FE now reduces the
default limit value to uint64-2 this broke a predicate check
for correlated subqueries. I replaced a predicate with more
reasonable to avoid false positives.
2019-08-30 02:00:03 +03:00
92ee66f5fd Remove a curly brace and add a check in a for loop in create_columnstore_select_handler() 2019-08-28 19:29:12 -04:00
cb36041587 MCOL-2178 CS now explicitly calls MDB's optimizer using JOIN::optimizer_inner
call.

CS doesn't use SH for SELECT..INTO OUTFILE queries.

Clean up gwi::physTableList when processing Storage API request.

SH now explicitly set an execution error in THD::stmt_da.

SH now set queryState in select_next() to mark a begging of the execution.
2019-08-28 12:22:11 -05:00
2c63258537 MCOL-2178 SH now allows to fallback to other pushdown handlers.
SH query execution migrated from SH::init() into create_SH().
There is a session variable columnstore_processing_handlers_fallback
that allows to fallback to DH, GBH if SH fails. DH now uses semantic
tree check for unsupported features to allow to fallback to GBH or
storage API.

Fixes GBH related bug when create_GBH() returns a handler for
queries with impossible WHERE/HAVING.

Fixed bug in FromSubquery::transform() where isUnion is set to true.

Enabled RTTI b/c server team enabled it for MDB.

Removed unused code supposed to be used with vtable.
2019-08-25 04:05:59 +03:00
fd5233f070 MCOL-3424 Fix handler API breakage for write_row()
The MariaDB handler API changed for write_row(). The 'buf' parameter is
now a 'const'. This meant that our implementation didn't match the
virtual call so ours was no longer called. This implemented the 'const'.
2019-08-13 14:18:59 +01:00
6cdca1330b Merge pull request #808 from mariadb-corporation/develop-merge-up-20190729
Merge develop-1.2 into develop
2019-08-13 11:55:22 +03:00
196a50ef11 Merge pull request #815 from pleblanc1976/corporaton
Mass substitution 'Corporaton' -> 'Corporation'
2019-08-13 08:34:39 +01:00
f0c83a4a1f MCOL-2178 Enable GBH by default.
We preserve union related condition blocks until UNION-capable smart handler.

    Removed a number of commented code blocks.

    Add projection list REAL and TIME constants, e.g
        SELECT TIME'10:20:30',  TIMESTAMP'2001-01-01 10:20:30',  DATE'2001-01-01' FROM cs1;

    Marked potentially useless block in ORDER BY processing for future removal.

    Removed string variables used for reconstructed query in the pre-1.4 fork.

    Removed cp_get_plan().

    GBH doesn't step in if SH processes the query.

    All smart handlers now correctly processes impossible WHERE and HAVING.
2019-08-12 21:02:32 +03:00
7af9771319 Merge branch 'develop' into develop-merge-up-20190729 2019-08-09 14:01:11 +01:00
a09a9d5d0f Mass substitution 'Corporaton' -> 'Corporation' 2019-08-07 14:43:25 -05:00
1c460f3ba5 MCOL-2178 Cleanup of MIGR:: singleton from the plugin code.
Disable SP execution by the smart handlers for now.

    Add session variables to Enable/Disable select/derived/group_by
    handlers. Defaulted to Enable.
2019-08-04 21:50:50 -04:00
d62b66ecf7 parse_item() in execplan code now always get an actual GWI structure
to avoid accedental crashes.

Add check for Conversion of Big IN Predicates Into Subqueries optimization
conditions.

Enabled derivedTableOptimization() for group by and derived handlers.

Disabled Conversion of Big IN Predicates Into Subqueries optimization.

Disabled most of optimizer_flags for now.

RowGroup + operator now correctly sets useStringTable flag that
instructs code to check StringStore instead of plain data buffer.
2019-08-01 14:29:55 -04:00
7d5275e1bd MCOL-2178 CS now doesn't initiate a scan when MDB explicitly set scan to false in rnd_init().
sortItemIsInGroupRec() now has a base case for Item_Field and this prevents unbound recursion.

    Fixes fromSub() call with incorrect number of arguments.

    CS now doesn't ask for statistics unless a user explicitly asks for it using calsettrace().
2019-08-01 14:29:55 -04:00
a9c72675ba MCOL-2178 Fixed MDB crash with setError() operating with empty gwi.
FromSubQuery() is no pushdown aware.

    Actualize OUTER_JOIN_DEBUG section in ha_calpont_execplan.cpp
    to be used with 10.4.

    Enabled derivedTableOptimization() for select handler.
2019-08-01 14:29:55 -04:00
3074b6c4b3 MCOL-2178 Functions with constant args are processed by CS now.
Fix crash in ha_calpont_impl_close_connection()

    Fix leak in ci.tableMap.

    Removed extra returns in pushdown_init to avoid crashes.

    create_select_handler now detects INSERT..SELECT.

    buildConstColFromFilter now uses any kind of filter to supply
    relevant columns.

    Remove strings used by vtable redo phase.

    Make FromSubQuery aware of Pushdown handlers.

    Changed debug_walk to work around changed Item framework.

    Temporary disabled derived handler and unsupported features checks.
2019-08-01 14:09:35 -04:00
b4d1cbc529 MCOL-2178 upstream merge forces to add explicit namespaces.
Add a magic value check to avoid cleanup procedures only
    if needed.
2019-08-01 14:09:35 -04:00
c297ceb6c1 MCOL-2178 Connector code now uses separate hton for columnstore engine.
CS now uses hton->close_connection() method to release all FEP
    connections from MDB to ExeMgr.

    Refactor fetchNextRow() to remove decimal and double precision
    changes.
2019-08-01 14:09:35 -04:00
5409eed6f5 MCOL-2178 Introduced a dummy replacement for a infinidb_table.
Used Item attribute getters introduced by 10.4

    Make changes to support Item::CONST_ITEM introduced by 10.4
    as a replacement for INT_,REAL_,STRING_ ITEM.

    Replaced QT_INFINIDB_DERIVED and similar flags
    with correponded flags for Item->print().

    Replaced or commented out infinidb_ variable names with columnstore_
    where applicable.

    Fixed an impossible precision typo.
2019-08-01 14:09:35 -04:00
cd72326c4d MCOL-2178 Introduced a dummy replacement for a infinidb_table.
Used Item attribute getters introduced by 10.4

    Make changes to support Item::CONST_ITEM introduced by 10.4
    as a replacement for INT_,REAL_,STRING_ ITEM.

    Replaced QT_INFINIDB_DERIVED and similar flags
    with correponded flags for Item->print().

    Replaced or commented out infinidb_ variable names with columnstore_
    where applicable.
2019-08-01 14:09:35 -04:00
6fd5b2f22d MCOL-2178 Merging with 10.4
SELECT_LEX had been moved in THD so changed all references.
        Avoid writing CS decimal scales into MDB decimal fields
            d-only dec attribute. WIP
        Replaced infinidb_vtable with a singleton MIGR.
        Merged with MCOL-2121.
        Added new wsrep include paths needed by UDaF code.
        Removed .vcxproj from Connector code.
2019-08-01 12:54:17 -04:00
2071716ebd MCOL-2121 New derived_handler(MDEV-17096) infrastructure.
Renamed isInfiniDB() into isMCSTable

    Changed getSelectPlan() to reuse it with derived and
        other handler types.

    Separate pushdown handlers methods and functions.

    Removed vcxproj files from the source.

    Added fix for MCOL-2166.

    Merged with MCOL-2121
2019-08-01 12:54:17 -04:00
83a8924229 Fix namespace and class changes 2019-07-29 13:48:28 +01:00
811909aa72 Merge branch 'develop-1.2' into develop-merge-up-20190729 2019-07-29 12:19:26 +01:00
a627611378 Revert "MCOL-2243 Only set length and dec when dec is zero"
This reverts commit b05c4e8df4.
2019-07-11 13:32:44 +01:00
cddb776bd4 Merge branch 'develop-1.1' into develop-1.2-merge-up-20190619 2019-06-19 18:34:43 +01:00
b05c4e8df4 MCOL-2243 Only set length and dec when dec is zero
Length and dec for columns only needs to be set when it is the result of
a function. Otherwise it could lead to odd side-effects in MariaDB.
2019-06-18 16:13:50 +01:00
5e4f1b9933 Merge branch 'develop' into MCOL-265 2019-06-10 13:58:03 +01:00
e12a2acd53 MCOL-537 Regression test doesn't tolerate 'failed' in stderr, stdout.
I reformulate the messages.

    Changed version in preprocessor conditions to avoid compilation
    warnings in Debian 9.

    Disabled sign-compare check for generated files in DML/DDL.
2019-05-20 18:30:52 +03:00
45df72a416 Fix issue during merge 2019-05-14 14:36:46 +01:00
ee6575b013 Merge branch 'develop-1.1' into develop-1.2-merge-up-20190514 2019-05-14 14:26:41 +01:00
020b211bb7 Merge branch 'develop-1.2' into develop-merge-up-20190514 2019-05-14 13:58:33 +01:00
12d9e2ec95 fixup! MCOL-2051: CS uses 'NULL' literal as NULL when UPDATEs varchar field
Fixed to retain compatibility with CentOS 6 (no C++11 support).
Moved initialization to the ColumnAssignment constructor.
2019-05-02 10:16:45 +03:00
83aad0c7b1 MCOL-2051: CS uses 'NULL' literal as NULL when UPDATEs varchar field: proxying NULL value. Note: empty strings are still considered NULLs later on. 2019-04-30 13:59:00 +03:00
9dc33c4e82 Another try to cope with warnings under gcc 8.2. 2019-04-29 11:05:03 +03:00
4b9d046c6e Fully resolve potentially ambiguous symbols by removing using namespace statements from headers which have a cascading effect. This causes potential behavior changes when switching to c++11 since symbols can be exported from std and boost while both have been imported into the global namespace. 2019-04-29 01:21:15 -05:00
291fbac506 Fix merge issue 2019-04-25 10:51:02 +01:00
784bbe09d4 Merge branch 'develop-1.2' into develop-merge-up-20190425 2019-04-25 10:27:59 +01:00
e89d1ac3cf MCOL-265 Add support for TIMESTAMP data type 2019-04-23 00:00:09 -04:00
287b2ba7bd MCOL-3247 CS uses thread plugin variables since MCOL-1101 that aren't
good for transmiting cal_connection_info to handler::close_connection().
This variables are then erased in THD::cleanup() and the cal_connection_info
is replaced in handler::delete_table with an empty structure.
handler::close_connection() recevies cal_connection_info with empty cal_conn_hndl.
This patch uses THD::ha_data that is supposed to be used in such occasions.
2019-04-15 19:31:12 +03:00
f9f966fe96 MCOL-593 Add optional MariaDB replication support
This patch will allow MariaDB replication into UM1 when enabling the
following is added to the SystemConfig section of Columnstore.xml:

<ReplicationEnabled>Y</ReplicationEnabled>

The intended use case is to replication from an InnoDB MariaDB server
into ColumnStore. You would need to create the tables on the ColumnStore
slave as "ColumnStore" and the same tables in the master as InnoDB.

At the moment the use case is narrow and could be prone to problems so
this will use the hidden flag until we can improve it.
2019-04-15 14:45:34 +01:00
34b1d44563 MCOL-3247 Add two utility functions to simplify the code:
to log the messages and to forcely close the FEP connection.
2019-04-15 12:37:04 +03:00
064d2ee9e4 Merge branch 'develop-1.2' into develop-merge-up-20190328 2019-03-28 15:09:21 +00:00
3f2c753947 MCOL-1822-c final checkin 2019-03-05 09:33:39 -06:00
c654e8621e MCOL-1822 interim checkin 2019-02-27 13:09:37 -06:00
a2aa4b8479 MCOL-1822 Intermediate checkin. DISTINCT not working. 2019-02-25 14:54:46 -06:00