[MDEV-12501] set --maturity-level by default Created: 2017-04-13  Updated: 2017-12-21  Resolved: 2017-12-19

Status: Closed
Project: MariaDB Server
Component/s: Plugins
Fix Version/s: 10.3.3

Type: Task Priority: Major
Reporter: Sergei Golubchik Assignee: Vesa Pentti (Inactive)
Resolution: Fixed Votes: 0
Labels: 10.3-beta


 Description   

to the level one less than the server maturity.

and issue a warning when a lower level plugin is loaded (if plugin-maturity allows it)



 Comments   
Comment by Vesa Pentti (Inactive) [ 2017-11-25 ]

review/preview if this was anything near intended: commit 73ba8a63b8e00c8dc93d298a55b22e66e1e79037

(just fixed bootstrap.test)

tests failing left and right (in bb-10.3-pentve) on buildot, still trying to figure out if related to this or not

Comment by Vesa Pentti (Inactive) [ 2017-11-26 ]

Or, I realized, would it be more correct to get SERVER_MATURITY from for example 'VERSION' file?

Comment by Sergei Golubchik [ 2017-11-26 ]

Reviewed. Please install the email post-commit hook, though.
Comments:

  1. yes, VERSION file would be better for this
  2. let cmake convert the maturity level string into MariaDB_PLUGIN_MATURITY_XXX constant (uppercase, prepend "MariaDB_PLUGIN_MATURITY_"), then you won't need to do string lookups in the code and could use SERVER_MATURITY_LEVEL directly
  3. don't ADD_DEFINITION, instead let SERVER_MATURITY_LEVEL go into include/mysql_version.h
Comment by Vesa Pentti (Inactive) [ 2017-11-27 ]

Sorry, the post commit hook still doesn't seem to work with my config will try to fix

Commit 62f66358b1830613df7a27fe96d57c23f351495e

Removed complexity. Fixed more failing tests. All tests that load plugins need to use --plugin-maturity=unknown to work now.

Comment by Sergei Golubchik [ 2017-11-28 ]

Sorry, but mysql_version.h is generated by cmake from VERSION. You should not edit or check it in directly, but instead make changes in mysql_version.h.in, VERSION, and cmake/mysql_version.cmake to generate proper mysql_version.h.

And, please, don't use // C++ comments in mysql_version.h, not all compilers can handle that.

Comment by Vesa Pentti (Inactive) [ 2017-11-28 ]

Got it! (I hope correctly). Commit 2109201d422b1866bc4c9ef965f25310c2b0f958

Comment by Sergei Golubchik [ 2017-11-28 ]

I don't think you need a server_maturity variable, you can write directly

    else if (plugin_maturity_map[plugin->maturity] < SERVER_MATURITY_LEVEL) 

and

    DEFAULT(SERVER_MATURITY_LEVEL-1)

Otherwise looks ok, Feel free to push after removing the variable and verifying that buildbot is fine.

Ah, yes, and please fix the MDEV number in the comment to be 12501

Generated at Thu Feb 08 07:58:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.