summaryrefslogtreecommitdiff
path: root/client/mysql_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysql_plugin.c')
-rw-r--r--client/mysql_plugin.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c
index 32335e8b69b..682a2365a92 100644
--- a/client/mysql_plugin.c
+++ b/client/mysql_plugin.c
@@ -15,14 +15,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
*/
+#include <my_global.h>
#include <m_string.h>
#include <mysql.h>
#include <my_getopt.h>
#include <my_dir.h>
-#include <my_global.h>
-#include <stdio.h>
-#include <string.h>
-
#define SHOW_VERSION "1.0.0"
#define PRINT_VERSION do { printf("%s Ver %s Distrib %s\n", \
@@ -324,7 +321,7 @@ static int get_default_values()
int ret= 0;
FILE *file= 0;
- bzero(tool_path, FN_REFLEN);
+ memset(tool_path, 0, FN_REFLEN);
if ((error= find_tool("my_print_defaults" FN_EXEEXT, tool_path)))
goto exit;
else
@@ -337,9 +334,9 @@ static int get_default_values()
char *format_str= 0;
if (has_spaces(tool_path) || has_spaces(defaults_file))
- format_str = "\"%s mysqld > %s\"";
+ format_str = "\"%s --mysqld > %s\"";
else
- format_str = "%s mysqld > %s";
+ format_str = "%s --mysqld > %s";
snprintf(defaults_cmd, sizeof(defaults_cmd), format_str,
add_quotes(tool_path), add_quotes(defaults_file));
@@ -350,7 +347,7 @@ static int get_default_values()
}
#else
snprintf(defaults_cmd, sizeof(defaults_cmd),
- "%s mysqld > %s", tool_path, defaults_file);
+ "%s --mysqld > %s", tool_path, defaults_file);
#endif
/* Execute the command */
@@ -1005,7 +1002,7 @@ found:
static int find_plugin(char *tp_path)
{
- /* Check for existance of plugin */
+ /* Check for existence of plugin */
fn_format(tp_path, plugin_data.so_name, opt_plugin_dir, "", MYF(0));
if (!file_exists(tp_path))
{