diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-30 14:47:35 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-30 14:47:35 +0100 |
commit | d671f506b0e67b951be60d61236ca8a44953d407 (patch) | |
tree | 0d8068a11ac9541ab3889ea7fd0cec8299e6bd99 /client/mysql.cc | |
parent | 708d46158b7f20b702734990cc63f08abaf27443 (diff) | |
parent | 9277b6ec1ce8bc195a10b5deb11d65843adf8972 (diff) | |
download | mariadb-git-d671f506b0e67b951be60d61236ca8a44953d407.tar.gz |
Merge branch '5.5' into 10.1
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index c7c902456cf..31c1d443607 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1401,21 +1401,12 @@ sig_handler handle_sigint(int sig) char kill_buffer[40]; MYSQL *kill_mysql= NULL; - /* Terminate if we already tried interrupting. */ - if (interrupted_query == 2) + /* terminate if no query being executed, or we already tried interrupting */ + if (!executing_query || (interrupted_query == 2)) { tee_fprintf(stdout, "Ctrl-C -- exit!\n"); goto err; } - /* If no query being executed, don't exit. */ - if (!executing_query) - { - tee_fprintf(stdout, "Ctrl-C\n"); - rl_on_new_line(); // Regenerate the prompt on a newline - rl_replace_line("", 0); // Clear the previous text - rl_redisplay(); - return; - } kill_mysql= mysql_init(kill_mysql); if (!do_connect(kill_mysql,current_host, current_user, opt_password, "", 0)) |