Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
23.10.0
Description
Hello,
starting with mariadb version 10.6.16-11-MariaDB-enterpriese-log / Columnstore version 23.10.0 we have the following error with some sql SELECTs on columnstore tables:
- SQL Error [1815]
- Internal error: MCS-2035
In our production server with mariadb version 10.6.14-9-MariaDB-enterprise-log / Columnstore version 23.02.4 we do not have that problem
The errors occur with SELECT statements of the following structure:
SELECT
|
CASE WHEN v.intcol = 12345 THEN 'GROUP01' ELSE 'REST' END AS t, |
JSON_OBJECT('s', COUNT(*)) AS v |
FROM testtable AS v
|
GROUP BY t
|
The following was observed:
- The problem seems to be caused by type conversions. If the THEN / ELSE values of the CASE expressions in column t are replaced with integer values the problem seems to vanish
- The same in the second result column v. If just the COUNT aggregat integer value is returned without converting it to a JSON string the problem vanishes as well.
- Any string conversion of aggregated integer or decimal values in the v column causes the problem like the following (what was used to do the same as JSON_OBJECT):
CAST(CONCAT('{','"$0":',SUM(column1),',','"$1":',SUM(column2),'}') AS CHAR(100)) |
- The problem was just observed when the two expressions in column t and v are combined in the same SELECT
The worst thing is that the problem is not really reproducible. It seems to be dependent on the number of rows of the columnstore testtable. That prevented me from providing a simple test scenario. In my tests on our database server I have about the following probabilities:
- 200.000 rows 10% failures
- 60.000.000 rows 99% failures
Innodb tables do not have that problem
The tests to make the problem more reproducible were done on a very simple columnstore table with just one column:
CREATE TABLE testtable (intcol int) |
ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
After filling it with different numbers of rows I saw that the error probality increased with the row number.
Best regards
Matthias
Attachments
Issue Links
- blocks
-
MCOL-5704 Random columnstore error MCS-2035 with special SELECT structures
- Closed