MXS-3408 Fix leak in qc_mysqlembedded properly

The actual cause was a missing cleanup call.
This commit is contained in:
Johan Wikman
2021-02-17 16:56:55 +02:00
parent 8df55ca913
commit 66bb716ff0
2 changed files with 2 additions and 3 deletions

View File

@ -1960,6 +1960,7 @@ static void parsing_info_done(void* ptr)
{
thd = (THD*) mysql->thd;
thd->end_statement();
thd->cleanup_after_query();
(*mysql->methods->free_embedded_thd)(mysql);
mysql->thd = NULL;
}

View File

@ -700,9 +700,7 @@ create table t2 (a int, b int, primary key(a));
explain select * from t1;
show status like '%cost%';
#MXS The following line causes a leak in qc_mysqlembedded that causes ASAN to
#MXS complain. Easiest to solve by commenting out.
#select 'The cost of accessing t1 (dont care if it changes' '^';
select 'The cost of accessing t1 (dont care if it changes' '^';
select 'vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv' Z;