Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.11, 11.4, 11.8, 12.3, 13.0
-
None
Description
INSTALL SONAME 'ha_spider'; |
|
|
SET spider_same_server_link = ON; |
--eval create server s foreign data wrapper mysql options (host "127.0.0.1", database "test", user "root", port $MASTER_MYPORT)
|
|
|
CREATE TABLE t (id INT DEFAULT 0) ENGINE=MyISAM; |
CREATE TABLE t_spider ENGINE=SPIDER COMMENT = 'srv "s", table "t"'; |
SELECT DEFAULT(id) FROM t_spider; |
|
|
DROP TABLE t_spider, t; |
|
|
# Spider cleanup should be here
|
|
12.3 3adf432a9fc68f428e9c8b38129c3b51f78b187f |
mysqltest: At line 8: query 'SELECT DEFAULT(id) FROM t_spider' failed: ER_BAD_FIELD_ERROR (1054): Unknown column 'test.t_spider.id' in 'SELECT' |
The query Spider generates for the remote server is
select default(`test`.`t_spider`.`id`) `DEFAULT(id)` from `test`.`t` t0 |
That is, it gets the fully-qualified name of the Spider table column, but the query is run on the remote table, so naturally it causes the error.