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

5113 Commits

Author SHA1 Message Date
Alexander Barkov
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
Gagan Goel
6448742225 Merge pull request #1936 from mariadb-corporation/bar-develop-MCOL-4721
MCOL-4721 CHAR(1) is not collation-aware for GROUP/DISTINCT
2021-05-19 08:51:14 -04:00
Alexander Barkov
bd4cbb542d MCOL-4721 CHAR(1) is not collation-aware for GROUP/DISTINCT 2021-05-18 16:14:53 +04:00
Roman Nozdrin
9a2887748e Merge pull request #1928 from mariadb-corporation/ci-deb-dep
ci: add dh-systemd build dependency for debs
2021-05-13 17:29:43 +03:00
mariadb-RomanNavrotskiy
924b0951af ci: add dh-systemd build dependency for debs 2021-05-12 18:16:48 +02:00
Roman Nozdrin
c6db1f9191 Merge pull request #1825 from tntnatbry/MCOL-4617
MCOL-4617 Move in-to-exists predicate creation and injection into the engine.
2021-05-07 13:33:02 +03:00
Roman Nozdrin
d7b7f23da2 Merge pull request #1925 from drrtuy/MCOL-4440-dev
MCOL-4440 Primary on S3 doesn't download BRM files anymore but waits …
2021-05-07 12:27:38 +03:00
Roman Nozdrin
28a5dc1266 Merge pull request #1924 from drrtuy/MCOL-4541-dev
MCOL-4541 CMAPI API version change
2021-05-07 12:27:07 +03:00
Roman Nozdrin
d65ba900d4 MCOL-4440 Primary on S3 doesn't download BRM files anymore but waits till SM
starts up
2021-05-06 17:04:51 +00:00
Roman Nozdrin
8cf2724e4d MCOL-4541 CMAPI API version change 2021-05-06 16:55:02 +00:00
Roman Nozdrin
b9094c1b69 Merge pull request #1912 from tntnatbry/MCOL-4680-dev
MCOL-4680 FROM subquery containing nested joins returns an error.
2021-05-06 13:52:36 +03:00
Roman Nozdrin
f7644a22a6 Merge pull request #1917 from tntnatbry/MCOL-4410
MCOL-4410 SELECT bypasses select handler if @variables are involved in the query projection list.
2021-05-05 17:17:57 +03:00
Roman Nozdrin
e2f2faf39e Merge pull request #1919 from mariadb-corporation/mtr-platforms-change
ci: mtr platforms list
2021-05-05 13:31:59 +03:00
Gagan Goel
3ed9993fe7 MCOL-4410 SELECT bypasses select handler if @variables are involved
in the query projection list.

With this patch, we enable SELECT/DERIVED handler execution for
queries involving 'get_user_var' function. Whereas for 'set_user_var'
function, the handlers are still disabled and the query execution
fallsback to the server, except for some edges case described in
the test file mcol-4410.test, in which case, an appropriate error
message is returned to the client.
2021-05-05 07:14:16 +00:00
mariadb-RomanNavrotskiy
203c5ff7f8 mtr platforms list 2021-05-04 23:06:42 +02:00
Gagan Goel
78cca01dfa Merge pull request #1899 from tntnatbry/MCOL-4612
MCOL-4612 A subquery with a union for DECIMAL and BIGINT returns zeros.
2021-05-03 02:52:23 -04:00
Gagan Goel
22c7fb7c01 MCOL-4680 FROM subquery containing nested joins returns an error.
Main theme of the patch is to fix joins processing in the plugin
code. We now use SELECT_LEX::top_join_list and process the nested
joins recursively, instead of SELECT_LEX::table_list struct which
we earlier used to build the join filters. The earlier approach
did not process certain nested join ON expressions, causing certain
queries to incorrectly error out such as that described in MCOL-4680.

In addition, some legacy code is also removed.
2021-05-03 06:28:27 +00:00
benthompson15
71c16fcb56 Merge pull request #1909 from dhall-MariaDB/MCOL-4643
MCOL-4643 reset valOut after processing UDAF
2021-04-30 14:35:07 -05:00
David.Hall
1ac4c36a62 Merge pull request #1887 from mariadb-corporation/bar-develop-MCOL-4678
Part#2 : MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
2021-04-30 13:12:14 -05:00
David Hall
f4e6939139 MCOL-4643 dev 5 reset valOut after processing UDAF
After a UDAF result has been inserted in the output stream, the valOut object needs to be reset to empty in preparation for the next value. Failing to do so may cause what should be a NULL value to erroneously take the last value inserted.
2021-04-30 10:57:40 -05:00
David.Hall
6d138a4963 Merge pull request #1905 from benthompson15/MCOL-4044
MCOL-4044: Add oracle mode functions.
2021-04-30 10:13:17 -05:00
Gagan Goel
4e9307fa6d MCOL-4612 A subquery with a union for DECIMAL and BIGINT returns zeros.
In this patch, we set the unioned type to a wide decimal, if any of the
numeric columns involved in the union operation have a precision > 18
(which is also possible for BIGINT/UBIGINT types) and <= 38.
2021-04-30 12:33:33 +00:00
Gagan Goel
3238baf5b7 Merge pull request #1900 from mariadb-corporation/bar-develop-MCOL-4687
MCOL-4687 Insert from view regression
2021-04-30 08:24:23 -04:00
Alexander Barkov
2697c9bce7 MCOL-4687 Insert from view regression 2021-04-30 14:20:26 +04:00
Gagan Goel
f167a6e505 MCOL-4617 Move in-to-exists predicate creation and injection into the engine.
We earlier leveraged the server functionality provided by

Item_in_subselect::create_in_to_exists_cond and
Item_in_subselect::inject_in_to_exists_cond

