10bet网址
MySQL Internals Manual


4.6.3 Storage Engine Options

Storage engines are plugins, so the options that control plugin building specify which storage engines to build.

The--with-pluginsconfigureoption accepts two constructs that have no direct equivalent in CMake:

  • --with-pluginsaccepts a comma-separated list of engine names

  • --with-pluginsaccepts agroup namevalue 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, andBLACKHOLEengines:

-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1

You can also useONrather than 1 as the option value.

If you used--without-plugin-engineinconfigureto exclude a storage engine from the build, use-DWITHOUT_ENGINE_STORAGE_ENGINEin CMake.

Examples:

-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 -DWITHOUT_PARTITION_STORAGE_ENGINE=1

If neither-DWITH_ENGINE_STORAGE_ENGINEnor-DWITHOUT_ENGINE_STORAGE_ENGINEis 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 theINSTALL PLUGINstatement or the--plugin-load可以使用选项之前。

For additional information about CMake options for plugins, seeChapter 5,Plugins.