mirror of
https://github.com/MariaDB/server.git
synced 2026-04-25 17:55:31 +02:00
BUG#901032: Wrong result for MIN/MAX on an indexed column with materialization and semijoin
- opt_sum_query() should not assume that join tables from sj-materialization have known numbers of rows.
This commit is contained in:
parent
7414a0b6d6
commit
49ecc88069
4 changed files with 41 additions and 1 deletions
|
|
@ -299,7 +299,8 @@ int opt_sum_query(THD *thd,
|
|||
is_exact_count= FALSE;
|
||||
count= 1; // ensure count != 0
|
||||
}
|
||||
else if (tl->is_materialized_derived())
|
||||
else if (tl->is_materialized_derived() ||
|
||||
tl->jtbm_subselect)
|
||||
{
|
||||
/*
|
||||
Can't remove a derived table as it's number of rows is just an
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue