From abcf14e595d35ebacb1d23cd4a6ced20080f8d4b Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sat, 5 Oct 2013 13:44:01 +0400 Subject: MDEV-3798: EXPLAIN UPDATE/DELETE - Handle the case when EXPLAIN UPDATE/DELETE has pruned away all partitions. --- sql/sql_explain.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/sql_explain.cc') diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 0623ef0be8e..28774ef2e99 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -766,9 +766,11 @@ int Explain_update::print_explain(Explain_query *query, uint8 explain_flags) { StringBuffer<64> extra_str; - if (impossible_where) + if (impossible_where || no_partitions) { - const char *msg= "Impossible where"; + const char *msg= impossible_where ? + "Impossible where" : + "No matching rows after partition pruning"; int res= print_explain_message_line(output, explain_flags, 1 /*select number*/, select_type, msg); -- cgit v1.2.1