Commit 9277b6ec authored by Sergei Golubchik's avatar Sergei Golubchik

Revert "MDEV-14448: Ctrl-C should not exit the client"

This reverts commit 396313d3.
parent afb48787
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment