summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <peter@mysql.com>2002-07-31 15:04:22 +0400
committerunknown <peter@mysql.com>2002-07-31 15:04:22 +0400
commit3b3d0d74e9d625a6552b12ac534ec63725966103 (patch)
tree1d4fbbd58ce34ce208bb02bbca620f5f5e1766be /sql/sql_parse.cc
parentb2f47a30dba2768e8724c27e5112b15f781d004c (diff)
downloadmariadb-git-3b3d0d74e9d625a6552b12ac534ec63725966103.tar.gz
Do not crash on CTRL-C during then running mysqld --bootstrap
I'm not quite sure if this is correct way to fix it so please check sql/sql_parse.cc: Block SIGINT
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 33229b4cb4c..28e77ecd697 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -706,8 +706,10 @@ pthread_handler_decl(handle_bootstrap,arg)
thd->dbug_thread_id=my_thread_id();
#if !defined(__WIN__) && !defined(OS2)
sigset_t set;
- VOID(sigemptyset(&set)); // Get mask in use
- VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
+ VOID(sigemptyset(&set));
+ VOID(sigaddset(&set,SIGINT));
+ // Get mask in use and block SIGINT
+ VOID(pthread_sigmask(SIG_BLOCK,&set,&thd->block_signals));
#endif
if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR)