Skip to content

Commit

Permalink
MDEV-19917: Install Spider with a simple spider.cnf
Browse files Browse the repository at this point in the history
To install Spider one can simply drop a /etc/mysql/conf.d/spider.cnf like

  [mariadb]
  plugin-load-add=ha_spider.so

This is automatically generated and installed when plugin is correctly
registered to plugin.cmake with its own component name. Many other plugins
such as Connect and RocksDB install in the same way.

This solved MDEV-19917 as the mere adding and removing of spider.cnf
automatically installs and uninstalls it.

Remove the overly complex and uncecessary install.sql from Spider,
if should not be needed in modern times anymore.

With this change there is no need for a uninstall.sql either.
  • Loading branch information
ottok authored and cvicentiu committed Jun 10, 2020
1 parent bb84777 commit ba41486
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 58 deletions.
2 changes: 1 addition & 1 deletion debian/mariadb-plugin-spider.install
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
etc/mysql/conf.d/spider.cnf etc/mysql/mariadb.conf.d
usr/lib/mysql/plugin/ha_spider.so
usr/share/mysql/install_spider.sql
10 changes: 0 additions & 10 deletions debian/mariadb-plugin-spider.postinst

This file was deleted.

7 changes: 2 additions & 5 deletions storage/spider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ ELSEIF(PLUGIN_PARTITION MATCHES "^NO$")
ELSE()
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/spider/hs_client)

INSTALL(FILES
${CMAKE_SOURCE_DIR}/storage/spider/scripts/install_spider.sql
DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
)
MYSQL_ADD_PLUGIN(spider ${SPIDER_SOURCES} STORAGE_ENGINE MODULE_ONLY MODULE_OUTPUT_NAME "ha_spider")
MYSQL_ADD_PLUGIN(spider ${SPIDER_SOURCES}
STORAGE_ENGINE COMPONENT spider-engine MODULE_ONLY MODULE_OUTPUT_NAME "ha_spider")
IF(NOT TARGET spider)
RETURN()
ENDIF()
Expand Down
42 changes: 0 additions & 42 deletions storage/spider/scripts/install_spider.sql

This file was deleted.

0 comments on commit ba41486

Please sign in to comment.