[MDEV-14907] FEDERATEDX doesn't respect DISTINCT Created: 2018-01-09 Updated: 2023-01-30 Resolved: 2022-01-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Federated |
| Affects Version/s: | 10.0, 10.1, 10.2.6, 10.2.12, 10.2 |
| Fix Version/s: | 10.4.23, 10.5.14, 10.6.6, 10.7.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Brian Grossman | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The FEDERATEDX engine doesn't seem to respect DISTINCT. I see the following behavior in 10.2.6 and 10.2.12. (Names and values redacted.) Here's a table FOO in bar.
There's another table bar_FOO in another mariadb instance, defined the same except for using FEDERATEDX:
The FEDERATEDX plugin is installed. From show plugins:
Here's the query run against the InnoDB table:
Here's the query run against the FEDERATEDX table. The result is the same with or without DISTINCT.
|
| Comments |
| Comment by Elena Stepanova [ 2018-01-09 ] | |||||||||||||||||||||||||||||
|
Thanks for the report and test case, reproducible as described.
The queries internally produced by Federated are awful, unfortunately JIRA cannot handle them pasted as they are, so I replaced strings of \0 and FF below.
| |||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-07-14 ] | |||||||||||||||||||||||||||||
|
This is happening because
| |||||||||||||||||||||||||||||
| Comment by Michael Widenius [ 2022-01-07 ] | |||||||||||||||||||||||||||||
|
Federated::position() and Federatex::position() is storing in 'ref' a This bug caused federated.federatedx to return wrong results when the Fixed by introducing table flag HA_NON_COMPARABLE_ROWID and using this Future TODO (another task) to fix multi-table updates and deletes with Federated:
|