[MDEV-27625] Spider returns two rows when it should only return one Created: 2022-01-26 Updated: 2022-01-28 Resolved: 2022-01-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Affects Version/s: | 10.7, 10.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Roel Van de Paar | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
For this testcase (change port as needed):
There are two rows when queried (whilst only a single one was inserted!):
In comparison, this similar testcase:
Yields one row:
As discussed with nayuta-yanagisawa, this would seem to be is intended behavior. Spider implicitly assumes that each partition is associated with different tables. However, Spider doesn't check the constraint whilst it should. Likely present in all versions. Proposal to fix in 10.7. |
| Comments |
| Comment by Sergei Golubchik [ 2022-01-26 ] | ||||||||||||||||||
|
Doesn't look like a bug to me. What constraint should Spider check but doesn't? | ||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-01-27 ] | ||||||||||||||||||
|
IMHO, Spider should ensure that data is not double-read from the same table irrespective of the table definition. The first resultset is incorrect imho.
| ||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-01-27 ] | ||||||||||||||||||
|
Spider can never know that. One can chain spider tables, or create a view or a MyISAM MERGE table or whatever. There are tons of ways to have two partitions to refer to the same table at the end. Two avoid seeing the same row twice one should not create two partitions that refer to the same table. | ||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-01-28 ] | ||||||||||||||||||
|
Understood, thank you! |