1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fixed bug in SQL_SELECT_LIMIT

We where comparing costs when we should be comparing number of rows
that will be examined
This commit is contained in:
Monty
2021-10-06 12:34:54 +03:00
committed by Sergei Petrunia
parent fc0c157aaa
commit 7d0bef6cd7
5 changed files with 8 additions and 10 deletions

View File

@@ -2621,7 +2621,7 @@ int JOIN::optimize_stage2()
goto setup_subq_exit;
}
if (!(thd->variables.option_bits & OPTION_BIG_SELECTS) &&
best_read > (double) thd->variables.max_join_size &&
join_record_count > (double) thd->variables.max_join_size &&
!(select_options & SELECT_DESCRIBE))
{ /* purecov: inspected */
my_message(ER_TOO_BIG_SELECT, ER_THD(thd, ER_TOO_BIG_SELECT), MYF(0));