[MCOL-4179] Regression in subquery Created: 2020-07-14  Updated: 2020-10-12  Resolved: 2020-08-11

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: 1.5.3
Fix Version/s: 5.4.1

Type: Bug Priority: Critical
Reporter: David Hall (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2020-8

 Description   

The following query returns the wrong answer:

MariaDB [ssb]> select count(*) as c8 from lineorder where lo_orderdate in  (select d_datekey from dateinfo where (d_yearmonthnum, d_daynuminmonth) in ((199204, 12), (199505,11)));
+----+
| c8 |
+----+
|  0 |
+----+

It should be:

MariaDB [ssb]> select count(*) as c8 from lineorder where lo_orderdate in  (select d_datekey from dateinfo where (d_yearmonthnum, d_daynuminmonth) in ((199204, 12), (199505,11)));
+------+
| c8   |
+------+
| 4755 |
+------+



 Comments   
Comment by Roman [ 2020-07-15 ]

What are the plans in 1.2 and in 1.5 ?

Comment by David Hall (Inactive) [ 2020-08-03 ]

This bug manifests iff dateinfo is of engine type MYSQL

Comment by Daniel Lee (Inactive) [ 2020-08-11 ]

Build verified: 1.5.4-1 (Drone b414)

MariaDB [(none)]> use ssb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [ssb]> show tables;
---------------

Tables_in_ssb

---------------

customer
dateinfo
lineorder
part
supplier

---------------
5 rows in set (0.000 sec)

MariaDB [ssb]> select count as c8 from lineorder where lo_orderdate in (select d_datekey from dateinfo where (d_yearmonthnum, d_daynuminmonth) in ((199204, 12), (199505,11)));
------

c8

------

4755

------
1 row in set (0.444 sec)

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