mariadb/plugin
Shishir Jaiswal 17387bc574 Bug #21467458 - UNINSTALL PLUGIN DAEMON_EXAMPLE CRASHES
MYSQLD.

DESCRIPTION
===========
Crash occurs when daemon_example plugin is uninstalled
immediately after its installed. This can be reproduced
by installing and uninstalling the plugin repeatedly.

ANALYSIS
========
The daemon_example_plugin_deinit() function of the daemon
example plugin calls pthread_cancel() but doesn't wait for
the worker thread to actually complete before deallocating
the data buffer and closing the file that it writes to.
This is causing SEGFAULT!

FIX
===
Added a pthread_join() to wait for the thread to complete
before doing the cleanup work.

Removed a stray 'x' variable from the example code.

NOTE
====
Have made an entry in .opt file as given below:
--plugin-dir=$DAEMONEXAMPLE_DIR

This is done so that the program takes plugin directory as
../<dbg>/plugin/daemon_example/ instead of
../lib/plugin/
2015-09-16 18:58:43 +05:30
..
audit_null Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
auth Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG 2014-10-13 09:52:28 +02:00
daemon_example Bug #21467458 - UNINSTALL PLUGIN DAEMON_EXAMPLE CRASHES 2015-09-16 18:58:43 +05:30
fulltext Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
semisync Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30