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

Client plugin dir not automatically determined

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 5.5, 10.0, 10.1
    • N/A
    • Scripts & Clients
    • None

    Description

      At least on Windows, server is always able to correctly determine correct client plugin dir, no matter if it is started from unpacked ZIP or in MSI. It finds mysql_home, as parent of the directory where mysqld.exe is located (using GetModuleFileName to get mysqld.exe's path), then it sets the plugin_dir as $mysql_home/lib/plugin.

      Clients do not have the same logic, so whenever I start

      mysql -usome_user 
      

      which needs client plugin, it dies with rather unspecific message , like below

      C:\work\gssapi\_CPack_Packages\win32\ZIP\mariadb-10.1.9-win32>bin\mysql -uwlad
      ERROR 2059 (HY000): Authentication plugin 'auth_gssapi_client' cannot be loaded: The operation completed successfully.
      

      Looking with ProcessMonitor, mysql.exe tries to load it from the hardcoded path PLUGINDIR
      C:\MariaDB10.1\lib\plugin. That path is btw almost never correct, as we're installing MSI by default into C:\Program Files\MariaDB 10.1 , or, for 32bit on x64, into C:\Program Files(x86)\MariaDB 10.1 , but this is a different story.

      It is a little awkward to start mysql.exe with "--plugin-dir=C:\Program Files(x86)\MariaDB 10.1\lib\plugin", and whatever the path needs to be for the unpacked ZIP.

      Ideally, every client that can load plugins would implement the same logic as server, i.e resolving default path as _ ../${INSTALL_PLUGIN_DIR}_ relative to the location of the client binary.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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