summaryrefslogtreecommitdiff
path: root/sql/sql_explain.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_explain.cc')
-rw-r--r--sql/sql_explain.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc
index adfceae346c..af51c5fc382 100644
--- a/sql/sql_explain.cc
+++ b/sql/sql_explain.cc
@@ -585,12 +585,10 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
}
else
{
- double r_filtered;
- if (tracker.r_rows > 0)
- r_filtered= 100.0 * (double)tracker.r_rows_after_table_cond / tracker.r_rows;
- else
- r_filtered= 100.0;
- item_list.push_back(new Item_float(r_filtered, 2));
+ double r_filtered= tracker.get_filtered_after_where();
+ if (bka_type.is_using_jbuf())
+ r_filtered *= jbuf_tracker.get_filtered_after_where();
+ item_list.push_back(new Item_float(r_filtered*100.0, 2));
}
}