Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.8
-
None
Description
The CONNECT engine is generating nonsense SQL for a PIVOT table I created:
drop table if exists t1; |
CREATE TABLE `t1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, `cnt` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB; |
INSERT INTO `t1` VALUES (1,'apple',1),(2,'banana',1),(3,'apple',2),(4,'cherry',4),(5,'durazno',2); |
drop table if exists fruit_pivot; |
CREATE TABLE fruit_pivot ENGINE=CONNECT TABLE_TYPE=pivot TABNAME=t1; |
select * from fruit_pivot; |
ERROR 1296 (HY000): Got error 174 '(1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'id, nameSELECT , SUM(cnt) cnt FROM t1 GROUP BY' at line ' from CONNECT
|
From the general query log:
10 Query SELECT id, nameSELECT , SUM(cnt) cnt FROM t1 GROUP BY id, nameSELECT id, nameSELECT , SUM(cnt) cnt FROM t1 GROUP BY
|