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

44 Commits

Author SHA1 Message Date
3e20a3d566 MCOL-5890: DROP TABLE IF EXISTS should not generate errors for non existing tables 2025-04-08 20:30:01 +04:00
3bcc2e2fda fix(memory leaks): MCOL-5791 - get rid of memory leaks in plugin code (#3365)
There were numerous memory leaks in plugin's code and associated code.
During typical run of MTR tests it leaked around 65 megabytes of
objects. As a result they may severely affect long-lived connections.

This patch fixes (almost) all leaks found in the plugin. The exceptions
are two leaks associated with SHOW CREATE TABLE columnstore_table and
getting information of columns of columnstore-handled table. These
should be fixed on the server side and work is on the way.
2024-12-06 09:04:55 +00:00
d50a0fa2e6 MCOL-5005 Add charset number to system catalog - Part 2.
1. Extend the calpontsys.syscolumn system catalog table
  with a new column, 'charsetnum'.

  'charsetnum' field is set to the 'number' member of the
  'charset_info_st' struct defined in the server in m_ctype.h.

  For CHAR/VARCHAR/TEXT column types, 'charset_info_st' is
  initialized to the charset/collation of the column, which
  is set at the column-level or at the table-level in the DDL.

  For BLOB/VARBINARY binary column types, 'charset_info_st' is
  initialized to my_charset_bin (charsetnum=63).

  For all other column types, charsetnum is set to 0.

  2. Add support for the newly added 'charsetnum' column in the
  automatic system catalog upgrade logic in dbbuilder.

  For existing table definitions, charsetnum for the column is
  defaulted to 0.

  3. Add MTR test case that creates a few table definitions with
  a range of charset/collation combinations and queries the
  calpontsys.syscolumn system catalog table with the charsetnum
  field for the columns in the table DDLs.
2023-08-15 17:21:47 +00:00
a36ea6dbb4 MCOL-5005 Add charset number to system catalog - Part 1.
This patch improves/fixes the existing handling of CHARSET and
COLLATION symbols in the ColumnStore DDL parser.

Also, add fCollate and fCharsetNum member variables to the
ddlpackage::ColumnType class.
2023-07-28 18:36:53 -04:00
56f2346083 Remove windows ifdefs 2023-03-02 15:59:42 +00:00
bbb168a846 Mcol 4560 (#2337)
* MCOL-4560 remove unused xml entries and code that references it.
There is reader code and variables for some of these settings, but nobody uses them.
2022-04-18 18:00:17 -04:00
237cad347f MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB (#1995)
MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB

Also add the original test case from MCOL-3879.
2021-07-05 02:09:41 -04: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
d2e7c9d98d MCOL-2000 Process charset definitions in the DDL
MCOL-2000 Process charset definitions in the ALTER TABLE .. ADD COLUMN

MCOL-2000 Yet another fixes for column charsets

* make respect for column (including table/db/server default) charsets
  for the TEXT(n) fields
* round TEXT(n) column length up to the next default length of TEXT-like
  subtypes, 255 (TINYTEXT), 65535 (TEXT) and so on up to 2100000000
  (LONGTEXT)
2020-12-04 15:01:01 +03:00
f7002e20b5 ::writeRow now treats WR_BINARY as int128 for 16 bytes DT only
WF avg uses const & as arguments types

Removed BINARY from DDL parser
2020-11-18 13:52:20 +00:00
31d597d87e MCOL-641 This commit enables CS to return a warning on non-supported ZEROFILL
keyword.

The change potentially replaces tabs with spaces in the bison's ddl.y file.
2020-11-18 13:47:01 +00:00
2eb5af1d24 MCOL-641 This commit adds support for SIGNED and ZEROFILL keywords in
CREATE TABLE. ZEROFILL is dummy though.

There is a new file with column width utilities.

Array access was replaced by a variable that is calculated only once in
TupleJoiner::updateCPData.
2020-11-18 13:47:01 +00:00
32f6167067 MCOL-641 Work of Ivan Zuniga on basic read and write support for Binary16 2020-11-18 13:47:00 +00:00
61574cd00d Merge pull request #1047 from LinuxJedi/collate_warn
MCOL-3721 Fix quoting issues for COLLATE
2020-02-28 16:19:53 -05:00
e0cb60dcd2 Merge pull request #1024 from LinuxJedi/collate_warn
MCOL-3721 Allow collate and warn on ORDER BY
2020-02-28 16:19:36 -05:00
e89d1ac3cf MCOL-265 Add support for TIMESTAMP data type 2019-04-23 00:00:09 -04:00
d1ada75395 MCOL-270 Add support for MEDIUMINT data type 2018-12-30 19:13:16 -05:00
38d0740ec1 MCOL-266 Add support for BOOLEAN/BOOL data type 2018-10-07 00:43:34 -04:00
03da6df473 Merge branch 'develop-1.1' into 1.1-merge-up-20180817 2018-08-17 16:17:13 +01:00
e5891e4ddc Fix MCOL-1577 ColumnStore to allow CREATE TABLE table_name LIKE Syntax
The code walks the source table meta-data structure to generate CREATE
table statement which creates the new table.
2018-08-16 17:26:53 -07:00
a98aec07fa MCOL-1655 removed hardcoded %debug from ddl.y. 2018-08-17 01:10:00 +03:00
5ddd510c31 MCOL-1454 DDL parser supports reserved word TIME as a column name now. 2018-06-23 18:21:47 +03:00
4764094e4a Fix merge errors 2018-05-31 15:04:04 +01:00
53f281933a Merge branch 'develop-1.1' into 1.1-merge-up-20180531 2018-05-31 14:43:52 +01:00
efbf297eb7 MCOL-1384 Backport the MCOL-573 feature to 1.1. Change msg type to avoid server code assert violation. 2018-05-31 10:45:22 +03:00
04c87aca31 MCOL-1406 Removed unused non-terminal token. 2018-05-25 12:28:00 +03:00
8f3faee25d MCOL-1406 Fixed the regression. 2018-05-23 23:38:11 +03:00
59858aa896 MCOL-1415 Fixed regression with extra spaces after dot in qualified identifiers. 2018-05-17 10:01:17 +03:00
b9f2b55484 MCOL-1384 Parser accepts quotes with qualified dbobject identifiers. 2018-05-07 11:56:54 +03:00
3c1ebd8b94 MCOL-392 Add initial TIME datatype support 2018-04-30 09:42:41 +01:00
b584a7f555 MCOL-392 Add DATETIME microscond support
Add initial microsecond support for DATETIME
2018-04-30 09:42:41 +01:00
7c0086c920 MCOL-876. CS now partially supports RENAME TABLE statement. 2018-02-07 09:31:11 +03:00
60f56bdb2a MCOL-573 Allow restricted words usage with both grave accent(`) and double quote(") quotation. 2018-01-24 09:40:44 +03: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
b1d04c04fb MCOL-267 Fix LONGBLOB issues
* Set max column length to a little under 2.1GB in DDL
* Fix token edge case
* Re-write RowGroup string handling to take more than 64KB in one string
2017-03-21 17:22:31 +00:00
cf58b8de5c MCOL-267 BLOB/TEXT in DDL parser
Add basic support for BLOB/TEXT in DDL parser
2017-03-17 09:28:36 +00:00
de6c933e02 MCOL-163 Add support for DOUBLE PRECISION
Just an alias for DOUBLE
2017-01-06 10:53:11 +00:00
bb800e4771 MCOL-477 Change autoincrement on ALTER TABLE
This patch allows the following syntax to change the current
autoincrement value for the table:

ALTER TABLE table_name COMMENT='autoincrement=value';

Where "value" is the new integer to be used.
2017-01-05 15:03:54 +00:00
75ecb950f9 Merge pull request #2 from LinuxJedi/MCOL-264
Fix DDL parser for spaces in table options
2016-09-02 09:15:11 -05:00
6ef0880ad0 Fix DDL compile error
The code generated by bison wouldn't compile due to the compiler finding namespace ambiguity.
2016-08-17 14:06:13 +01:00
0d2f496389 MCOL-05 Modify the DDL parser to not use (even more) global variables. 2016-08-16 18:25:09 -05:00
acb078d07d Fix DDL parser for spaces in table options
MariaDB's parser allows for spaces instead of equals in table options, ColumnStore's parser currently does not allow this causing a query such as the following to fail:

CREATE TABLE t1 (a int, b int) ENGINE COLUMNSTORE;

This fix allows the spaces.
2016-08-16 14:19:49 +01:00
6d11ce030d MCOL-66 - Make the DDL and DML parsers re-entrant.
Serialize all DDL because the VVS can't handle modifying the same block simultaneously
Fix the CTRL+C logic in DML that caused COMMIT issues.
2016-07-20 11:47:51 -05:00
f6afc42dd0 the begginning 2016-01-06 14:08:59 -06:00