Details
Description
Consider:
CREATE TABLE t2 (c INT KEY) ENGINE=InnoDB; |
LOCK TABLE t2 READ; |
SELECT 1 FROM t2 GROUP BY 1; |
Gives:
11.2.5 03807c8449cdccbf5b8afc0dddabb1d8ec7ba85a (Optimized) |
11.2.5-opt>SELECT 1 FROM t2 GROUP BY 1;
|
Empty set (0.001 sec)
|
Yet, with Spider, for:
INSTALL PLUGIN Spider SONAME 'ha_spider.so'; |
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE'',USER'',PASSWORD''); |
CREATE TABLE t1 (c INT KEY) ENGINE=InnoDB; |
CREATE TABLE t2 (c INT KEY) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t1"'; |
LOCK TABLE t2 READ; |
SELECT 1 FROM t2 GROUP BY 1; |
We see:
11.2.5 03807c8449cdccbf5b8afc0dddabb1d8ec7ba85a (Optimized) |
11.2.5-dbg>SELECT 1 FROM t2 GROUP BY 1;
|
ERROR 1056 (42000): Can't group on 'min(`c`)'
|
And in the error log:
11.2.5 03807c8449cdccbf5b8afc0dddabb1d8ec7ba85a (Optimized) |
2024-07-23 14:22:58 4 [ERROR] Got error 1056 when reading table './test/t2'
|