diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-10-30 14:38:18 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-10-30 14:44:56 +0100 |
commit | 9277b6ec1ce8bc195a10b5deb11d65843adf8972 (patch) | |
tree | dc5ff3e92396d55501b8374201c7fab9e9dc4687 /client | |
parent | afb4878703e71307af0fe8723f8ab10e8d4e0288 (diff) | |
download | mariadb-git-9277b6ec1ce8bc195a10b5deb11d65843adf8972.tar.gz |
Revert "MDEV-14448: Ctrl-C should not exit the client"mariadb-5.5.66
This reverts commit 396313d301b3567aeadd04ae6a9322da2adc0a8b.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 7329f2298ab..50d45696a5c 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1368,23 +1368,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"); -#ifdef HAVE_READLINE - rl_on_new_line(); // Regenerate the prompt on a newline - rl_replace_line("", 0); // Clear the previous text - rl_redisplay(); -#endif - return; - } kill_mysql= mysql_init(kill_mysql); if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password, |