summaryrefslogtreecommitdiff
path: root/plugin/daemon_example
Commit message (Collapse)AuthorAgeFilesLines
* perfschema memory related instrumentation changesSergei Golubchik2020-03-101-1/+1
|
* Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-112-2/+2
|\
| * Update FSF AddressVicențiu Ciorbaru2019-05-112-2/+2
| | | | | | | | * Update wrong zip-code
* | MDEV-11660 Make encryption plugins "pure"Vladislav Vaintroub2017-04-271-2/+3
| | | | | | | | | | | | | | | | Do not exporting mysqld entry points directly. This is needed for mariabackup, to load encryption plugins on Windows. All plugins are "pure" by default. To mark plugin "impure" it should use RECOMPILE_FOR_EMBEDDED or STORAGE_ENGINE keyword.
* | MDEV-8378 - Debian: the Lintian complains about many "shlib-calls-exit" in manymariadb-10.0.23Sergey Vojtovich2015-12-161-1/+1
| | | | | | | | | | | | | | of the plugins Removed exit() from daemon_example, pass error to caller instead. Also removed unused my_abort_hook.
* | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-131-3/+9
|\ \ | |/
| * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2015-12-091-3/+9
| |\
| | * Bug #21467458 - UNINSTALL PLUGIN DAEMON_EXAMPLE CRASHESShishir Jaiswal2015-09-161-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
| | * Updated/added copyright headersMySQL Build Team2012-02-162-2/+2
| | |\
| | * | Merging into mysql-5.5.16-release.Mats Kindahl2011-08-151-1/+2
| | | |
| | * | Cherry-picking WL#5710 from mysql-5.5 to mysql-5.5.16-release.Alexander Nozdrin2011-08-152-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original revision id: # revno: 3489 [merge] # revision-id: tatjana.nuernberg@oracle.com-20110811120945-c6x9a5d2du8s9oj2 # parent: tatjana.nuernberg@oracle.com-20110811112736-so8r813hs8dmf7nr # parent: chuck.bell@oracle.com-20110810183949-2s9uxcuoux2p668e # committer: Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com> # branch nick: 55-9 # timestamp: Thu 2011-08-11 13:09:45 +0100 # message: # auto-merge This merge revision also has a patch for Bug 12664445, which has been also taken to 5.5.16.
| | * | Updated/added copyright headersKent Boortz2011-06-301-1/+1
| | |\ \ | | | |/
| | | * Updated/added copyright headersKent Boortz2011-06-301-1/+1
| | | |
| | * | WL#5665: Removal of the autotools-based build systemDavi Arnaut2010-11-203-53/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autotools-based build system has been superseded and is being removed in order to ease the maintenance burden on developers tweaking and maintaining the build system. In order to support tools that need to extract the server version, a new file that (only) contains the server version, called VERSION, is introduced. The file contents are human and machine-readable. The format is: MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=-rc The CMake based version extraction in cmake/mysql_version.cmake is changed to extract the version from this file. The configure to CMake wrapper is retained for backwards compatibility and to support the BUILD/ scripts. Also, a new a makefile target show-dist-name that prints the server version is introduced.
| | * | Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).Alexander Nozdrin2010-08-121-4/+4
| | | | | | | | | | | | Fixing copyright text.
| | * | Merge of mysql-trunk-bugfixing into mysql-trunk-merge.Davi Arnaut2010-07-151-1/+1
| | |\ \
| | | * | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives.
| | * | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-091-2/+2
| | |\ \ \ | | | |/ / | | |/| / | | | |/
| | | * Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a MySQL maintainer/developer mode that enables a set of warning options for the C/C++ compiler. This mode is intended to help improve the overall quality of the code. The warning options are: C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror" CXX_WARNINGS="$C_WARNINGS -Wno-unused-parameter" Since -Wall is essentially a moving target, autoconf checks are not run with warning options enabled, in particualr -Werror. This decision might be revisited in the future. The patch also fixes a mistake in the makefiles, where automake CXXFLAGS would be set to CFLAGS.
| | * | mergeDaniel Fischer2010-06-181-1/+2
| | |\ \
| | | * | fix syntax errorJonathan Perkin2010-05-051-1/+1
| | | | |
| | | * | Build all plugins.Jonathan Perkin2010-05-051-1/+2
| | | | | | | | | | | | | | | | | | | | Try to fix ia64/icc builds.
| | * | | Fix HP-UX localtime_r issue correctly, patch from mats.Jonathan Perkin2010-05-271-2/+1
| | | | |
| | * | | Pull in time.h for localtime_r.Jonathan Perkin2010-05-251-0/+1
| | | | |
| | * | | Another incarnation of the patch for Bug#30708Alexander Nozdrin2010-05-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (make relies GNU extentions). The patch was partially backport from 6.0. Original comment: bug#30708: make relies GNU extensions. Now that we no longer use BitKeeper we can safely remove the SCCS handling with no loss of functionality.
| | * | | Revert back to new CMake names for audit_null/daemon_example plugins.Jonathan Perkin2010-05-121-2/+1
| | | | |
| | * | | Changes to build using CMake according to existing release packages:Jonathan Perkin2010-05-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update/fix file layouts for each package type, add new types for native package formats including deb, rpm and svr4. - Build all plugins, including debug versions - Update compiler flags to match current release - Add missing @VAR@ expansions - Install correct mysqclient library symlinks - Fix icc/ia64 builds - Fix install of libmysqld-debug - Don't include mysql_embedded - Remove unpackaged manual pages to avoid missing files warnings - Don't install mtr's test suite
| | * | | WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-1/+5
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
| | * | Cleanup casing in MYSQL_ADD_PLUGIN, patch provided by KentVladislav Vaintroub2010-02-011-1/+1
| | | |
| | * | - Introduce MYSQL_ADD_PLUGIN that replaces MYSQL_STORAGE_ENGINEVladislav Vaintroub2009-12-011-3/+1
| | | | | | | | | | | | | | | | - Fix semisync library prefix (remove lib on Unixes) - restrict exported symbols from zlib and yassl (fvisibility=hidden)
| | * | WL#5161 : Cross-platform build with CMakeVladislav Vaintroub2009-11-092-0/+19
| | | |
| | * | WL#4903 Plugin Service API part ISergei Golubchik2009-11-021-1/+2
| | |/ | | | | | | | | | (mysql-next-mr backport)
| | * Use pkglibdir to simplify pkgplugindir, and fix the path in ajperkin/jonathan@chorlton.adsl.perkin.org.uk2008-01-021-1/+1
| | | | | | | | | | | | couple of Makefiles. Continuation of the fix for bug#31736.
| | * Add new pkgplugindir handling to seperate plugins from libraries,jperkin/jonathan@chorlton.adsl.perkin.org.uk2007-12-191-2/+3
| | | | | | | | | | | | | | | | | | and allow override for binary distributions. Extend mysql_config to print compiled-in plugin location for third-party plugins to use. Resolves bug#31736.
| | * Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1joerg@debian.(none)2007-06-011-0/+3
| | |\ | | | | | | | | | | | | into debian.(none):/M51/merge-5.1
| | | * Makefile.am:kent@mysql.com/kent-amd64.(none)2007-05-281-0/+3
| | | | | | | | | | | | | | | | | | | | Consistent use of '%::SCCS/s.%' to prevent some 'make' implementations from trying to update files in SCCS directory
| | * | WL#3817: Simplify string / memory area types and make things more consistent ↵monty@mysql.com/narttu.mysql.fi2007-05-101-3/+3
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (first part) The following type conversions was done: - Changed byte to uchar - Changed gptr to uchar* - Change my_string to char * - Change my_size_t to size_t - Change size_s to size_t Removed declaration of byte, gptr, my_string, my_size_t and size_s. Following function parameter changes was done: - All string functions in mysys/strings was changed to use size_t instead of uint for string lengths. - All read()/write() functions changed to use size_t (including vio). - All protocoll functions changed to use size_t instead of uint - Functions that used a pointer to a string length was changed to use size_t* - Changed malloc(), free() and related functions from using gptr to use void * as this requires fewer casts in the code and is more in line with how the standard functions work. - Added extra length argument to dirname_part() to return the length of the created string. - Changed (at least) following functions to take uchar* as argument: - db_dump() - my_net_write() - net_write_command() - net_store_data() - DBUG_DUMP() - decimal2bin() & bin2decimal() - Changed my_compress() and my_uncompress() to use size_t. Changed one argument to my_uncompress() from a pointer to a value as we only return one value (makes function easier to use). - Changed type of 'pack_data' argument to packfrm() to avoid casts. - Changed in readfrm() and writefrom(), ha_discover and handler::discover() the type for argument 'frmdata' to uchar** to avoid casts. - Changed most Field functions to use uchar* instead of char* (reduced a lot of casts). - Changed field->val_xxx(xxx, new_ptr) to take const pointers. Other changes: - Removed a lot of not needed casts - Added a few new cast required by other changes - Added some cast to my_multi_malloc() arguments for safety (as string lengths needs to be uint, not size_t). - Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done explicitely as this conflict was often hided by casting the function to hash_get_key). - Changed some buffers to memory regions to uchar* to avoid casts. - Changed some string lengths from uint to size_t. - Changed field->ptr to be uchar* instead of char*. This allowed us to get rid of a lot of casts. - Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar - Include zlib.h in some files as we needed declaration of crc32() - Changed MY_FILE_ERROR to be (size_t) -1. - Changed many variables to hold the result of my_read() / my_write() to be size_t. This was needed to properly detect errors (which are returned as (size_t) -1). - Removed some very old VMS code - Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix) - Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe. Updated function comment to reflect this. Changed function that depended on original behavior of my_pwrite() to itself restore the cursor position (one such case). - Added some missing checking of return value of malloc(). - Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow. - Changed type of table_def::m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length. - Moved THD::max_row_length() to table.cc (as it's not depending on THD). Inlined max_row_length_blob() into this function. - More function comments - Fixed some compiler warnings when compiled without partitions. - Removed setting of LEX_STRING() arguments in declaration (portability fix). - Some trivial indentation/variable name changes. - Some trivial code simplifications: - Replaced some calls to alloc_root + memcpy to use strmake_root()/strdup_root(). - Changed some calls from memdup() to strmake() (Safety fix) - Simpler loops in client-simple.c
| | * Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1jani@a88-113-38-195.elisa-laajakaista.fi2007-02-031-10/+16
| | |\ | | | | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1
| | | * Fixed problems detected by pushbuildmonty@mysql.com/narttu.mysql.fi2007-01-301-3/+3
| | | |
| | | * after merge fixesmonty@mysql.com/narttu.mysql.fi2007-01-291-2/+2
| | | | | | | | | | | | | | | | Removed
| | * | Made the example actually do something :)brian@zim.(none)2007-01-253-92/+201
| | |/ | | | | | | | | | It now demonstrates creating its own thread and shows off how to clean up after itself (creates a really simple heartbeat file)
| | * Many files:kent@mysql.com/kent-amd64.(none)2006-12-312-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header Added GPL copyright text my_vle.h, rpl_utility.h, my_vle.c, base64-t.c, rpl_utility.cc: Changed copyright header formatting some plugin_example.c, daemon_example.c: Added "Copyright (C) 2006 MySQL AB" to GPL header
| | * Refactored a number of engines to have correct init/deinit. Added pass ↵brian@zim.(none)2006-11-191-2/+2
| | | | | | | | | | | | support for "data" from plugin to plugin generic init to use memory location.
| | * This patch fixes the example engine, the example parser, and the example ↵brian@zim.(none)2006-11-108-0/+135
| | | | | | | | daemon to compile. AKA You can now test that the interface is actually working :)
* | 5.5 mergeSergei Golubchik2014-02-251-0/+1
|\ \ | |/
| * MDEV-5654 Server crashes on second installation of daemon_example pluginSergei Golubchik2014-02-171-0/+1
| | | | | | | | daemon plugin: join the thread to make sure it exits before the plugin is unloaded
* | put status variables in the proper pluginname_ scopeSergei Golubchik2013-04-091-17/+0
|/ | | | | (but support the scopeless mysql style too). always output status/system variables in the correct lettercase
* mysql-5.5.22 mergeSergei Golubchik2012-03-282-2/+2
|\ | | | | | | | | | | | | | | | | | | | | mysql-test/suite/innodb/t/group_commit_crash.test: remove autoincrement to avoid rbr being used for insert ... select mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test: remove autoincrement to avoid rbr being used for insert ... select mysys/my_addr_resolve.c: a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack mysys/stacktrace.c: my_vsnprintf() is ok here, in 5.5
| * Updated/added copyright headersMySQL Build Team2012-02-162-2/+2
| |\
* | | Reduce size of windows MSI by approx. 50%Vladislav Vaintroub2012-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | - Mark test components, plugins etc with COMPONENT Test, to get them excluded from the MSI - Only include debug symbols for client and embedded libs and also mysqld.exe and server plugins (so we can still can get a callstack in case of crash) The rest (all *.pdbs, test components, MTR) can be obtained from the big ZIP distribution, if required.