Storage engines are plugins, so the options that control plugin building specify which storage engines to build.
The--with-plugins
configureoption accepts two constructs that have no direct equivalent in CMake:
--with-plugins
accepts a comma-separated list of engine names--with-plugins
accepts a“group name”value that is shorthand for a set of engines
With CMake, engines are controlled with individual options.
Suppose that the configure option is:
--with-plugins=csv,myisam,myisammrg,heap,innobase,archive,blackhole
This builds the named engines as static plugins that are compiled into the server and need not be installed explicitly.
To convert this for CMake, omit these engine names because they are mandatory (always compiled in):
csv myisam myisammrg heap
然后你se these options to enable theInnoDB
,ARCHIVE
, andBLACKHOLE
engines:
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1
You can also useON
rather than 1 as the option value.
If you used--without-plugin-
inconfigureto exclude a storage engine from the build, useengine
-DWITHOUT_
in CMake.ENGINE
_STORAGE_ENGINE
Examples:
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 -DWITHOUT_PARTITION_STORAGE_ENGINE=1
If neither-DWITH_
norENGINE
_STORAGE_ENGINE-DWITHOUT_
is specified for a given storage engine, the engine is built as a shared module, or excluded if it cannot be built as a shared module. A shared module must be installed using theENGINE
_STORAGE_ENGINEINSTALL PLUGIN
statement or the--plugin-load
可以使用选项之前。
For additional information about CMake options for plugins, seeChapter 5,Plugins.