Skip to content

Commit 96d1fc6

Browse files
author
Jan Wedvik
committed
Bug#32855925 SELECT #2 WILL BE DISPLAYED TWICE WHEN WE EXPLAIN THE SQL
Post-push fix: Cherry-picking the fix onto mysql-trunk introduced an unintended duplication of a code block, causing a shadowing-warning when building with g++. This commit corrects that. Change-Id: I1b279818ca0d30e32fc8dabb76c647120b531e8f
1 parent de131d1 commit 96d1fc6

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

sql/join_optimizer/explain_access_path.cc

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -237,23 +237,8 @@ static bool AddSubqueryPaths(const Item *item_arg, const char *source_text,
237237

238238
const Item_subselect *subquery = down_cast<const Item_subselect *>(item);
239239
Query_expression *qe = subquery->query_expr();
240-
Query_block *query_block = qe->first_query_block();
241-
char description[256];
242-
if (query_block->is_dependent()) {
243-
snprintf(description, sizeof(description),
244-
"Select #%d (subquery in %s; dependent)",
245-
query_block->select_number, source_text);
246-
} else if (!query_block->is_cacheable()) {
247-
snprintf(description, sizeof(description),
248-
"Select #%d (subquery in %s; uncacheable)",
249-
query_block->select_number, source_text);
250-
} else {
251-
snprintf(description, sizeof(description),
252-
"Select #%d (subquery in %s; run only once)",
253-
query_block->select_number, source_text);
254-
}
255-
256240
qe->finalize(current_thd);
241+
Query_block *query_block = qe->first_query_block();
257242
AccessPath *path;
258243

259244
if (qe->root_access_path() != nullptr) {

0 commit comments

Comments
 (0)