[MCOL-911] exemgr crashes with a nested aggregate multiplication query Created: 2017-09-11  Updated: 2017-10-25  Resolved: 2017-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: 1.0.11
Fix Version/s: 1.0.12, 1.1.1

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

Sprint: 2017-18, 2017-19, 2017-20, 2017-21

 Description   

The following table and query will cause exemgr to crash and not return results (happens whether the table has no rows or any values)

CREATE TABLE test.test (
id INT,
integerfield int
) ENGINE=Columnstore;
 
SELECT id,
kpi1
FROM  (SELECT id,
            ((SUM(integerfield))/
             (SUM(integerfield))
            )*100 kpi1
       FROM   test.test
       GROUP BY id) kpi
WHERE  kpi1 IS NOT NULL;

Removing either the *100 in the subquery or where kpi1 is not null causes the query to work.



 Comments   
Comment by David Hall (Inactive) [ 2017-09-15 ]

Not sure if we're supposed to merge into develop yet

Comment by Andrew Hutchings (Inactive) [ 2017-09-20 ]

Merged into 1.1 and 1.2 develop branches

Comment by Daniel Lee (Inactive) [ 2017-10-24 ]

Build verified: Github source for 1.1.1-1

/root/columnstore/mariadb-columnstore-server
commit f6cd94ea167789970db7b5b501569a6549495d10
Merge: 3d846d3 91b2553
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Oct 24 09:15:58 2017 -0500

Merge pull request #72 from mariadb-corporation/MCOL-982

MCOL-982 Merge MariaDB 10.2.9

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 751f9fbd2f26026983915a0677d6d600be273073
Author: david hill <david.hill@mariadb.com>
Date: Tue Oct 24 14:05:48 2017 -0500

removed duplicaue entries

Verified test with and without data.

MariaDB [mytest]> CREATE TABLE test.test (
-> id INT,
-> integerfield int
-> ) ENGINE=Columnstore;
Query OK, 0 rows affected (0.31 sec)

MariaDB [mytest]> SELECT id,
-> kpi1
-> FROM (SELECT id,
-> ((SUM(integerfield))/
-> (SUM(integerfield))
-> )*100 kpi1
-> FROM test.test
-> GROUP BY id) kpi
-> WHERE kpi1 IS NOT NULL;
Empty set (0.12 sec)

MariaDB [mytest]> insert into test.test values (1,1);
Query OK, 1 row affected (0.15 sec)

MariaDB [mytest]> insert into test.test values (2,2);
Query OK, 1 row affected (0.13 sec)

MariaDB [mytest]> insert into test.test values (null,null);
Query OK, 1 row affected (0.15 sec)

MariaDB [mytest]> SELECT id, kpi1 FROM (SELECT id, ((SUM(integerfield))/ (SUM(integerfield)) )*100 kpi1 FROM test.test GROUP BY id) kpi WHERE kpi1 IS NOT NULL;
--------------+

id kpi1

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

1 100.0000
2 100.0000

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

MariaDB [mytest]> SELECT id, kpi1 FROM (SELECT id, ((SUM(integerfield))/ (SUM(integerfield)) )*100 kpi1 FROM test.test GROUP BY id) kpi
-> ;
--------------+

id kpi1

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

NULL NULL
1 100.0000
2 100.0000

--------------+
3 rows in set (0.11 sec)

Comment by Daniel Lee (Inactive) [ 2017-10-25 ]

Build verified: Github source for 1.0.12-1

/root/columnstore/mariadb-columnstore-server
commit a42eb6d1e74e44c9e8fd9bb8290e6ce7dbf909f5
Merge: 2965fc8 6a14ced
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Oct 3 10:12:33 2017 -0500

Merge pull request #69 from mariadb-corporation/MCOL-940

MCOL-940

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 22f5c04f854d8571fa81ac33a26edc256d3acd48
Merge: 2f19dc2 c132f1b
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Oct 24 17:39:45 2017 -0500

Merge pull request #300 from mariadb-corporation/MCOL-973-1.0

MCOL-973 remove reference to TEXT in the 1.0 code

Verified with same tests.

Comment by Daniel Lee (Inactive) [ 2017-10-25 ]

both 1.0.12 and 1.1.1 have been verified

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