[MDEV-19327] ERROR: add plugin in multi types plugin Created: 2019-04-25  Updated: 2019-04-25  Resolved: 2019-04-25

Status: Closed
Project: MariaDB Server
Component/s: Plugins
Affects Version/s: 10.3.14
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: power Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

I write a plugin that have two types: MYSQL_STORAGE_ENGINE_PLUGIN and MYSQL_DAEMON_PLUGIN, but Mariadb only add the first type to plugin hash.
In the function plugin_add( in sql_plugin.cc file),we found the code:

if (name->str)
      DBUG_RETURN(FALSE); // all done

WHY? Thanks!



 Comments   
Comment by Sergei Golubchik [ 2019-04-25 ]

What do you mean, you wrote a plugin that has two types? A plugin cannot have two types. Do you mean, you have two plugins of different types in one .so (or .dll) file? This is fine, many storage engines do that.

That line works when somebody does INSTALL PLUGIN ..., it is reached of the plugin was successfully loaded. It means "if the plugin name was specified (that is, it's INSTALL PLUGIN), then we're done."

Generated at Thu Feb 08 08:50:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.