Commit c1fb91ef authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-7921: main.sp_sync fails in buildbot with valgrind

Part 1: first 2 cases of valgrind complain. context_analysis_only can be used on non-started LEX (opening tables)

obviouse fixes in DBUG and is_lex_started assignment.
parent 80333ad8
...@@ -2667,7 +2667,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end) ...@@ -2667,7 +2667,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
report_or_die("Query '%s' didn't return a result set", ds_query.str); report_or_die("Query '%s' didn't return a result set", ds_query.str);
dynstr_free(&ds_query); dynstr_free(&ds_query);
eval_expr(var, "", 0); eval_expr(var, "", 0);
return; DBUG_VOID_RETURN;
} }
dynstr_free(&ds_query); dynstr_free(&ds_query);
......
...@@ -524,13 +524,14 @@ void lex_start(THD *thd) ...@@ -524,13 +524,14 @@ void lex_start(THD *thd)
lex->allow_sum_func= 0; lex->allow_sum_func= 0;
lex->in_sum_func= NULL; lex->in_sum_func= NULL;
lex->is_lex_started= TRUE;
lex->used_tables= 0; lex->used_tables= 0;
lex->reset_slave_info.all= false; lex->reset_slave_info.all= false;
lex->limit_rows_examined= 0; lex->limit_rows_examined= 0;
lex->limit_rows_examined_cnt= ULONGLONG_MAX; lex->limit_rows_examined_cnt= ULONGLONG_MAX;
lex->var_list.empty(); lex->var_list.empty();
lex->stmt_var_list.empty(); lex->stmt_var_list.empty();
lex->is_lex_started= TRUE;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -2642,7 +2643,7 @@ void Query_tables_list::destroy_query_tables_list() ...@@ -2642,7 +2643,7 @@ void Query_tables_list::destroy_query_tables_list()
LEX::LEX() LEX::LEX()
: explain(NULL), : explain(NULL),
result(0), arena_for_set_stmt(0), mem_root_for_set_stmt(0), result(0), arena_for_set_stmt(0), mem_root_for_set_stmt(0),
option_type(OPT_DEFAULT), sphead(0), option_type(OPT_DEFAULT), context_analysis_only(0), sphead(0),
is_lex_started(0), limit_rows_examined_cnt(ULONGLONG_MAX) is_lex_started(0), limit_rows_examined_cnt(ULONGLONG_MAX)
{ {
......
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