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
d01c2687
Commit
d01c2687
authored
Mar 28, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge amd64.(none):/src/mysql-5.1-bugteam
into amd64.(none):/src/bug26243/my51-bug26243
parents
e44403fe
a30b1d9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
client/mysql.cc
client/mysql.cc
+18
-2
No files found.
client/mysql.cc
View file @
d01c2687
...
@@ -1269,12 +1269,12 @@ sig_handler handle_sigint(int sig)
...
@@ -1269,12 +1269,12 @@ sig_handler handle_sigint(int sig)
/* terminate if no query being executed, or we already tried interrupting */
/* terminate if no query being executed, or we already tried interrupting */
if
(
!
executing_query
||
interrupted_query
)
if
(
!
executing_query
||
interrupted_query
)
mysql_end
(
sig
)
;
goto
err
;
kill_mysql
=
mysql_init
(
kill_mysql
);
kill_mysql
=
mysql_init
(
kill_mysql
);
if
(
!
mysql_real_connect
(
kill_mysql
,
current_host
,
current_user
,
opt_password
,
if
(
!
mysql_real_connect
(
kill_mysql
,
current_host
,
current_user
,
opt_password
,
""
,
opt_mysql_port
,
opt_mysql_unix_port
,
0
))
""
,
opt_mysql_port
,
opt_mysql_unix_port
,
0
))
mysql_end
(
sig
)
;
goto
err
;
/* kill_buffer is always big enough because max length of %lu is 15 */
/* kill_buffer is always big enough because max length of %lu is 15 */
sprintf
(
kill_buffer
,
"KILL /*!50000 QUERY */ %lu"
,
mysql_thread_id
(
&
mysql
));
sprintf
(
kill_buffer
,
"KILL /*!50000 QUERY */ %lu"
,
mysql_thread_id
(
&
mysql
));
...
@@ -1283,6 +1283,22 @@ sig_handler handle_sigint(int sig)
...
@@ -1283,6 +1283,22 @@ sig_handler handle_sigint(int sig)
tee_fprintf
(
stdout
,
"Query aborted by Ctrl+C
\n
"
);
tee_fprintf
(
stdout
,
"Query aborted by Ctrl+C
\n
"
);
interrupted_query
=
1
;
interrupted_query
=
1
;
return
;
err:
#ifdef _WIN32
/*
When SIGINT is raised on Windows, the OS creates a new thread to handle the
interrupt. Once that thread completes, the main thread continues running
only to find that it's resources have already been free'd when the sigint
handler called mysql_end().
*/
mysql_thread_end
();
return
;
#else
mysql_end
(
sig
);
#endif
}
}
...
...
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