BUG#25659 - memory leak via "plugins" test

- Added suppressions for dlopen to make plugin test pass.
- Do not pass empty string to mysqld, since my_getopt is
  not capable to handle it.
- Re-enabled trailing UNINSTALL PLUGIN statement of plugin.test.

The memory leak described in the bug report happens in libdl, not
in mysqld. On some valgrind installations this error is suppressed
by default, no idea why it isn't suppressed on pb-valgrind.

<observation>
If library remains open after thread has finished, and is closed by
another thread, we get memory leak. But in case library is opened and
closed by the same thread no leak occurs.
</observation>
parent 404ee9d5
......@@ -120,7 +120,11 @@ sub mtr_get_opts_from_file ($) {
$arg =~ s/\$(\w+)/envsubst($1)/ge;
# print STDERR "ARG: $arg\n";
push(@args, $arg);
# Do not pass empty string since my_getopt is not capable to handle it.
if (length($arg))
{
push(@args, $arg)
}
}
}
close FILE;
......
......@@ -12,5 +12,8 @@ CREATE TABLE t1(a int) ENGINE=EXAMPLE;
SELECT * FROM t1;
a
DROP TABLE t1;
UNINSTALL PLUGIN example;
UNINSTALL PLUGIN EXAMPLE;
ERROR 42000: PLUGIN EXAMPLE does not exist
UNINSTALL PLUGIN non_exist;
ERROR 42000: PLUGIN non_exist does not exist
......@@ -18,9 +18,9 @@ SELECT * FROM t1;
DROP TABLE t1;
# Waiting for fix to BUG#22694
#UNINSTALL PLUGIN example;
#UNINSTALL PLUGIN EXAMPLE;
UNINSTALL PLUGIN example;
--error 1305
UNINSTALL PLUGIN EXAMPLE;
--error 1305
UNINSTALL PLUGIN non_exist;
......@@ -426,6 +426,23 @@
fun:_dl_map_object
}
{
libc pthread_exit 6
Memcheck:Leak
fun:malloc
fun:_dl_map_object
fun:openaux
fun:_dl_catch_error
}
{
libc pthread_exit 7
Memcheck:Leak
fun:malloc
fun:dl_open_worker
fun:_dl_catch_error
fun:_dl_open
}
#
# This is seen internally in the system libraries on 64-bit RHAS3.
......
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