Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19850

per-plugin install/uninstall scriptlets

Details

    • Task
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Plugins
    • None

    Description

      plugins should be able to provide install/uninstall/upgrade scriptlets (at least shell, perhaps sql too).

      they'll be called at the appropriate places by rpm/dpkg as needed.

      in bintars install scriptlets will be run by mysql_install_db and mysql_upgrade.

      See also MDEV-19852

      Attachments

        Issue Links

          Activity

            Another option (as suggested in MDEV-19852) would be to run them on INSTALL/UNINSTALL PLUGIN.

            That might work if there's an SQL scriptlet to run. But it cannot do a shell scriptlet.

            serg Sergei Golubchik added a comment - Another option (as suggested in MDEV-19852 ) would be to run them on INSTALL/UNINSTALL PLUGIN. That might work if there's an SQL scriptlet to run. But it cannot do a shell scriptlet.

            shell scriptlets can be used by pam plugin to fix filesystem permissions

            serg Sergei Golubchik added a comment - shell scriptlets can be used by pam plugin to fix filesystem permissions
            serg Sergei Golubchik added a comment - - edited

            running from rpm/deb:
            run when a plugin package (or a server package with a plugin) is installed
            run on upgrades too
            somewhat different code for rpms and debs
            bintar packages can only do it from mysql_install_db
            mysql_install_db doesn't handle upgrades. mysql_upgrade ?
            sql scriptlets need a running server
            Should a plugin be active when its sql scriptlet is run? or is a scriptlet a prerequisite for a plugin being able to start?

            serg Sergei Golubchik added a comment - - edited running from rpm/deb: run when a plugin package (or a server package with a plugin) is installed run on upgrades too somewhat different code for rpms and debs bintar packages can only do it from mysql_install_db mysql_install_db doesn't handle upgrades. mysql_upgrade ? sql scriptlets need a running server Should a plugin be active when its sql scriptlet is run? or is a scriptlet a prerequisite for a plugin being able to start?
            serg Sergei Golubchik added a comment - - edited

            running sql scriptlets by the server on INSTALL PLUGIN:
            uniform treatment for rpm/deb/bintar
            needs a new version column in mysql.plugin to detect upgrades
            doesn't support shell scriptlets (but it can run wsrep scripts, so why not?)
            --plugin-load is treated like installing on every server startup (up to the script to detect it?)

            serg Sergei Golubchik added a comment - - edited running sql scriptlets by the server on INSTALL PLUGIN: uniform treatment for rpm/deb/bintar needs a new version column in mysql.plugin to detect upgrades doesn't support shell scriptlets (but it can run wsrep scripts, so why not?) --plugin-load is treated like installing on every server startup (up to the script to detect it?)

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.