to create and inject the in-to-exists predicate into an IN
subquery's JOIN struct. With this patch, we leave the IN subquery's
JOIN unaltered and instead directly perform this predicate creation
and injection into ColumnStore's select execution plan.
2021-04-30 07:57:00 +00:00
David.Hall
211d047186 Merge pull request #1907 from benthompson15/MCOL-4598
MCOL-4598: Fix the syslog setup script.
2021-04-29 16:41:08 -05:00
benthompson15
1eea9f9e47 MCOL-4598: Fix the syslog setup script. Add syslog options for broken/non-syslog setup. 2021-04-29 16:34:53 -05:00
David.Hall
7f7fa74dce Merge pull request #1902 from benthompson15/MCOL-4599
MCOL-4599: Comment in storagemanager.cnf explaining default endpoint usage.
2021-04-29 15:04:14 -05:00
benthompson15
b4b9bdf046 MCOL-4599: Comment in storagemanager.cnf explaining default endpoint usage. 2021-04-29 14:35:00 -05:00
Gagan Goel
374103220c Merge pull request #1892 from tntnatbry/fix-test-location-mcol4543
MCOL-4543 Update the test files location from mtr/basic to mysql-test/columnstore/basic.
2021-04-27 08:57:12 -04:00
Gagan Goel
c3568412a9 MCOL-4543 Update the test files location from mtr/basic to
mysql-test/columnstore/basic.
2021-04-27 11:33:26 +00:00
Roman Nozdrin
42d203ac3c Merge pull request #1888 from drrtuy/MCOL-4692-dev
Remove global lock from OAMCache
2021-04-24 15:02:56 +03:00
Roman Nozdrin
2aa5380d51 Remove global lock from OAMCache
Config now uses a single atomic variable to speed up its operations
Config has a special method to re-read a config file if it changed on disk
2021-04-23 15:41:29 +00:00
Alexander Barkov
dad9c811fd Part#2 : MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
This patch fixes failures in mtr (without --remote) in the following tests:

columnstore/basic.mcs88_import_export_csv
columnstore/basic.mcs47_cpimport_central_loc_sin_source
columnstore/basic.mcs49_cpimport_parallel_dist
columnstore/basic.mcs50_cpimport_stdin
columnstore/basic.mcs55_cpimport_binary_source
columnstore/basic.mcs56_cpimport_negative
columnstore/basic.mcs68_cpimport_datafile_separators
2021-04-23 17:09:10 +04:00
David.Hall
b0da7f4974 Merge pull request #1882 from mariadb-corporation/bar-develop-MCOL-4693
MCOL-4693 ColumnStore MTR tests: FUNCTION mcs192_db.CORR does not exist
2021-04-22 11:05:08 -05:00
Roman Nozdrin
8cc9eb4024 Merge pull request #1878 from mariadb-corporation/bar-develop-MCOL-4689
MCOL-4689 [135B blob data] in PrimPrim jounralctl records
2021-04-22 18:13:38 +03:00
Alexander Barkov
d6e88cd82e MCOL-4693 ColumnStore MTR tests: FUNCTION mcs192_db.CORR does not exist 2021-04-22 18:29:08 +04:00
Alexander Barkov
c67f70f385 MCOL-4689 [135B blob data] in PrimPrim jounralctl records 2021-04-22 10:46:26 +04:00
benthompson15
870d672efb MCOL-4044: Add oracle mode functions. 2021-04-21 16:07:42 -05:00
Roman Nozdrin
1f46baa980 Merge pull request #1827 from cvicentiu/fetch-first-refactor
MCOL-4645 Update columnstore usage of select_lex
2021-04-21 14:24:43 +03:00
Roman Nozdrin
1e287404db Merge pull request #1876 from drrtuy/MCOL-4679-dev
MCOL-4679 Using a correct id creating DEC connections
2021-04-20 13:30:47 +03:00
Roman Nozdrin
cd552d04e1 MCOL-4679 Using a correct id creating DEC connections 2021-04-20 08:24:57 +00:00
Roman Nozdrin
ce609f7942 Merge pull request #1873 from drrtuy/MCOL-4679
Simplify PMS connection entries configuration
2021-04-16 17:52:51 +03:00
Roman Nozdrin
c9b353e975 Simplify PMS connection entries configuration 2021-04-16 10:52:13 +00:00
Roman Nozdrin
7e04032005 Merge pull request #1863 from mariadb-corporation/pmp-develop
A plugable PoorManProfiler singleton
2021-04-16 13:51:01 +03:00
Bharath Bokka
a6a32128c6 Merge pull request #1871 from mariadb-corporation/bar-develop-MCOL-4678
MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
2021-04-16 12:55:21 +05:30
Alexander Barkov
ccd6b83be5 MCOL-4678 MTR tests fail because of /tmp and ./ with LOAD DATA
Also fixing the problem with missing UDFs for the affected tests.
(see MCOL-4659 for details):
When mtr runs without --remote, the UDFs must be installed inside
the test using CREATE FUNCTION.

Note, there are still more tests left with missing UDFs. They'll be
fixed separately.
2021-04-16 09:04:25 +04:00
Bharath Bokka
c955ba34cd Merge pull request #1868 from mariadb-corporation/bar-develop-MCOL-4676
MCOL-4676 ColumnStore MTR tests: missing have_innodb.inc and unpredic…
2021-04-15 14:46:14 +05:30
Alexander Barkov
625af12c63 MCOL-4676 ColumnStore MTR tests: missing have_innodb.inc and unpredictable default_storage_engine 2021-04-15 11:53:53 +04:00
Roman Nozdrin
257c5f53ee Merge pull request #1866 from mariadb-corporation/ci-drop-u16
ci: drop ubuntu:16.04 pipelines
2021-04-14 15:42:04 +03:00