1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-9504: ANALYZE TABLE shows wrong 'rows' value for ORDER BY query

Revert the patch for MDEV-9504.
It causes test failures, attempt to fix these causes more failures. The
source of all this is that the code in test_if_skip_sort_order() has
a peculiar way of treating select_limit parameter:
Correct value is computed when the query plan is changed. In other cases,
we use an approximation that ignores the presence of GROUP BY clause,
or JOINs, or both.

A patch that fixes all of the above would be too big to do in 10.1
This commit is contained in:
Sergei Petrunia
2016-02-03 00:15:49 +03:00
parent 55ea26541d
commit 07b8aefe90
3 changed files with 4 additions and 53 deletions

View File

@ -21031,14 +21031,12 @@ check_reverse_order:
}
table->file->ha_index_or_rnd_end();
if (select_limit < table->stat_records())
tab->limit= select_limit;
if (tab->join->select_options & SELECT_DESCRIBE)
{
tab->ref.key= -1;
tab->ref.key_parts= 0;
if (select_limit < table->stat_records())
tab->limit= select_limit;
table->disable_keyread();
}
}