[MDEV-24204] inconsistent query results using a LEFT JOIN Created: 2020-11-12 Updated: 2022-04-06 Resolved: 2022-04-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | N/A |
| Affects Version/s: | 10.3.25, 10.3, 10.4, 10.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Patrice Duroux | Assignee: | Oleg Smirnov |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Ubuntu and Debian |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Hi, After trying without success to post my trouble on the mariadb-discuss mailing list, so I posted it here: This is strange because the same query works fine both on MySQL 8.0.21 (Ubuntu) and MySQL 5.7.26 (Debian). I don't know how to start with this and I am not familiar with the EXPLAIN output. Thanks, |
| Comments |
| Comment by Patrice Duroux [ 2020-11-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
One may observe this effect using our public website. Here the result is complete (including values for the broken case): Here again the result is complete: Here the 3 LEFT JOIN columns (molecule name, species, receptor description) are all empty: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2020-11-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please add SHOW CREATE TABLE and the problematic query? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Patrice Duroux [ 2020-11-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, The real query is more complex but even reduced to the following one, the problem presists: SELECT pdbcode AS code,name,description,scientific_name,typcode,complex_name Only the final clause WHERE may change regarding the previous given cases. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2020-11-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
+.cnf file(s) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Patrice Duroux [ 2020-11-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CREATE TABLE `PDB` ( CREATE TABLE `StrucQuat` ( CREATE TABLE `Chain` ( CREATE TABLE `TypeEntry` ( CREATE TABLE `organism_new` ( optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_con | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Patrice Duroux [ 2020-11-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Patrice Duroux [ 2020-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, I have done a test on a Debian Sid system using the recent push of the mariadb server version 10.5.8 and the situation is worst now because the problem occurs more often. By that I mean for the same query changing some constant values (like 'IG' to 'TR') in its WHERE clause. In a way it gained some consistency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2020-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please provide the test case to demonstrate the problem? I tried to reproduce but failed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Patrice Duroux [ 2020-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
That exactly also my point. Currently I didn't manage to get a « small » test case that I can exchange with you. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Patrice Duroux [ 2020-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here are the dump of the two databases. 3DstructureDB_ANC.sql.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2020-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks a lot! Now I can repeat it, trying to simplify it a little bit.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2020-11-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Repeatable on 10.3-10.5 with InnoDB/MyIsam. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2022-04-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This was fixed in 480a06718d137c9ee7784012cc by Igor Babaev (10.3.29, |