Skip to content

Commit c1fb91e

Browse files
committed
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.
1 parent 80333ad commit c1fb91e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

client/mysqltest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
26672667
report_or_die("Query '%s' didn't return a result set", ds_query.str);
26682668
dynstr_free(&ds_query);
26692669
eval_expr(var, "", 0);
2670-
return;
2670+
DBUG_VOID_RETURN;
26712671
}
26722672
dynstr_free(&ds_query);
26732673

sql/sql_lex.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,13 +524,14 @@ void lex_start(THD *thd)
524524
lex->allow_sum_func= 0;
525525
lex->in_sum_func= NULL;
526526

527-
lex->is_lex_started= TRUE;
528527
lex->used_tables= 0;
529528
lex->reset_slave_info.all= false;
530529
lex->limit_rows_examined= 0;
531530
lex->limit_rows_examined_cnt= ULONGLONG_MAX;
532531
lex->var_list.empty();
533532
lex->stmt_var_list.empty();
533+
534+
lex->is_lex_started= TRUE;
534535
DBUG_VOID_RETURN;
535536
}
536537

@@ -2642,7 +2643,7 @@ void Query_tables_list::destroy_query_tables_list()
26422643
LEX::LEX()
26432644
: explain(NULL),
26442645
result(0), arena_for_set_stmt(0), mem_root_for_set_stmt(0),
2645-
option_type(OPT_DEFAULT), sphead(0),
2646+
option_type(OPT_DEFAULT), context_analysis_only(0), sphead(0),
26462647
is_lex_started(0), limit_rows_examined_cnt(ULONGLONG_MAX)
26472648
{
26482649

0 commit comments

Comments
 (0)