summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/explain_json.result4
-rw-r--r--sql/sql_explain.cc3
-rw-r--r--sql/sql_join_cache.cc3
3 files changed, 7 insertions, 3 deletions
diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result
index d21a0d57a8e..a42f5af114c 100644
--- a/mysql-test/r/explain_json.result
+++ b/mysql-test/r/explain_json.result
@@ -1492,7 +1492,7 @@ EXPLAIN
"buffer_type": "flat",
"buffer_size": "256Kb",
"join_type": "BKA",
- "mrr_type": "; Rowid-ordered scan"
+ "mrr_type": "Rowid-ordered scan"
}
}
}
@@ -1535,7 +1535,7 @@ ANALYZE
"buffer_type": "flat",
"buffer_size": "256Kb",
"join_type": "BKA",
- "mrr_type": "; Rowid-ordered scan",
+ "mrr_type": "Rowid-ordered scan",
"r_filtered": 100
}
}
diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc
index ba035ab2343..336315831b2 100644
--- a/sql/sql_explain.cc
+++ b/sql/sql_explain.cc
@@ -1809,7 +1809,10 @@ void Explain_table_access::append_tag_name(String *str, enum explain_extra_tag t
str->append(STRING_WITH_LEN(" join"));
str->append(STRING_WITH_LEN(")"));
if (bka_type.mrr_type.length())
+ {
+ str->append(STRING_WITH_LEN("; "));
str->append(bka_type.mrr_type);
+ }
break;
}
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index 731cc7267d5..f84440afa90 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -2620,7 +2620,8 @@ static void add_mrr_explain_info(String *str, uint mrr_mode, handler *file)
sizeof(mrr_str_buf));
if (len > 0)
{
- str->append(STRING_WITH_LEN("; "));
+ if (str->length())
+ str->append(STRING_WITH_LEN("; "));
str->append(mrr_str_buf, len);
}
}