[MDEV-7682] Incorrect use of SPATIAL KEY for query plan Created: 2015-03-09 Updated: 2015-03-20 Resolved: 2015-03-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | GIS, Optimizer |
| Affects Version/s: | 5.5 |
| Fix Version/s: | 5.5.43 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vicențiu Ciorbaru | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
After the changes made in https://github.com/MariaDB/server/commit/45b6edb158f8101d641f550179ee15df363f686f The testcase main.select_jcl6 shows a difference of key_length for the following query:
The difference is due to calling key_length for the spatial key in sql/table.cc:5996, which yields the value of 0. It seems that either the key_length value is incorrectly returned, or in case it is correct, the optimizer should not make use of that key in the plan. |
| Comments |
| Comment by Sergei Petrunia [ 2015-03-10 ] |
|
Discussed the issue with holyfoot. Takeaways:
Conclusion: let's try to provide key_length() for geometry columns. Implementation should mention that it is done only for Hash Join. |
| Comment by Vicențiu Ciorbaru [ 2015-03-20 ] |
|
Fixed with: |