[MCOL-3356] BIT_OR function in projection and subquery in FROM produce Internal error: IDB-2035 Created: 2019-06-04  Updated: 2020-11-12  Resolved: 2020-03-30

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: 1.2.3, 1.2.4
Fix Version/s: 1.2.6, 1.4.4, 1.5.1

Type: Bug Priority: Major
Reporter: Roman Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 1
Labels: None

Sprint: 2020-3, 2020-4, 2020-5

 Description   

The test case provided by community that returns in 1.2.4:
ERROR 1815 (HY000): Internal error: IDB-2035: An internal error occurred. Check the error log file & contact support

CREATE TABLE `bit_or_error` (
`gby` INT(11) NOT NULL,
`v` INT(11) NOT NULL
) ENGINE=COLUMNSTORE DEFAULT CHARSET=UTF8;

INSERT INTO bit_or_error
(`gby`,
`v`)
VALUES
(1,2),
(2,3);

SELECT
gby, COUNT(DISTINCT v), ROUND(SUM(v), 3), BIT_OR(v)
FROM
(SELECT
gby, v
FROM
bit_or_error) P
GROUP BY gby;



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2019-06-10 ]

Error is: rowgroup.h@1016: assertion '0' failed. Would require a debug build to get more info.

Comment by David Hall (Inactive) [ 2020-01-06 ]

May be fixed by other MCOL. Cause is somewhere, probably round(sum), the long double of sum() is being reported as int, but the data is still long double.

Comment by David Hall (Inactive) [ 2020-01-30 ]

Not fixed

Comment by Patrick LeBlanc (Inactive) [ 2020-03-18 ]

Looks like this was caused by a misalignment of column types and column widths when creating the rowgroup. In the case of bit_

{and,or,xor}

, I found an extra assignment to column types, with no corresponding assignment to the column widths. The test above passes when I comment out the extra assignment.

Comment by Daniel Lee (Inactive) [ 2020-03-26 ]

Builds verified: 1.2.6-1, 1.4.4-1 source

1.2.6-1

/root/ColumnStore/buildColumnstoreFromGithubSource/mariadb-columnstore-server
commit d3294cf9c18663673c62532dddaa11369ba184d0
Merge: 2ef719d c5be945
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Thu Oct 31 15:06:48 2019 +0000

Merge pull request #166 from drrtuy/MCOL-894_5

MCOL-894 Add a variable to control a number of parallel sorting threads.

/root/ColumnStore/buildColumnstoreFromGithubSource/mariadb-columnstore-server/mariadb-columnstore-engine
commit ffbb44651975446b72a50a979d086b19f53652de
Merge: 70876b3 682e22a
Author: David.Hall <david.hall@mariadb.com>
Date: Thu Mar 26 09:43:11 2020 -0500

Merge pull request #1116 from pleblanc1976/mcol-3356-1.2

Mcol 3356 1.2

1.4.4-1

/root/ColumnStore/buildColumnstoreFromGithubSource/server
commit ec0071afa50b78930860a14802b8cfc9791f7d13
Author: Sergei Petrunia <psergey@askmonty.org>
Date: Thu Mar 26 01:26:39 2020 +0300

MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code

/root/ColumnStore/buildColumnstoreFromGithubSource/server/engine
commit 6e953d01d268161ac50dabb6aa9a122ed1d43e0f
Merge: 4468c93 ba06727
Author: Gagan Goel <gagan.nith@gmail.com>
Date: Thu Mar 26 11:41:35 2020 -0400

Merge pull request #1117 from drrtuy/MCOL-3828_1_4

MCOL-3828 This commit replaces the method that calls JOIN::optimise()

Reproduced the issue in 1.2.4-1 and verified the fix in 1.2.6 and 1.4.4. still need to test 1.5.0.

MariaDB [mytest]> CREATE TABLE `bit_or_error` (
-> `gby` INT(11) NOT NULL,
-> `v` INT(11) NOT NULL
-> ) ENGINE=COLUMNSTORE DEFAULT CHARSET=UTF8;
Query OK, 0 rows affected (0.155 sec)

MariaDB [mytest]> INSERT INTO bit_or_error
-> (`gby`,
-> `v`)
-> VALUES
-> (1,2),
-> (2,3);
Query OK, 2 rows affected (0.584 sec)
Records: 2 Duplicates: 0 Warnings: 0

MariaDB [mytest]> SELECT
-> gby, COUNT(DISTINCT v), ROUND(SUM(v), 3), BIT_OR(v)
-> FROM
-> (SELECT
-> gby, v
-> FROM
-> bit_or_error) P
-> GROUP BY gby;
-----------------------------------------------+

gby COUNT(DISTINCT v) ROUND(SUM(v), 3) BIT_OR(v)

-----------------------------------------------+

2 1 3.000 3
1 1 2.000 2

-----------------------------------------------+
2 rows in set (0.237 sec)

Comment by Daniel Lee (Inactive) [ 2020-03-30 ]

Build verified: 1.5.0-1 BB

engine commit:
a35b208

Generated at Thu Feb 08 02:42:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.