1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-13 13:01:51 +03:00

BUG#12929028: mysql_plugin : the --mysqld option is required, but not used

This patch corrects a defect whereby the --mysqld, --my-print-defaults, 
and --plugin-ini were required. These options are not required and the
code has been fixed accordingly.
This commit is contained in:
chuck.bell@oracle.com
2011-11-11 14:44:51 -05:00
parent 7ca801fedf
commit c54d88c336

View File

@ -929,19 +929,19 @@ static int check_access()
opt_datadir); opt_datadir);
goto exit; goto exit;
} }
if ((error= my_access(opt_plugin_ini, F_OK))) if (opt_plugin_ini && (error= my_access(opt_plugin_ini, F_OK)))
{ {
fprintf(stderr, "ERROR: Cannot access plugin config file at '%s'.\n", fprintf(stderr, "ERROR: Cannot access plugin config file at '%s'.\n",
opt_plugin_ini); opt_plugin_ini);
goto exit; goto exit;
} }
if ((error= my_access(opt_mysqld, F_OK))) if (opt_mysqld && (error= my_access(opt_mysqld, F_OK)))
{ {
fprintf(stderr, "ERROR: Cannot access mysqld path '%s'.\n", fprintf(stderr, "ERROR: Cannot access mysqld path '%s'.\n",
opt_mysqld); opt_mysqld);
goto exit; goto exit;
} }
if ((error= my_access(opt_my_print_defaults, F_OK))) if (opt_my_print_defaults && (error= my_access(opt_my_print_defaults, F_OK)))
{ {
fprintf(stderr, "ERROR: Cannot access my-print-defaults path '%s'.\n", fprintf(stderr, "ERROR: Cannot access my-print-defaults path '%s'.\n",
opt_my_print_defaults); opt_my_print_defaults);
@ -967,7 +967,7 @@ static int find_tool(const char *tool_name, char *tool_path)
int i= 0; int i= 0;
const char *paths[]= { const char *paths[]= {
opt_basedir, opt_mysqld, opt_my_print_defaults, "/usr", opt_mysqld, opt_basedir, opt_my_print_defaults, "/usr",
"/usr/local/mysql", "/usr/sbin", "/usr/share", "/extra", "/extra/debug", "/usr/local/mysql", "/usr/sbin", "/usr/share", "/extra", "/extra/debug",
"/extra/release", "/bin", "/usr/bin", "/mysql/bin" "/extra/release", "/bin", "/usr/bin", "/mysql/bin"
}; };
@ -1124,7 +1124,7 @@ static int dump_bootstrap_file(char *bootstrap_file)
error= 1; error= 1;
goto exit; goto exit;
} }
printf("# Query: %s", query_str); printf("# Query: %s\n", query_str);
exit: exit:
if (file) if (file)