Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Cannot Reproduce
-
5.5(EOL), 10.0(EOL), 10.1(EOL)
-
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
Field | Original Value | New Value |
---|---|---|
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 , 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. |
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 , 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. |
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 , 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. |
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 {noformat} mysql -usome_user {noformat} which needs client plugin, it dies with rather unspecific message , like below {noformat} 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. {noformat} 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. |
Fix Version/s | 10.2 [ 14601 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Attachment | MDEV-9321-basedir.diff [ 48951 ] |
Assignee | Sergei Golubchik [ serg ] | Vladislav Vaintroub [ wlad ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] |
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 {noformat} mysql -usome_user {noformat} which needs client plugin, it dies with rather unspecific message , like below {noformat} 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. {noformat} 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. |
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 {noformat} mysql -usome_user {noformat} which needs client plugin, it dies with rather unspecific message , like below {noformat} 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. {noformat} 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. |
Assignee | Vladislav Vaintroub [ wlad ] | Sergei Golubchik [ serg ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Labels | need_feedback |
Labels | need_feedback |
Labels | need_feedback |
Labels | need_feedback |
Workflow | MariaDB v3 [ 73318 ] | MariaDB v4 [ 143476 ] |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Cannot Reproduce [ 5 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Zendesk Related Tickets | 128158 |
Assigning to Serg for now. Not sure where this resolve path logic should go, clients e.g mysql, client_plugin.cc, my.ini's or elsewhere.
Also there might be equivalents on systems other than Windows to determine the path of currently running process (proc flle system on Linux for example)