1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00
Commit Graph

39 Commits

Author SHA1 Message Date
c2d0fa24da replace boost::shared_array<T> to std::shared_ptr<T[]> 2023-04-14 10:33:27 +00:00
a508b86091 remove boost/shared_array include 2023-04-14 09:42:50 +00:00
6c32c658d5 MCOL-5385: Delete RowGroup::setData and make Pointer ctor explicit (#2808)
* Delete RowGroup::setData and make Pointer ctor explicit

* some push_backs replaced with emplace_backs

* Fixes of review notes
2023-04-13 03:55:30 +03:00
b53c231ca6 MCOL-271 empty strings should not be NULLs (#2794)
This patch improves handling of NULLs in textual fields in ColumnStore.
Previously empty strings were considered NULLs and it could be a problem
if data scheme allows for empty strings. It was also one of major
reasons of behavior difference between ColumnStore and other engines in
MariaDB family.

Also, this patch fixes some other bugs and incorrect behavior, for
example, incorrect comparison for "column <= ''" which evaluates to
constant True for all purposes before this patch.
2023-03-30 21:18:29 +03:00
56f2346083 Remove windows ifdefs 2023-03-02 15:59:42 +00:00
3919c541ac New warnfixes (#2254)
* Fix clang warnings

* Remove vim tab guides

* initialize variables

* 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length

* Fix ISO C++17 does not allow 'register' storage class specifier for outdated bison

* chars are unsigned on ARM, having  if (ival < 0) always false

* chars are unsigned by default on ARM and comparison with -1 if always true
2022-02-17 13:08:58 +03:00
04752ec546 clang format apply 2022-01-21 16:43:49 +00:00
340a90fc8d MCOL-4874 Crossengine JOIN involving a ColumnStore table and a
wide decimal column in a non-ColumnStore table throws an exception.

ROW::getSignedNullValue() method does not support wide decimal fields
yet. To fix this exception, we remove the call to this method from
CrossEngineStep::setField().
2021-12-08 22:26:52 +00:00
9608533d92 MCOL-4734 Compilation failure: MariaDB-10.6 + ColumnStore-develop
mcsconfig.h and my_config.h have the following
pre-processor definitions:

1. Conflicting definitions coming from the standard cmake definitions:
- PACKAGE
- PACKAGE_BUGREPORT
- PACKAGE_NAME
- PACKAGE_STRING
- PACKAGE_TARNAME
- PACKAGE_VERSION
- VERSION

2. Conflicting definitions of other kinds:
- HAVE_STRTOLL - this is a dirt in MariaDB headers.
  Should be fixed in the server code. my_config.h erroneously
  performs "#define HAVE_STRTOLL" instead of "#define HAVE_STRTOLL 1".
  in some cases. The former is not CMake compatible style. The latter is.

3. Non-conflicting definitions:
  Otherwise, mcsconfig.h and my_config.h should be mutually compatible,
  because both are generated by cmake on the same host machine. So
  they should have exactly equal definitions like "HAVE_XXX", "SIZEOF_XXX", etc.

Observations:
- It's OK to include both mcsconfig.h and my_config.h providing that we
  suppress duplicate definition of the above conflicting types #1 and #2.
- There is no a need to suppress duplicate definitions mentioned in #3,
  as they are compatible!
- my_sys.h and m_ctype.h must always follow a CMake configuation header,
  either my_config.h or mcsconfig.h (or both).
  They must never be included without any preceeding configuration header.

This change make sure that we resolve conflicts by:
- either disallowing inclusion of mcsconfig.h and my_config.h
  at the same time
- or by hiding conflicting definitions #1 and #2
  (with their later restoring).
- also, by making sure that my_sys.h and m_ctype.h always follow
  a CMake configuration file.

Details:
- idb_mysql.h can now only be included only after my_config.h
  An attempt to use idb_mysql.h with mcsconfig.h instead of
  my_config.h is caught by the "#error" preprocessor directive.

- mariadb_my_sys.h can now be only included after mcsconfig.h.
  An attempt to use mariadb_my_sys.h without mcscofig.h
  (e.g. with my_config.h) is also caught by "#error".

- collation.h now can now be included in two ways.
  It now has the following effective structure:

    #if defined(PREFER_MY_CONFIG_H) && defined(MY_CONFIG_H)
    //  Remember current conflicting definitions on the preprocessor stack
    //  Undefine current conflicting definitions
    #endif
    #include "mcsconfig.h"
    #include "m_ctype.h"
    #if defined(PREFER_MY_CONFIG_H) && defined(MY_CONFIG_H)
    #    Restore conflicting definitions from the preprocessor stack
    #endif

  and can be included as follows:

  a. using only mcsconfig.h as a configuration header:

    // my_config.h must not be included so far
    #include "collation.h"

  b. using my_config.h as the first included configuration file:

    #define PREFER_MY_CONFIG_H // Force conflict resolution
    #include "my_config.h"     // can be included directly or indirectly
    ...
    #include "collation.h"

Other changes:

- Adding helper header files
     utils/common/mcsconfig_conflicting_defs_remember.h
     utils/common/mcsconfig_conflicting_defs_restore.h
     utils/common/mcsconfig_conflicting_defs_undef.h
  to perform conflict resolution easier.

- Removing `#include "collation.h"` from a number of files,
  as it's automatically included from rowgroup.h.

- Removing redundant `#include "utils_utf8.h"`.
  This change is not directly related to the problem being fixed,
  but it's nice to remove redundant directives for both collation.h
  and utils_utf8.h from all the files that do not really need them.
  (this change could probably have gone as a separate commit)

- Changing my_init() to MY_INIT(argv[0]) in the MCS services sources.
  After the fix of the complitation failure it appeared that ColumnStore
  services compiled with the debug build crash due to recent changes in
  safemalloc. The crash happened in strcmp() with `my_progname` as an argument
  (where my_progname is a mysys global variable). This problem should
  probably be fixed on the server side as well to avoid passing NULL.
  But, the majority of MariaDB executable programs also use MY_INIT(argv[0])
  rather than my_init(). So let's make MCS do like the other programs do.
2021-05-25 12:34:36 +04:00
129d5b5a0f MCOL-4174 Review/refactor frontend/connector code 2020-11-18 13:53:15 +00:00
cd48df99e5 MCOL-4368 Unified exceptions handling code in dbcon/joblist 2020-10-21 18:17:32 +00:00
70ec8524ae MCOL-4331 remove duplicate line from crossenginestep 2020-09-30 09:52:42 -05:00
811909aa72 Merge branch 'develop-1.2' into develop-merge-up-20190729 2019-07-29 12:19:26 +01:00
9c4ac78105 MCOL-2225 Make cross-engine step use backticks
If an InnoDB table has spaces in the column names the cross engine step
would fail. This patch wraps quotes around the table and column names to
support this use case.
2019-06-26 07:50:17 +01:00
5e4f1b9933 Merge branch 'develop' into MCOL-265 2019-06-10 13:58:03 +01: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
e89d1ac3cf MCOL-265 Add support for TIMESTAMP data type 2019-04-23 00:00:09 -04:00
7ca289ded9 Merge branch 'develop-1.1' into 1.1-merge-up-20180621 2018-06-22 14:51:20 +01:00
d6cb205dfc MCOL-1475 Improve cross engine error handling
Now shows MariaDB error code and message where possible.
2018-06-14 18:37:52 +01:00
3c1ebd8b94 MCOL-392 Add initial TIME datatype support 2018-04-30 09:42:41 +01:00
fbd081dbf1 MCOL-497 securing mysql connection with TLS in crossengine and querystats code. 2017-12-19 08:21:55 +03:00
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
ee74e7cc62 MCOL-662 Fix multiple filters in CrossEngine
If a CrossEngine step has multiple filters the filters were overwriting
each other. This fix stores the filters as a vector and processes them
in a loop.
2017-10-23 16:26:08 +01:00
401e257df3 MCOL-879 Fix QueryStats linking issues
With 1.1 we have removed libdrizzle and used MariaDB's client library
instead for both CrossEngine and QueryStats. Unfortunately MariaDB 10.2
has two client libraries which have different structs with the same
name. When QueryStats was running inside the ColumnStore plugin this
symbol conflict was causing a crash.

The server's built-in client API has several different and several
missing functions so some additions to sm.cpp were made to fill the
gaps.

This patch does the following:

* Make sure that libmariadb is only linked to executables, not the
ColumnStore Plugin (to avoid symbol conflicts). Note that all
executables that link to CrossEngine and/or QueryStats need to link to
libmariadb to avoid missing symbol issues.
* Use the server's built-in client API for QueryStats when run in the
plugin
* Replace missing server built-in client API calls in sm.cpp (this is
for QueryStats and CrossEngine to keep the dynamic linker happy)
* Fixes issue where using 'localhost' as the MariaDB Server hostname
would fail in QueryStats.
2017-08-18 10:16:52 +01:00
c2e0d38ed9 MCOL-515 Fix cross engine for FE2/3 modes
When subqueries and group by are used in CrossEngine the first row group
is either corrupted or ignored. This is related to MCOL-430 which fixed
the case for FE1 mode.
2017-08-04 15:11:41 +01:00
5f166733f7 MCOL-830 Allow cross engine to work with UTF8
UTF8 characters just showed as question marks. This patch makes them
retrieve correctly.
2017-07-27 14:26:30 +01:00
5d405588fc MCOL-730 Fix decimals in cross engine join
We would get strange values for scale/precision in the results column of
a cross engine join causing bad results. This patch uses the values from
the MariaDB client connector instead.
2017-06-02 14:09:30 +01:00
e9db44424c MCOL-642 Separate TEXT from BLOB
* TEXT and BLOB now have separate identifiers internally
* TEXT columns are identified as such in system catalog
* cpimport only requires hex input for BLOB, not TEXT
2017-03-27 21:36:27 +01:00
530cc94915 MCOL-267 Minor fixups
Fix things found by David Hall
2017-03-23 17:14:00 +00:00
27e5995cd3 MCOL-267 Add basic engine support
This patch adds enough support so that cross engines joins with blob
columns in the foreign engines will work. The modifications are as
follows:

* Add CrossEngine support for non-NULL-terminated (binary) data
* Add row data support for blobs (similar to varbinary)
* Add engine support for writing out blob data correctly to the storage
engine API
* Re-enable blob support in the engine plugin
2017-03-17 09:27:50 +00:00
084c1b8ecc Merge pull request #125 from mariadb-corporation/MCOL-513
Mcol 513
2017-02-20 17:47:36 +00:00
bf624231e7 MCOL-574 Fix cross engine for 'localhost'
Use TCP instead of UDS for 'localhost' to keep behaviour the same as the
previous libdrizzle engine.
2017-02-17 16:49:02 +00:00
babaac8172 MCOL-317 Remove libdrizzle
This switches to MariaDB's client library instead of libdrizzle for
Cross Engine and query stats.

It also switches to unbuffered result sets.
2017-02-09 17:58:54 -06:00
55d006de1a MCOL-513 use thread pool for jobsteps 2017-02-03 15:25:21 -06:00
b9458183eb Merge pull request #95 from mariadb-corporation/MCOL-317
MCOL-317 Remove libdrizzle
2017-01-25 13:18:08 -06:00
ffcfc41563 MCOL-507 Further ExeMgr performance improvements
This does the following:

* Switch resource manager to a singleton which reduces the amount of
times the XML data is scanned and objects allocated.
* Make the I_S tables use the FE implementation of the system catalog
* Make the I_S.columnstore_columns table use the RID list cache
* Make the extentmap pre-allocate a vector instead of many small allocs
2017-01-16 12:33:27 +00:00
3299a3d57d MCOL-317 Remove libdrizzle
This switches to MariaDB's client library instead of libdrizzle for
Cross Engine and query stats.

It also switches to unbuffered result sets.
2017-01-12 17:12:39 +00:00
52fd60f446 MCOL-430 Fix memory corruption in cross-engine
Cross engine was using fRowGroupDelivered for pulling the rows out of
libdrizzle and passing them on to the next step in the job list
simultaneously on different threads. Sometimes this is OK, but with
larger data sets it leads to data corruption and race conditions.

For pulling the rows out of libdrizzle this patch uses a new RowGroup
object instead to avoid the collision.

In addition this patch makes the DrizzleMySQL class a dynamically
allocated object. A first step into potentially using unbuffered row
results for performance and lower RAM usage at a later date.
2016-12-05 17:35:45 +00:00
f6afc42dd0 the begginning 2016-01-06 14:08:59 -06:00