Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
396313d3
Commit
396313d3
authored
May 22, 2019
by
Anel Husakovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14448: Ctrl-C should not exit the client
parent
719ac0ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
client/mysql.cc
client/mysql.cc
+11
-2
No files found.
client/mysql.cc
View file @
396313d3
...
...
@@ -1368,12 +1368,21 @@ sig_handler handle_sigint(int sig)
char
kill_buffer
[
40
];
MYSQL
*
kill_mysql
=
NULL
;
/*
terminate if no query being executed, or we already tried interrupting
*/
if
(
!
executing_query
||
(
interrupted_query
==
2
)
)
/*
Terminate if we already tried interrupting.
*/
if
(
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
(
!
mysql_real_connect
(
kill_mysql
,
current_host
,
current_user
,
opt_password
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment