• unknown's avatar
    Fixed bug #19579: at range analysis optimizer did not take into · 6101fd25
    unknown authored
    account predicates that become sargable after reading const tables.
    In some cases this resulted in choosing non-optimal execution plans.
    Now info of such potentially saragable predicates is saved in
    an array and after reading const tables we check whether this
    predicates has become saragable.
    
    
    
    mysql-test/r/select.result:
      Added a test case for bug #19579.
    mysql-test/t/select.test:
      Added a test case for bug #19579.
    sql/item_cmpfunc.cc:
      Fixed bug #19579: at range analysis optimizer did not take into 
      account predicates that become sargable after reading const tables.
      Added a counter of between predicates.
    sql/sql_base.cc:
      Fixed bug #19579: at range analysis optimizer did not take into 
      account predicates that become sargable after reading const tables.
      Added a counter of between predicates.
    sql/sql_lex.cc:
      Fixed bug #19579: at range analysis optimizer did not take into 
      account predicates that become sargable after reading const tables.
      Added a counter of between predicates.
    sql/sql_lex.h:
      Fixed bug #19579: at range analysis optimizer did not take into 
      account predicates that become sargable after reading const tables.
      Added a counter of between predicates.
    sql/sql_select.cc:
      Fixed bug #19579: at range analysis optimizer did not take into 
      account predicates that become sargable after reading const tables.
      Now info of such potentially saragable predicates is saved in
      an array and after reading const tables we check whether this
      predicates has become saragable.
    6101fd25
select.result 98.1 KB