[MCOL-1601] GROUP BY handler fails with subquery in HAVING Created: 2018-07-26  Updated: 2021-01-07  Resolved: 2019-03-01

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

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

Sprint: 2018-15, 2018-16, 2018-17, 2018-18, 2018-19, 2018-20, 2018-21, 2019-01, 2019-02

 Description   

Conducting the test suite connector crashes when dereferences a NULL pointer:

MariaDB [test]> set infinidb_vtable_mode=0;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> explain extended select sum(i) from cs3 group by it having it < (select sum(it) * 5 from cs3);
+------+-------------+-------+------+---------------+------+---------+------+------+----------+---------------------------------+
| id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | filtered | Extra                           |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+---------------------------------+
|    1 | PRIMARY     | NULL  | NULL | NULL          | NULL | NULL    | NULL | NULL |     NULL | Storage engine handles GROUP BY |
|    2 | SUBQUERY    | NULL  | NULL | NULL          | NULL | NULL    | NULL | NULL |     NULL | Storage engine handles GROUP BY |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+---------------------------------+
2 rows in set, 1 warning (0.00 sec)
 
MariaDB [test]> select sum(i) from cs3 group by it having it < (select sum(it) * 5 from cs3);
ERROR 2013 (HY000): Lost connection to MySQL server during query
MariaDB [test]> select * from cs3;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    9
Current database: test
 
+------+------+
| i    | it   |
+------+------+
|    5 |    5 |
|    6 |    3 |
|   25 |   32 |
+------+------+
3 rows in set (0.08 sec)



 Comments   
Comment by Roman [ 2018-09-18 ]

Please review.

Comment by Andrew Hutchings (Inactive) [ 2018-11-14 ]

This ticket is maked as "IN TESTING" but has no fixed version. Please update

Comment by Daniel Lee (Inactive) [ 2019-03-01 ]

Build verified: 1.2.0-1 alpha, 1.2.3-1 nightly

Verified the issue no longer exists

The affected version is 1.2, but the issue is no longer an issue in 1.2.0-1 alpha. The ticket was created more than 2 months before 1.2.0-1 alpha. The tickets must have been identified during the 1.2 development cycle.

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