-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors When using "INSTALL PLUGIN" #171
Comments
BTW: mysql version: 5.7.18-debug, and my.cnf as following: |
Thanks for the note. We will investigate possible solutions for this. |
Hi. If I upload a patch here, can you apply it, build the plugin, and test that it works for you? I have a thought as to how to address the issue. Thanks. |
Yes, I will do that. |
Here is the diff. Please let me know how it goes. I'll be unavailable tomorrow but will check the following day. Thanks! |
I have verified this path and it works on *nix platform, but how about the windows platform? and it seems that the input para of calc_file_md5 is unnecessary. The debug info as following: |
Thanks for checking. I will consider just using the file in /proc instead of the input parameter. Checking it first allows us to print a message. You ask about Windows. The plugin isn't supported on Windows; we only support Linux. Thanks. |
Okay, Thanks. |
The fix for this issue is now pushed to Github and binaries (dev-snapshot) have been uploaded to bintray.com. Thanks. |
Hi,
There is maybe a error. The problem describe as following:
Going into the mysqld directory and starts mysql serverice by running"./mysqld". after service startup completely.
I use sql command to install the plugin, such as "INSTALL PLUGIN AUDIT SONAME "libaudit_plugin.so" ", the plugin will be installed successfully, but we also get the errors "ERROR 29 (HY000): File './mysqld' not found (Errcode: 2 - No such file or directory)". Although, an error message comes out, but the plugin are installed truly. "show variables likes "%audit%"" does work.
I try figure out what's going on. and i found that in function,"". calc_file_md5, it can not open the file "./mysqld"
because that the current directory has been changed to data directory but the place where the mysqld placed in. So in calc_file_md5 function, can not open "./mysqld" and error comes out.
When we use my.cnf to startup the service, the input params of calc_file_md5 is a full path, such as "/xxx/xx/xxx/mysqld", so that open function can find mysqld.
the call stack as following:
#0 Diagnostics_area::set_error_status (this=0x7f9398003b58, mysql_errno=29,
message_text=0x7f93a5520d60 "File './mysqld' not found (Errcode: 2 - No such file or directory)", returned_sqlstate=0x2058909 "HY000")
at /home/homli/work/MySQL-Audit/sql/sql_error.cc:438
#1 0x000000000150a4b0 in THD::raise_condition (this=0x7f9398000df0, sql_errno=29, sqlstate=0x2058909 "HY000", level=Sql_condition::SL_ERROR,
msg=0x7f93a5520d60 "File './mysqld' not found (Errcode: 2 - No such file or directory)", use_condition_handler=false)
at /home/homli/work/MySQL-Audit/sql/sql_class.cc:1444
#2 0x0000000000ea8776 in my_message_sql (error=29, str=0x7f93a5520d60 "File './mysqld' not found (Errcode: 2 - No such file or directory)", MyFlags=0)
at /home/homli/work/MySQL-Audit/sql/mysqld.cc:2255
#3 0x00000000018b13f1 in my_error (nr=29, MyFlags=0) at /home/homli/work/MySQL-Audit/mysys/my_error.c:210
#4 0x00000000018b5e58 in my_register_filename (fd=-1, FileName=0x7ffcdd97851c "./mysqld", type_of_file=FILE_BY_OPEN, error_message_number=29, MyFlags=16)
at /home/homli/work/MySQL-Audit/mysys/my_open.c:167
#5 0x00000000018b5898 in my_open (FileName=0x7ffcdd97851c "./mysqld", Flags=0, MyFlags=16) at /home/homli/work/MySQL-Audit/mysys/my_open.c:52
#6 0x00007f939c0166d4 in calc_file_md5 (file_name=0x7ffcdd97851c "./mysqld", digest_str=0x7f93a55254f0 "") at audit_plugin.cc:1280
#7 0x00007f939c0168e1 in setup_offsets () at audit_plugin.cc:1341
#8 0x00007f939c01a95b in audit_plugin_init (p=0x7f93980b9a30) at audit_plugin.cc:2019
#9 0x0000000000ebf2d3 in initialize_audit_plugin (plugin=0x7f93980b9a30) at /home/homli/work/MySQL-Audit/sql/sql_audit.cc:1270
#10 0x000000000159e84c in plugin_initialize (plugin=0x7f93980b9a30) at /home/homli/work/MySQL-Audit/sql/sql_plugin.cc:1197
#11 0x00000000015a0b65 in mysql_install_plugin (thd=0x7f9398000df0, name=0x7f9398006220, dl=0x7f9398006230) at /home/homli/work/MySQL-Audit/sql/sql_plugin.cc:2044
#12 0x00000000015a674d in Sql_cmd_install_plugin::execute (this=0x7f9398006218, thd=0x7f9398000df0) at /home/homli/work/MySQL-Audit/sql/sql_plugin.cc:4254
#13 0x0000000001576178 in mysql_execute_command (thd=0x7f9398000df0, first_level=true) at /home/homli/work/MySQL-Audit/sql/sql_parse.cc:4894
#14 0x0000000001578101 in mysql_parse (thd=0x7f9398000df0, parser_state=0x7f93a5527610) at /home/homli/work/MySQL-Audit/sql/sql_parse.cc:5612
The text was updated successfully, but these errors were encountered: