diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-09-10 11:50:38 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-09-10 11:50:38 +0200 |
commit | 4770f8d4155ae69b4e1b37ac01cd4d90f0db8a44 (patch) | |
tree | 9e8975dbd2d2b14e19d0a79ab68d243a6d4dfe08 /sql/sql_select.cc | |
parent | f563a012cebf217f32710b6d07f6b1ea58431146 (diff) | |
parent | 380c9d0daecfd1fca6872be0affb6426877cbf43 (diff) | |
download | mariadb-git-4770f8d4155ae69b4e1b37ac01cd4d90f0db8a44.tar.gz |
merge
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f550f75c8b8..02f2fc6bc9e 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -16662,7 +16662,15 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, if (tab->select && tab->select->quick) examined_rows= tab->select->quick->records; else if (tab->type == JT_NEXT || tab->type == JT_ALL) - examined_rows= tab->limit ? tab->limit : tab->table->file->records(); + { + if (tab->limit) + examined_rows= tab->limit; + else + { + tab->table->file->info(HA_STATUS_VARIABLE); + examined_rows= tab->table->file->stats.records; + } + } else examined_rows=(ha_rows)join->best_positions[i].records_read; |