mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fixed mdev-6706 Wrong result (missing rows)
with joins, SQ, ORDER BY, semijoin=on A bug in get_sort_by_table() could mislead the function setup_semijoin_dups_elimination(). As a result the optimizer could produce invalid execution plans for queries with ORDER BY and subquery predicates that could be converted to semi-joins.
This commit is contained in:
@ -21159,6 +21159,7 @@ get_sort_by_table(ORDER *a,ORDER *b, List<TABLE_LIST> &tables,
|
||||
if (!map || (map & (RAND_TABLE_BIT | OUTER_REF_TABLE_BIT)))
|
||||
DBUG_RETURN(0);
|
||||
|
||||
map&= ~const_tables;
|
||||
while ((table= ti++) && !(map & table->table->map)) ;
|
||||
if (map != table->table->map)
|
||||
DBUG_RETURN(0); // More than one table
|
||||
|
Reference in New Issue
Block a user