| Bug #33743 | nested subqueries, unique index, wrong result | ||
|---|---|---|---|
| Submitted: | 8 Jan 2008 16:33 | Modified: | 20 Nov 2010 23:27 | 
| Reporter: | Matthias Leich | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) | 
| Version: | 6.0 | OS: | Any | 
| Assigned to: | Sergey Petrunya | CPU Architecture: | Any | 
   [8 Jan 2008 16:33]
   Matthias Leich        
  
 
   [8 Jan 2008 16:36]
   Matthias Leich        
  test case
Attachment: ml010.test (application/octet-stream, text), 2.65 KiB.
   [8 Jan 2008 16:36]
   Matthias Leich        
  expected results
Attachment: ml010.result (application/octet-stream, text), 2.13 KiB.
   [26 Apr 2008 2:10]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/46059 ChangeSet@1.2627, 2008-04-26 06:09:22+04:00, sergefp@mysql.com +5 -0 BUG#33743 "nested subqueries, unique index, wrong result" Fix a lot of problems found by the NIST test: - sj_table_is_included(): Make the check if an sj-outer table is functionally dependent on other sj-outer tables actually work: don't rely on join_tab->ref.depend_map, it can be wrong because of equality propagation, do check tab->ref.items array instead. - setup_semijoin_dups_elimination(): = Don't use InsideOut strategy if inner tables are interleaved with outer (it is unusable) = When setting up FirstMatch strategy for a case with multiple inner tables, set tab->do_firstmatch only for the last inner table. - get_bound_sj_equalities(): fix typo - best_access_path(): Don't consider InsideOut strategy when all subquery's outer references are bound. already bound.
   [28 May 2008 10:01]
   Bugs System        
  Pushed into 6.0.6-alpha
   [3 Jun 2008 19:11]
   Sergey Petrunya        
  Note for the changelog: Fixed a number of problems in new subquery optimization code. The effect of those problems was that MySQL could pick incorrect query plan when using InsideOut and/or FirstMatch subquery optimizations, which in turn would cause wrong query results.
   [4 Jun 2008 7:46]
   Paul DuBois        
  Noted in 6.0.6 changelog.
   [16 Aug 2010 6:32]
   Bugs System        
  Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
   [13 Nov 2010 16:04]
   Bugs System        
  Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)
   [20 Nov 2010 23:27]
   Paul DuBois        
  Noted in 5.6.1 changelog.
   [23 Nov 2010 2:13]
   Paul DuBois        
  Correction: No 5.6.1 changelog entry. Bug does not appear in any released 5.6.x version.

