Commit 3bf20bc7 authored by Alexander Barkov's avatar Alexander Barkov

A clean-up for "MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE".

Local variable table_name_buffer went out of scope while
its content was still being used by a String instance.
Moved the variable to the function scope.
parent 4bed7aa8
...@@ -219,6 +219,8 @@ int Explain_union::print_explain(Explain_query *query, ...@@ -219,6 +219,8 @@ int Explain_union::print_explain(Explain_query *query,
select_result_sink *output, select_result_sink *output,
uint8 explain_flags) uint8 explain_flags)
{ {
char table_name_buffer[SAFE_NAME_LEN];
/* print all UNION children, in order */ /* print all UNION children, in order */
for (int i= 0; i < (int) union_members.elements(); i++) for (int i= 0; i < (int) union_members.elements(); i++)
{ {
...@@ -238,7 +240,6 @@ int Explain_union::print_explain(Explain_query *query, ...@@ -238,7 +240,6 @@ int Explain_union::print_explain(Explain_query *query,
/* `table` column: something like "<union1,2>" */ /* `table` column: something like "<union1,2>" */
{ {
char table_name_buffer[SAFE_NAME_LEN];
uint childno= 0; uint childno= 0;
uint len= 6, lastop= 0; uint len= 6, lastop= 0;
memcpy(table_name_buffer, STRING_WITH_LEN("<union")); memcpy(table_name_buffer, STRING_WITH_LEN("<union"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment