• unknown's avatar
    Fixed bug #29338. · 36f1e484
    unknown authored
    Optimization of queries with DETERMINISTIC functions in the
    WHERE clause was not effective: sequential scan was always
    used.
    Now a SF with the DETERMINISTIC flags is treated as constant
    when it's arguments are constants (or a SF doesn't has arguments).
    
    
    sql/item_func.h:
      Fixed bug #29338.
      The Item_func_sp::used_tables has been removed
      (virtual Item_func::used_tables function is enough).
      The virtual Item_func_sp::update_used_tables function
      has been added.
    sql/item_func.cc:
      Fixed bug #29338.
      The Item_func_sp::update_used_tables and the
      Item_func_sp::fix_field functions have been modified
      to take into account the DETERMINISTIC flag of SF definition.
    mysql-test/r/sp.result:
      Updated test case for bug #29338.
    mysql-test/t/sp.test:
      Updated test case for bug #29338.
    36f1e484
item_func.h 41.3 KB