• unknown's avatar
    Added a test case for bug #18940:in 5.0 the optimizer chose · 5c6d923f
    unknown authored
    a worse execution plan than in 4.1 for some queries.
    It happened due the fact that at some conditions the 
    optimizer always preferred range or full index scan access
    methods to lookup access methods even when the latter were much
    cheaper. 
    The problem was not observed in 4.1 for the reported query
    because the WHERE condition was not of a form that could
    cause the problem.
    Equality propagation introduced on 5.0 added an extra 
    predicate and changed the WHERE condition. The new condition
    provoked the optimizer to make a bad choice.
    
    The problem was fixed by the patch for bug 17379.
    
    
    mysql-test/r/select.result:
      Added a test case for bug #18940.
      The problem was fixed by the patch for bug 17379.
    mysql-test/t/select.test:
      Added a test case for bug #18940.
      The problem was fixed by the patch for bug 17379.
    5c6d923f
select.test 148 KB