Description:
-DWITH_EXAMPLE_STORAGE_ENGINE=1 is ignored, although, according to the docs, it shouldn't be:
https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html
o compile a storage engine statically into the server, use -DWITH_engine_STORAGE_ENGINE=1. Some permissible engine values are (...) EXAMPLE, (...).
Probably 5.5 and 5.6 are affected, didn't check.
How to repeat:
Configure and build with -DWITH_EXAMPLE_STORAGE_ENGINE=1, then see
SHOW ENGINES;
Engine Support Comment Transactions XA Savepoints
FEDERATED NO Federated MySQL storage engine NULL NULL NULL
CSV YES CSV storage engine NO NO NO
MEMORY YES Hash based, stored in memory, useful for temporary tables NO NO NO
BLACKHOLE YES /dev/null storage engine (anything you write to it disappears) NO NO NO
MRG_MYISAM YES Collection of identical MyISAM tables NO NO NO
MyISAM YES MyISAM storage engine NO NO NO
ARCHIVE YES Archive storage engine NO NO NO
PERFORMANCE_SCHEMA YES Performance Schema NO NO NO
InnoDB DEFAULT Supports transactions, row-level locking, and foreign keys YES YES YES
Remove MODULE_ONLY from EXAMPLE's MYSQL_ADD_PLUGIN, reconfigure/rebuild, and it appears:
SHOW ENGINES;
Engine Support Comment Transactions XA Savepoints
EXAMPLE YES Example storage engine NO YES NO
...
Suggested fix:
=== modified file 'storage/example/CMakeLists.txt'
--- storage/example/CMakeLists.txt 2011-09-07 10:08:09 +0000
+++ storage/example/CMakeLists.txt 2013-11-08 09:26:59 +0000
@@ -15,4 +15,4 @@
SET(EXAMPLE_PLUGIN_DYNAMIC "ha_example")
SET(EXAMPLE_SOURCES ha_example.cc)
-MYSQL_ADD_PLUGIN(example ${EXAMPLE_SOURCES} STORAGE_ENGINE MODULE_ONLY)
+MYSQL_ADD_PLUGIN(example ${EXAMPLE_SOURCES} STORAGE_ENGINE)