[MDEV-14417] Incoherent result subqueries & materialization switch Created: 2017-11-16  Updated: 2017-11-16  Resolved: 2017-11-16

Status: Closed
Project: MariaDB Server
Component/s: Data Manipulation - Subquery
Affects Version/s: 10.2.10
Fix Version/s: 10.2.11

Type: Bug Priority: Major
Reporter: Roberto Ghidini Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux any


Attachments: File jira.dmp.gz    

 Description   

Create a db from the attached dump file, the following select gives a wrong result

MariaDB [jira]> select fkey from t1 where fkey in (select distinct f4 from t2 where f1=147 and f5='S') order by fkey;
------

fkey

------

267
267
267
267
267
267
267
267
267

------

If I switch off materialization adding the following line to the my.cnf file

optimizer_switch='materialization=off'

the result is correct

------

fkey

------

90
93
261
262
263
264
265
266
267

------

Thanks



 Comments   
Comment by Alice Sherepa [ 2017-11-16 ]

Thanks for the report!
The problem was fixed by the commit dcbf2823c7d64380f06372 in scope of bug MDEV-13994.

Generated at Thu Feb 08 08:13:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.