summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2014-03-12 11:24:03 +0200
committerMichael Widenius <monty@mariadb.org>2014-03-12 11:24:03 +0200
commit49ca12a107d6a6f3e18729e6481090077b1f1bf8 (patch)
tree461349e0863651133cb0f5af844abeba64f1043c /client
parent9836fd5d131e405106508a5f706268e371418e05 (diff)
downloadmariadb-git-49ca12a107d6a6f3e18729e6481090077b1f1bf8.tar.gz
Fixed some failing tests
Remove memory warnings if mysql client aborts early Changed copyright for clients client/mysql.cc: Free memory if get_options fails, so that we don't get warnings from safemalloc include/welcome_copyright_notice.h: Added SkySQL to client copyrights mysql-test/valgrind.supp: Added suppressions for memory leaks from dlopen() for OpenSUSE 12.3 storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.result: Suppress warning storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.test: Suppress warning
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index b95f5742a11..ca7cb7dd910 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1,6 +1,7 @@
/*
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 2013, Monty Program Ab.
+ Copyright (c) 2013, 2014, SkySQL Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1176,12 +1177,9 @@ int main(int argc,char *argv[])
exit(1);
}
defaults_argv=argv;
- if (get_options(argc, (char **) argv))
- {
- free_defaults(defaults_argv);
- my_end(0);
- exit(1);
- }
+ if ((status.exit_status= get_options(argc, (char **) argv)))
+ mysql_end(-1);
+
if (status.batch && !status.line_buff &&
!(status.line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, stdin)))
{
@@ -1877,7 +1875,7 @@ static int get_options(int argc, char **argv)
opt_net_buffer_length= *mysql_params->p_net_buffer_length;
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
- exit(ho_error);
+ return(ho_error);
*mysql_params->p_max_allowed_packet= opt_max_allowed_packet;
*mysql_params->p_net_buffer_length= opt_net_buffer_length;