Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5
-
None
Description
Consider this case
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_init.inc
|
--enable_result_log
|
--enable_query_log
|
|
set spider_same_server_link= 1; |
evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql |
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); |
|
CREATE TABLE t (c INT); |
CREATE TABLE t1 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"' PARTITION BY LIST (c) (PARTITION p1 VALUES IN (42), PARTITION p2 VALUES IN (13)); |
INSERT INTO t1 VALUES (13); |
select * from t1 partition (p1); |
select * from t1 partition (p2); |
select * from t1; |
drop table t, t1; |
|
drop server srv; |
|
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_deinit.inc
|
--enable_result_log
|
--enable_query_log |
Both the first and the second selects return a row 13, and the third select returns two rows of 13.
This looks wrong but it is expected, as each partition in a spider table is supposed to point to a different data node table. Still it looks wrong, and spider should report an error when multiple partitions point to the same remote table.