1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-27 16:01:57 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore
Theresa Hradilak 48562e41f9 feat(datatypes): MCOL-4632 and MCOL-4648, fix cast leads to NULL.
Remove redundant cast.

As C-style casts with a type name in parantheses are interpreted as static_casts this literally just changes the interpretation around (and forces an implicit cast to match the return value of the function).

Switch UBIGINTNULL and UBIGINTEMPTYROW constants for consistency.

Make consistent with relation between BIGINTNULL and BIGINTEMPTYROW & make adapted cast behaviour due to NULL markers more intuitive. (After this change we can simply block the highest possible uint64_t value and if a cast results in it, print the next lower value (2^64 - 2). Previously, (2^64 - 1) was able to be printed, but (2^64 - 2) as being blocked by the UBIGINTNULL constant was not, making finding the appropiate replacement value to give out more confusing.

Introduce MAX_MCS_UBIGINT and MIN_MCS_BIGINT and adapt casts.

Adapt casting to BIGINT to remove NULL marker error.

Add bugfix regression test for MCOL 4632

Add regression test for mcol_4648

Revert "Switch UBIGINTNULL and UBIGINTEMPTYROW constants for consistency."

This reverts commit 83eac11b18937ecb0b4c754dd48e4cb47310f620.
Due to backwards compatability issues.

Refactor casting to MCS[U]Int to datatype functions.

Update regression tests to include other affected datatypes.

Apply formatting.

Refactor according to PR review

Remove redundant new constant, switch to using already existing constant.

Adapt nullstring casting to EMPTYROW markers for backwards compatability.

Adapt tests for backward compatability behaviour allowing text datatypes to be casted to EMPTYROW constant.

Adapt mcol641-functions test according to bug fix.

Update tests according to new expected behaviour.

Adapt tests to new understanding of issue.

Update comments/documentation for MCOL_4632 test.

Adapt to new cast limit logic.

Make bracketing consistent.

Adapt previous regression test to new expected behaviour.
2023-08-11 13:00:30 +00:00
..
2022-08-09 21:20:56 +03:00

Objective
---------
The 'columnstore' test suite includes tests suites aimed at testing MariaDB Columnstore
Database Engine (MCS).

https://mariadb.com/kb/en/mariadb-columnstore/

Test Repo
---------
https://github.com/mariadb-corporation/columnstore-tests/tree/master/mysql-test/suite/columnstore

Test structure
--------------
The current directory structure is shown below:

columnstore/
├── basic
│   ├── r
│   └── t
├── csinternal
│   ├── autopilot
│   │   ├── r
│   │   └── t
│   ├── devregression
│   │   ├── r
│   │   └── t
│   └── include
│       ├── dbt3
│       └── ssb
├── extended
├── include
└── std_data

't' dir contains the tests.
'r' dir contains the expected result files.
'include' dir contains common libraries used by the tests.
'std_data' dir containt test data files. 

Test suites:
1. basic
Mostly sanity, high value, shorter execution time tests

2. extended
More complex and involved tests - longer execution time, variations

3. csinternal
Limited to CS internal team - Uses seeded test data. The tests in this are divided into the following two sub-suites:
   autopilot - Autopilot cases migrated to MTR
   devregression - Part of Dev test suite migrated to MTR

Prerequisites
-------------
1.
MariaDB Server and Columnstore are already installed on the test box, let's call it INSTALL_DIR. Usually it is /usr/share/mysql.
mysql-test is already installed, let's call it MYSQLTEST_DIR. Usually it is /usr/share/mysql-test.
Columnstore-tests local repository, let's call it MCSTEST_DIR. Usually it is columnstore-tests/mysql-test/suite/columnstore

cd MYSQLTEST_DIR
ln -s MCSTEST_DIR MYSQLTEST_DIR/suite/columnstore

2. Only for csinternal tests
For csinternal test run requires the test data 'dbt3' and 'ssb' stored at https://drive.google.com/drive/folders/1dAV4ltxLrvC_7TrZ4zLu42gxx17wzH15?usp=sharing to be available at the following location on the test box:

/data/qa/source/
               dbt3
               ssb

Setup test environment by running the following:
./mtr --suite=columnstore/csinternal regression_env_setup  --extern socket=/var/lib/mysql/mysql.sock

Test Run
--------
Run test suite:
mtr --force --suite=columnstore/basic --extern socket=/var/lib/mysql/mysql.sock
mtr --force --suite=columnstore/extended --extern socket=/var/lib/mysql/mysql.sock
mtr --force --suite=columnstore/csinternal --extern socket=/var/lib/mysql/mysql.sock
mtr --force --suite=columnstore/csinternal/autopilot --extern socket=/var/lib/mysql/mysql.sock
mtr --force --suite=columnstore/csinternal/devregression --extern socket=/var/lib/mysql/mysql.sock

Run individual test:
example
mtr --suite=columnstore/basic mcs12_alter_table.test --extern socket=/var/lib/mysql/mysql.sock

Run by skipping list of tests:
example
mtr --force --skip-test-list=failed.def --suite=columnstore/basic --extern socket=/var/lib/mysql/mysql.sock
failed.def file lists test names in separated lines.