1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-26 11:48:52 +03:00

38 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
Alexey Antipovsky
b25fee320a Remove variable-length arrays (-Wvla) 2020-11-17 15:03:10 +03:00
David Hall
46668d2607 Merge branch 'develop' into MCOL-3536 2020-06-01 15:09:44 -05:00
Patrick LeBlanc
4bddc92092 MCOL-4010 - fixes compilation errors on x64 w/-Werror
Merged in Sergei's patch.
2020-06-01 12:52:43 -04:00
David Hall
06e50e0926 MCOL-3536 collation 2020-05-26 12:42:11 -05:00
David Hall
1f3d1e6fd6 MCOL-3536 collation 2020-05-14 16:02:49 -05: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
Patrick LeBlanc
a09a9d5d0f Mass substitution 'Corporaton' -> 'Corporation' 2019-08-07 14:43:25 -05:00
Gagan Goel
e89d1ac3cf MCOL-265 Add support for TIMESTAMP data type 2019-04-23 00:00:09 -04:00
Andrew Hutchings
064d2ee9e4 Merge branch 'develop-1.2' into develop-merge-up-20190328 2019-03-28 15:09:21 +00:00
David Hall
3f2c753947 MCOL-1822-c final checkin 2019-03-05 09:33:39 -06:00
David Hall
9e1cec56b1 MCOL-1822 finishing up use long double for SUM/AVG 2019-03-01 17:34:57 -06:00
Roman Nozdrin
06696f596a MCOL-1101 Add plugin variables to replace the legacy system vars.
Legacy system vars with names infinidb_* was preserved for
    backward compatibility and they will be used if
    columnstore_use_legacy_vars variable is set.

    Remove unused structure and plugin variable.
2019-02-18 16:13:50 +03:00
Roman Nozdrin
ca0240037a FE connection info structure migration.
Replaced INFINIDB_VTABLE.cal_conn_info with a plugin thread variable.
	Fixed query_string memory deallocation crash at plugin_thdvar_cleanup.
2019-02-13 22:09:55 +03:00
David Hall
d930a1e322 MCOL-521 Some more fixes for multi-parm aggregates. Add regr slope 2018-09-25 16:31:10 -05:00
Andrew Hutchings
3a159908f4 MCOL-1385 Fix window functions
MariaDB maps MEDIAN to PERCENTILE_CONT and also has PERCENTILE_DISC now.
So remove our MEDIAN UDAF but keep the source as it is used in docs.
2018-08-03 11:55:49 +01:00
Andrew Hutchings
443a2867c4 MCOL-1385 Initial 10.3 support 2018-08-02 14:55:01 +01:00
Andrew Hutchings
8c90419852 Fix merge and coding style issues 2018-06-22 15:31:31 +01:00
David Hall
6fa7dded6f MCOL-1201 manual rebase with develop. Obsoletes branch MCOL-1201 2018-06-05 13:54:17 -05:00
Andrew Hutchings
1a582eed4a Merge branch 'develop-1.1' into 1.1-merge-up-20180509-a2 2018-05-09 09:20:55 +01:00
Andrew Hutchings
c2b9016430
Merge branch 'develop' into MCOL-1052 2018-05-05 06:29:04 +01:00
Andrew Hutchings
3c1ebd8b94 MCOL-392 Add initial TIME datatype support 2018-04-30 09:42:41 +01:00
Roman Nozdrin
b8f3cb2a98 MCOL-1052 WIP Incorporate a fix for MCOL-1348. Comment on the group_by_handler class. 2018-04-20 20:44:28 +03:00
Andrew Hutchings
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
David Hall
b401a9293c MCOL-523 Add back in initial reset for UDAF calls without GROUP BY 2017-08-02 14:57:07 -05:00
David Hall
bc2a4e7795 MCOL-523 Add UDAF and UDAnF SDK 2017-08-02 11:22:07 -05:00
David Hall
d531796bf2 MCOL-597 Fix up Windows Functions 2017-04-21 09:47:56 -05:00
David Hall
d7da34c249 MCOL-597 Fix up Windows Functions 2017-04-21 09:47:56 -05:00
David Hall
a3c4503bc9 MCOL-597 stabilization 2017-04-21 09:47:56 -05:00
David Hall
f9e5b7b507 MCOL-597 Take Window Functions just to get a compile. No other changes were needed. 2017-04-21 09:47:56 -05:00
Andrew Hutchings
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
david hill
e9d96ddc85 copyright additions 2016-06-01 20:03:20 -05:00
david hill
3a6d4c3fd2 Revert "copyright name change"
This reverts commit 7000f6e4f2eadf5bafccf7b459b3a3eff229d426.
2016-06-01 17:54:28 -05:00
david hill
7000f6e4f2 copyright name change 2016-06-01 14:54:11 -05:00
David Hall
353ec57908 Changes needed for Item::CACHE_ITEM 2016-02-29 18:01:22 -06:00
David Hall
357cba722c Change error codes to match MariaDB's new scheme 2016-02-17 10:09:40 -06:00
David Hall
e4c7f2292c Remove some files that shouldn't be in version control (If you need them, I still have them).
Some changes needded to build debug
2016-02-08 13:54:26 -06:00
david hill
f6afc42dd0 the begginning 2016-01-06 14:08:59 -06:00