• unknown's avatar
    A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) · 9b6e83f4
    unknown authored
    gives wrong results". Implement previously missing 
    Item_row::cleanup. The bug is not repeatable in 5.0, probably 
    due to a coincidence: the problem is present in 5.0 as well.
    
    
    mysql-test/r/ps.result:
      Update the result file (Bug#16248)
    mysql-test/t/ps.test:
      Add a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) gives 
      wrong results"
    sql/item_row.cc:
      Implement Item_row::cleanup(): we should reset used_tables_cache
      before reexecution of a prepared statement. In case ROW
      arguments contain a placeholder, used_tables_cache has PARAM_TABLE
      bit set in statement prepare. As a result, when executing a statement,
      the condition push down algorithm (make_cond_for_table) would think
      that the WHERE clause belongs to the non-existent PARAM_TABLE and
      wouldn't attach the WHERE clause to any of the real tables, 
      effectively optimizing the clause away.
    sql/item_row.h:
      Remove a never used member 'array_holder'. Add declaration for
      Item_row::cleanup.
    9b6e83f4
ps.test 21.7 KB