Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
Description
--source plugin/spider/spider/include/init_spider.inc
|
|
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 (a INT, b INT); |
INSERT INTO t VALUES (1,2),(3,4); |
CREATE TABLE t_spider (a INT, b INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 's', table 't'"; |
|
SELECT * FROM t_spider WHERE a = 1 XOR b = 2; |
|
# Cleanup
|
DROP TABLE t_spider, t; |
|
--source plugin/spider/spider/include/deinit_spider.inc |
10.4 392ee571 |
mysqltest: At line 10: query 'SELECT * FROM t_spider WHERE a = 1 XOR b = 2' failed: 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 ')' at line 1 |
The reason is that the generated query to the underlying table contains an empty where clause:
select t0.`a` `a`,t0.`b` `b` from `test`.`t` t0 where () |
Reproducible on 10.4+.
On 10.3 the same test case causes a crash closely resembling MDEV-29011.
Attachments
Issue Links
- duplicates
-
MDEV-29011 Server crash in spider_db_open_item_cond with XOR operator
- Closed
- is blocked by
-
MDEV-29011 Server crash in spider_db_open_item_cond with XOR operator
- Closed