diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-09-13 15:56:56 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-09-13 15:56:56 +0200 |
commit | 640454b3731dbc7463f5795f6567df74d0cca45f (patch) | |
tree | e2cb245f59839f8b100868dab5c0db987cbfa7a2 /sql/sql_select.cc | |
parent | c09489ebb2eddc55a43442c5a6f64b86dfa604ea (diff) | |
parent | 99e507e8a4d44243740e8629c5517927f948a127 (diff) | |
download | mariadb-git-640454b3731dbc7463f5795f6567df74d0cca45f.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 07e109c34ea..bded06b2924 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -16705,7 +16705,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; |