[MDEV-30913] Index usage for DATE(datetime_column) = const does not work for engine Connect Created: 2023-03-23 Updated: 2023-03-27 Resolved: 2023-03-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 11.1 |
| Fix Version/s: | 11.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lena Startseva | Assignee: | Lena Startseva |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The Connect engine retained the old behavior.
Query plan has (see the part of the test for connection 'master'):
Example test:
Actual result:
|
| Comments |
| Comment by Oleg Smirnov [ 2023-03-24 ] |
|
As I can see from https://mariadb.com/kb/en/using-connect-indexing/#remote-indexing and https://mariadb.com/kb/en/connect-mysql-table-type-accessing-mysqlmariadb-tables/#indexing-of-mysql-tables it doesn't make sense (or even not allowed) to create indexes on tables referencing remote ones. And the SQL rewrite happens only when the column is a part of an index. That's why there's no rewrite at the master side. |