[MDEV-19258] RIGHT JOIN hangs in MariaDB Created: 2019-04-16 Updated: 2019-05-24 Resolved: 2019-05-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.3.13, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.1.41 |
| Type: | Bug | Priority: | Major |
| Reporter: | Rok Jaklic | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We are migrating (dump, restore) data from Mysql version 5.5.61-38.13-log to MariaDB version 10.3.13, however we found a problem when RIGHT JOIN statement hangs, but inner join does not. This one works in Mysql but not in MariaDB:
We found out that INNER JOIN, LEFT JOIN works, but RIGHT JOIN hangs. Any ideas why? Dump of the database: http://www.rasca.net/tmp/dump.tar.gz |
| Comments |
| Comment by Rok Jaklic [ 2019-04-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
However we found out, if we create indexes like:
... then query does not "hang". | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2019-05-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks a lot for the report!
Mysql 8.0.15 - returned results in 0.12sec:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2019-05-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This bug was introduced by the patch for bug "
After using settings:
and collecting some minimal statistics:
I got the same execution plan as mysql-8.0 chooses:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2019-05-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Review was actually not done. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2019-05-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This patch was pushed into 10.1 |