1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00
Commit Graph

1013 Commits

Author SHA1 Message Date
40a0c30940 Add missing UDF functions
Some UDF functions were missed when I fixed the install permissions
issue. This adds them back and fixes test010
2019-08-30 17:16:45 +01: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
4f86b0f909 Fix develop build breakages 2019-08-29 09:44:14 +01: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
e60fbf260f Disable processing of a union in a subquery by the select_handler 2019-08-21 21:59:27 -04:00
630f926dc6 Fix MDB crash bug with failed assertion on Item_func::fixed. 2019-08-20 21:12:09 +03:00
f5af10a0c4 1. For BETWEEN/IN functions in the SELECT clause, build a function column
2. CASE function should return false when it evaluates to NULL (e.g. due to absense of ELSE clause)

3. Set the operation type of IN function to varchar if all parameters are char/varchar/text
2019-08-18 21:23:41 -04:00
489c09c4dc Merge pull request #827 from drrtuy/MCOL-3317
MCOL-3317 Moved fill-next-block from writeRow() into allocRowId.
2019-08-16 22:42:26 +03:00
e2f1b07e70 MCOL-3317 Moved fill-next-block from writeRow() into allocRowId.
Intro* INSERT statements could face a non-existant block when MCOL-498 feature
    is enabled. writeRow() guard blocks was supposed to proactively create empty
    blocks. The pre-patch logic failed when first value in the block has been
    removed by DELETE and this overwrites the whole valid block with empty magics.
    This patch moves proactive creation logic into allocRowId().
2019-08-16 21:28:07 +03:00
b4c02e41c7 MCOL-3432 Fix plugin install for non-root
MariaDB 10.4 only allows the system root user to log in as the root DB
user. This means the SQL commands to install the plugins won't run on a
non-root install. This patch skips the grant tables for plugin install
and does some workarounds to get the plugins in.
2019-08-15 17:33:31 +01:00
4a4d35180a Merge pull request #823 from drrtuy/MCOL-3416
MCOL-3416 Revived MULT_EQUAL_FUNC support in conditions.
2019-08-14 12:17:34 -04:00
08b1c69905 MCOL-3416 Revived MULT_EQUAL_FUNC support in conditions.
Removed unused symbol from DML code of the plugin.
2019-08-14 17:01:59 +03:00
973b80dbbc Merge pull request #820 from mariadb-corporation/MCOL-3424
MCOL-3424 Fix handler API breakage for write_row()
2019-08-14 16:46:20 +03:00
f64db01d81 Merge pull request #822 from mariadb-corporation/remove-infinidb
Fix hton usage
2019-08-14 16:44:13 +03:00
ad355dc771 Fix hton usage 2019-08-14 14:03:23 +01: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
b1bc995420 Merge branch 'develop' into remove-infinidb 2019-08-13 12:32:01 +03: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
9d83b49fca MCOL-104 First pass of InfiniDB rename in code 2019-08-12 09:41:28 +01:00
7af9771319 Merge branch 'develop' into develop-merge-up-20190729 2019-08-09 14:01:11 +01:00
7b006b6e74 MCOL-104 Remove InfiniDB Engine
Remove the InfiniDB engine which is a duplicate of the ColumnStore
engine.
2019-08-09 11:51:55 +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
765d1d38d4 MCOL-174 Handle quoted numerics 2019-07-31 13:58:50 -05: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
6219486607 MCOL-3399 Fix VARCHAR LDI length processing
Accidentally passed the wrong number of bytes when processing the row
provided in LDI. Revert the buf increment code.
2019-07-10 11:09:40 +01:00
5bb388842c Merge pull request #794 from mariadb-corporation/MCOL-3391
MCOL-3391 Fix columnstore_upgrade unicode support
2019-06-25 15:40:56 -05:00
089ec7d4dc MCOL-3391 Fix columnstore_upgrade unicode support
The columnstore_upgrade() procedure would break on utf8 table names.
This patch fixes that.
2019-06-25 17:15:30 +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
7d22a5945c MCOL-1989 Fix view in view subquery outer join
A view calling a view as part of a subquery outer join was not getting
the view name for the derived table columns. Which caused ColumnStore to
think it was joining outside of the view and triggered a missing column
error.

This fix adds the view name from the subquery if one cannot be obtained
from the field object.
2019-06-14 15:52:30 +01:00
e3cd205388 MCOL-1968 Fix UTF char/varchar min/max handling
If the first byte of a char/varchar was > 0x80 then it will break the
min/max values for an extent during cpimport. This patch makes the
min/max compare unsigned and only switches to signed when storing.

In addition send all the LDI / INSERT...SELECT data to cpimport, not
truncated. Let cpimport figure out the truncation point.
2019-06-11 10:37:04 +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