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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f3a3399e
Commit
f3a3399e
authored
Aug 20, 2004
by
tomas@poseidon.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.(none):/home/tomas/mysql-4.1
parents
71a4f92c
70bca251
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
91 additions
and
60 deletions
+91
-60
ndb/src/kernel/main.cpp
ndb/src/kernel/main.cpp
+76
-57
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+1
-1
ndb/test/ndbapi/testIndex.cpp
ndb/test/ndbapi/testIndex.cpp
+1
-1
ndb/test/ndbapi/testNdbApi.cpp
ndb/test/ndbapi/testNdbApi.cpp
+2
-1
ndb/test/ndbapi/testRestartGci.cpp
ndb/test/ndbapi/testRestartGci.cpp
+2
-0
ndb/test/ndbapi/testScan.cpp
ndb/test/ndbapi/testScan.cpp
+1
-0
ndb/test/run-test/main.cpp
ndb/test/run-test/main.cpp
+4
-0
ndb/test/src/HugoOperations.cpp
ndb/test/src/HugoOperations.cpp
+2
-0
ndb/test/tools/cpcc.cpp
ndb/test/tools/cpcc.cpp
+2
-0
No files found.
ndb/src/kernel/main.cpp
View file @
f3a3399e
...
@@ -41,7 +41,9 @@
...
@@ -41,7 +41,9 @@
extern
EventLogger
g_eventLogger
;
extern
EventLogger
g_eventLogger
;
void
catchsigs
(
bool
ignore
);
// for process signal handling
void
catchsigs
(
bool
ignore
);
// for process signal handling
extern
"C"
void
handler
(
int
signo
);
// for process signal handling
extern
"C"
void
handler_shutdown
(
int
signum
);
// for process signal handling
extern
"C"
void
handler_error
(
int
signum
);
// for process signal handling
// Shows system information
// Shows system information
void
systemInfo
(
const
Configuration
&
conf
,
void
systemInfo
(
const
Configuration
&
conf
,
...
@@ -248,71 +250,89 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
...
@@ -248,71 +250,89 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
}
}
static
void
handler_register
(
int
signum
,
sighandler_t
handler
,
bool
ignore
)
{
if
(
ignore
)
{
if
(
signum
!=
SIGCHLD
)
signal
(
signum
,
SIG_IGN
);
}
else
signal
(
signum
,
handler
);
}
void
void
catchsigs
(
bool
ignore
){
catchsigs
(
bool
ignore
){
#if ! defined NDB_SOFTOSE && !defined NDB_OSE
#if ! defined NDB_SOFTOSE && !defined NDB_OSE
#if defined SIGRTMIN
static
const
int
signals_shutdown
[]
=
{
#define MAX_SIG_CATCH SIGRTMIN
#ifdef SIGBREAK
#elif defined NSIG
SIGBREAK
,
#define MAX_SIG_CATCH NSIG
#else
#error "neither SIGRTMIN or NSIG is defined on this platform, please report bug at bugs.mysql.com"
#endif
#endif
SIGHUP
,
// Makes the main process catch process signals, eg installs a
SIGINT
,
// handler named "handler". "handler" will then be called is instead
#if defined SIGPWR
// of the defualt process signal handler)
SIGPWR
,
if
(
ignore
){
#elif defined SIGINFO
for
(
int
i
=
1
;
i
<
MAX_SIG_CATCH
;
i
++
){
SIGINFO
,
if
(
i
!=
SIGCHLD
)
#endif
signal
(
i
,
SIG_IGN
);
SIGQUIT
,
}
SIGTERM
,
}
else
{
#ifdef SIGTSTP
for
(
int
i
=
1
;
i
<
MAX_SIG_CATCH
;
i
++
){
SIGTSTP
,
signal
(
i
,
handler
);
}
}
#endif
#endif
SIGTTIN
,
SIGTTOU
};
static
const
int
signals_error
[]
=
{
SIGABRT
,
SIGALRM
,
#ifdef SIGBUS
SIGBUS
,
#endif
SIGCHLD
,
SIGFPE
,
SIGILL
,
#ifdef SIGIO
SIGIO
,
#endif
#ifdef SIGPOLL
SIGPOLL
,
#endif
SIGSEGV
,
#ifdef SIGTRAP
SIGTRAP
#endif
};
#endif
static
const
int
signals_ignore
[]
=
{
SIGPIPE
};
for
(
size_t
i
=
0
;
i
<
sizeof
(
signals_shutdown
)
/
sizeof
(
signals_shutdown
[
0
]);
i
++
)
handler_register
(
signals_shutdown
[
i
],
handler_shutdown
,
ignore
);
for
(
size_t
i
=
0
;
i
<
sizeof
(
signals_error
)
/
sizeof
(
signals_error
[
0
]);
i
++
)
handler_register
(
signals_error
[
i
],
handler_error
,
ignore
);
for
(
size_t
i
=
0
;
i
<
sizeof
(
signals_ignore
)
/
sizeof
(
signals_ignore
[
0
]);
i
++
)
handler_register
(
signals_ignore
[
i
],
SIG_IGN
,
ignore
);
}
}
extern
"C"
extern
"C"
void
void
handler
(
int
sig
){
handler_shutdown
(
int
signum
){
switch
(
sig
){
g_eventLogger
.
info
(
"Received signal %d. Performing stop."
,
signum
);
case
SIGHUP
:
/* 1 - Hang up */
case
SIGINT
:
/* 2 - Interrupt */
case
SIGQUIT
:
/* 3 - Quit */
case
SIGTERM
:
/* 15 - Terminate */
#ifdef SIGPWR
case
SIGPWR
:
/* 19 - Power fail */
#endif
#ifdef SIGPOLL
case
SIGPOLL
:
/* 22 */
#endif
case
SIGSTOP
:
/* 23 */
case
SIGTSTP
:
/* 24 */
case
SIGTTIN
:
/* 26 */
case
SIGTTOU
:
/* 27 */
globalData
.
theRestartFlag
=
perform_stop
;
globalData
.
theRestartFlag
=
perform_stop
;
break
;
}
#ifdef SIGWINCH
case
SIGWINCH
:
extern
"C"
#endif
void
case
SIGPIPE
:
handler_error
(
int
signum
){
/**
g_eventLogger
.
info
(
"Received signal %d. Running error handler."
,
signum
);
* Can happen in TCP Transporter
*
* Just ignore
*/
break
;
default:
// restart the system
// restart the system
char
errorData
[
40
];
char
errorData
[
40
];
snprintf
(
errorData
,
40
,
"Signal %d received"
,
sig
);
snprintf
(
errorData
,
40
,
"Signal %d received"
,
signum
);
ERROR_SET
(
fatal
,
0
,
errorData
,
__FILE__
);
ERROR_SET
(
fatal
,
0
,
errorData
,
__FILE__
);
break
;
}
}
}
...
@@ -321,4 +341,3 @@ handler(int sig){
...
@@ -321,4 +341,3 @@ handler(int sig){
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
f3a3399e
...
@@ -2835,7 +2835,7 @@ MgmtSrvr::setDbParameter(int node, int param, const char * value,
...
@@ -2835,7 +2835,7 @@ MgmtSrvr::setDbParameter(int node, int param, const char * value,
p_type
++
;
p_type
++
;
if
(
iter
.
get
(
param
,
&
val_64
)
==
0
){
if
(
iter
.
get
(
param
,
&
val_64
)
==
0
){
val_64
=
atoll
(
value
);
val_64
=
strtoll
(
value
,
0
,
10
);
break
;
break
;
}
}
p_type
++
;
p_type
++
;
...
...
ndb/test/ndbapi/testIndex.cpp
View file @
f3a3399e
...
@@ -1529,4 +1529,4 @@ int main(int argc, const char** argv){
...
@@ -1529,4 +1529,4 @@ int main(int argc, const char** argv){
return
testIndex
.
execute
(
argc
,
argv
);
return
testIndex
.
execute
(
argc
,
argv
);
}
}
template
class
Vector
<
Attrib
*
>;
ndb/test/ndbapi/testNdbApi.cpp
View file @
f3a3399e
...
@@ -1010,4 +1010,5 @@ int main(int argc, const char** argv){
...
@@ -1010,4 +1010,5 @@ int main(int argc, const char** argv){
return
testNdbApi
.
execute
(
argc
,
argv
);
return
testNdbApi
.
execute
(
argc
,
argv
);
}
}
template
class
Vector
<
Ndb
*
>;
template
class
Vector
<
NdbConnection
*
>;
ndb/test/ndbapi/testRestartGci.cpp
View file @
f3a3399e
...
@@ -216,3 +216,5 @@ NDBT_TESTSUITE_END(testRestartGci);
...
@@ -216,3 +216,5 @@ NDBT_TESTSUITE_END(testRestartGci);
int
main
(
int
argc
,
const
char
**
argv
){
int
main
(
int
argc
,
const
char
**
argv
){
return
testRestartGci
.
execute
(
argc
,
argv
);
return
testRestartGci
.
execute
(
argc
,
argv
);
}
}
template
class
Vector
<
SavedRecord
>;
ndb/test/ndbapi/testScan.cpp
View file @
f3a3399e
...
@@ -1404,3 +1404,4 @@ int main(int argc, const char** argv){
...
@@ -1404,3 +1404,4 @@ int main(int argc, const char** argv){
return
testScan
.
execute
(
argc
,
argv
);
return
testScan
.
execute
(
argc
,
argv
);
}
}
template
class
Vector
<
Attrib
*
>;
ndb/test/run-test/main.cpp
View file @
f3a3399e
...
@@ -988,3 +988,7 @@ setup_hosts(atrt_config& config){
...
@@ -988,3 +988,7 @@ setup_hosts(atrt_config& config){
}
}
template
class
Vector
<
const
ParserRow
<
SimpleCpcClient
::
ParserDummy
>
*>
;
template
class
Vector
<
const
ParserRow
<
SimpleCpcClient
::
ParserDummy
>
*>
;
template
class
Vector
<
SimpleCpcClient
::
Process
>;
template
class
Vector
<
Vector
<
SimpleCpcClient
::
Process
>
>
;
template
class
Vector
<
atrt_host
>;
template
class
Vector
<
atrt_process
>;
ndb/test/src/HugoOperations.cpp
View file @
f3a3399e
...
@@ -796,3 +796,5 @@ HugoOperations::scanReadRecords(Ndb* pNdb, NdbScanOperation::LockMode lm,
...
@@ -796,3 +796,5 @@ HugoOperations::scanReadRecords(Ndb* pNdb, NdbScanOperation::LockMode lm,
return
0
;
return
0
;
}
}
template
class
Vector
<
HugoOperations
::
RsPair
>;
ndb/test/tools/cpcc.cpp
View file @
f3a3399e
...
@@ -348,3 +348,5 @@ Operate::evaluate(SimpleCpcClient* c, const SimpleCpcClient::Process & pp){
...
@@ -348,3 +348,5 @@ Operate::evaluate(SimpleCpcClient* c, const SimpleCpcClient::Process & pp){
}
}
template
class
Vector
<
const
ParserRow
<
SimpleCpcClient
::
ParserDummy
>
*>
;
template
class
Vector
<
const
ParserRow
<
SimpleCpcClient
::
ParserDummy
>
*>
;
template
class
Vector
<
Expression
*
>;
template
class
Vector
<
SimpleCpcClient
*
>;
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