Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6
-
ALL
Description
How to repeat
CREATE TABLE t3 ( |
spID int(10) unsigned, |
userID int(10) unsigned, |
score smallint(5) unsigned, |
key (spid), |
key (score) |
)ENGINE=SPIDER COMMENT='wrapper "mysql", table "t3"' |
PARTITION BY LIST (spID%2) |
(
|
PARTITION pt0 VALUES IN (0) COMMENT = 'database "test1_0", table "t3", server "SPT0"', |
PARTITION pt1 VALUES IN (1) COMMENT = 'database "test1_1", table "t3", server "SPT1"' |
);
|
|
INSERT INTO t3 VALUES |
(1,1,1),(2,2,2),(2,1,1),(3,3,3),(4,3,3),(5,3,3),(6,3,3),(7,3,3);
|
|
select sql_big_result spid,sum(userid) from t3 group by spid |
desc; --bug |
The result of the final SELECT is
select sql_big_result spid,sum(userid) from t3 group by spid |
-> desc; |
+------+-------------+ |
| spid | sum(userid) | |
+------+-------------+ |
| 7 | 3 |
|
| 6 | 3 |
|
| 5 | 3 |
|
| 4 | 3 |
|
| 3 | 3 |
|
| 2 | 2 | --> sum(userid) should be 3 here! |
| 1 | 1 |
|
+------+-------------+ |
7 rows in set (0.20 sec) |
Solution
We solve the problem by simply prohibiting `sql_big_result` from using on the Spider SE.
https://github.com/Tencent/TenDBCluster-TSpider/commit/01c278b6b1b27ce95a8ecc30b0bc9dd90d8abd70