diff options
author | Andrei Elkin <andrei.elkin@oracle.com> | 2011-11-29 20:17:02 +0200 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@oracle.com> | 2011-11-29 20:17:02 +0200 |
commit | 9937d5f0a91bb8fdceb7d2110e22c03878242a29 (patch) | |
tree | 7a65eba20838c82ea32a01a93846d1ca9203e384 /sql/sql_repl.cc | |
parent | bd49125dd906fdbd51dd81e89ec8cfa1d553e022 (diff) | |
download | mariadb-git-9937d5f0a91bb8fdceb7d2110e22c03878242a29.tar.gz |
Bug#13437900 - VALGRIND REPORTS A LEAK FOR REPL_IGNORE_SERVER_IDS
There was memory leak when running some tests on PB2.
The reason of the failure is an early return from change_master()
that was supposed to deallocate a dyn-array.
Fixed with relocating the dyn-array's destructor at ~LEX() that is
the end of the session, per Gleb's patch idea.
Two optimizations were done: the static buffer for the dyn-array to base on,
and the array initialization is called precisely when it's necessary rather than
per each CHANGE-MASTER as before.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 00c85d8eb43..5300a327029 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1689,7 +1689,6 @@ err: thd_proc_info(thd, 0); if (ret == FALSE) my_ok(thd); - delete_dynamic(&lex_mi->repl_ignore_server_ids); //freeing of parser-time alloc DBUG_RETURN(ret); } |