Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When executing a simple `SELECT COUNT FROM acct_detail` the queries or any other with agre sent to the backend nodes contains the partition key as one of the columns leading to the error
MariaDB [testdb]> select count(*) from acct_detail; |
ERROR 1815 (HY000): Internal error: IDB-2021: '`testdb`.`acct_detail_hist`.`id`' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause. |
Analyzing the general query log, the output shows the following two queries being executed on the ColumnStore and InnoDB tables
44 Query select count(0),`id` from `testdb`.`acct_detail_curr` |
44 Query select count(0),`id` from `testdb`.`acct_detail_hist` |
Spider node definition as follows:
MariaDB [testdb]> show create table acct_detail\G |
*************************** 1. row ***************************
|
Table: acct_detail |
Create Table: CREATE TABLE `acct_detail` ( |
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
`c1` varchar(100) DEFAULT NULL, |
`dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
UNIQUE KEY `id` (`id`) |
) ENGINE=SPIDER AUTO_INCREMENT=274116 DEFAULT CHARSET=latin1 COMMENT='wrapper "mysql", srv "node"' |
PARTITION BY KEY (`id`) |
(PARTITION `pt_current` COMMENT = 'table "acct_detail_curr"' ENGINE = SPIDER, |
PARTITION `pt_historic` COMMENT = 'table "acct_detail_hist"' ENGINE = SPIDER) |
Thanks.