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_lex.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_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 869a5916339..00a67e2c134 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2352,6 +2352,7 @@ LEX::LEX() INITIAL_LEX_PLUGIN_LIST_SIZE, INITIAL_LEX_PLUGIN_LIST_SIZE); reset_query_tables_list(TRUE); + repl_ignore_server_ids_inited= false; } |