[MDEV-20075] LEFT JOIN and JOIN behaves differently since upgrade to 10.4 Created: 2019-07-16 Updated: 2019-07-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Prepared Statements, Query Cache |
| Affects Version/s: | 10.4.6 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andras | Assignee: | Igor Babaev |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | innodb, regression | ||
| Environment: |
centos 6, 64 bit, 10.4.6-MariaDB (x86_64), no replication |
||
| Description |
|
I had to upgrade to 10.4 yesterday from 10.1. I went through each major version and ran mysql_upgrade after each. Today I noticed strange problems on our selects: This select returns 1 result:
This select returns 0 results:
The same selct on the same database structure on version 10.2.25 returns a a whole lot of results. I noticed similar problems on LEFT JOINS, even if there is data to be joined, it is NOT joined and the result set is empty, unless there is a condition on the main table on the left side. I am not sure which version is related to (10.3 or 10.4) nor where to start to debug. I tried setting optimizer switch for 10.1 defaults but no change: |
| Comments |
| Comment by Andras [ 2019-07-16 ] | |
|
I noticed the following:
seems to me the is_published is not evaluated to true, even if it contains 1 CREATE TABLE `product_site_publication_index_790` ( | |
| Comment by Andras [ 2019-07-16 ] | |
|
I also tried removing all indexes on the joined table and the results change. WHY would having or not having indexes affect the result, it should only affect the speed. | |
| Comment by Andras [ 2019-07-16 ] | |
|
this seems to be related to https://jira.mariadb.org/browse/MDEV-19911 I will be monitoring and be back with an update If someone is looking into this, can you please check:
| |
| Comment by Igor Babaev [ 2019-07-17 ] | |
|
Hi Andras, | |
| Comment by Andras [ 2019-07-17 ] | |
|
it is hard to create a test case now as this is on a production server with hundreds of databases. |