Skip to content

Commit 1250018

Browse files
committed
Fix typos in JSON MRR output
1 parent 7016621 commit 1250018

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

mysql-test/r/explain_json.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ EXPLAIN
14921492
"buffer_type": "flat",
14931493
"buffer_size": "256Kb",
14941494
"join_type": "BKA",
1495-
"mrr_type": "; Rowid-ordered scan"
1495+
"mrr_type": "Rowid-ordered scan"
14961496
}
14971497
}
14981498
}
@@ -1535,7 +1535,7 @@ ANALYZE
15351535
"buffer_type": "flat",
15361536
"buffer_size": "256Kb",
15371537
"join_type": "BKA",
1538-
"mrr_type": "; Rowid-ordered scan",
1538+
"mrr_type": "Rowid-ordered scan",
15391539
"r_filtered": 100
15401540
}
15411541
}

sql/sql_explain.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,10 @@ void Explain_table_access::append_tag_name(String *str, enum explain_extra_tag t
18091809
str->append(STRING_WITH_LEN(" join"));
18101810
str->append(STRING_WITH_LEN(")"));
18111811
if (bka_type.mrr_type.length())
1812+
{
1813+
str->append(STRING_WITH_LEN("; "));
18121814
str->append(bka_type.mrr_type);
1815+
}
18131816

18141817
break;
18151818
}

sql/sql_join_cache.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,8 @@ static void add_mrr_explain_info(String *str, uint mrr_mode, handler *file)
26202620
sizeof(mrr_str_buf));
26212621
if (len > 0)
26222622
{
2623-
str->append(STRING_WITH_LEN("; "));
2623+
if (str->length())
2624+
str->append(STRING_WITH_LEN("; "));
26242625
str->append(mrr_str_buf, len);
26252626
}
26262627
}

0 commit comments

Comments
 (0)