• Monty's avatar
    MDEV-30540 Wrong result with IN list length reaching IN_PREDICATE_CONVERSION_THRESHOLD · bd9ca2a0
    Monty authored
    The problem was the mysql_derived_prepare() did not correctly set
    'distinct' when creating a temporary derivated table.
    
    Fixed by separating checking for distinct for queries with and without
    UNION.
    
    Other things:
    - Fixed bug in generate_derived_keys_for_table() where we set the wrong
      bit for join_tab->keys
    - Cleaned up JOIN::drop_unused_derived_keys()
    - Changed TABLE::use_index() to keep unique keys and update
      share->key_parts
    
    Author: Sergei Petrunia <sergey@mariadb.com>, monty@mariadb.org
    bd9ca2a0
derived.result 60.4 KB