The Shutdown Process - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

Open streams:
Alarm status:
Active alarms:
Max used alarms: 2
Next alarm time: 67
On some Mac OS X 10.3 versions,

5.1.10. The Shutdown Process

The server shutdown process takes place as follows:
1. The shutdown process is initiated.
This can occur initiated several ways. For example, a user with the
can execute a
supported by MySQL. Other operating system-specific shutdown initiation methods are possible
as well: The server shuts down on Unix when it receives a
service on Windows shuts down when the services manager tells it to.
2. The server creates a shutdown thread if necessary.
Depending on how shutdown was initiated, the server might create a thread to handle the shutdown
process. If shutdown was requested by a client, a shutdown thread is created. If shutdown is the
result of receiving a
create a separate thread to do so. If the server tries to create a shutdown thread and cannot (for
example, if memory is exhausted), it issues a diagnostic message that appears in the error log:
Error: Can't create thread to kill server
3. The server stops accepting new connections.
To prevent new activity from being initiated during shutdown, the server stops accepting new
client connections by closing the handlers for the network interfaces to which it normally listens for
connections: the TCP/IP port, the Unix socket file, the Windows named pipe, and shared memory
on Windows.
4. The server terminates current activity.
For each thread associated with a client connection, the server breaks the connection to the client
and marks the thread as killed. Threads die when they notice that they are so marked. Threads
for idle connections die quickly. Threads that currently are processing statements check their
state periodically and take longer to die. For additional information about thread termination, see
Section 13.7.6.3,
OPTIMIZE TABLE
For threads that have an open transaction, the transaction is rolled back. Note that if a thread is
updating a nontransactional table, an operation such as a multiple-row
leave the table partially updated because the operation can terminate before completion.
If the server is a master replication server, it treats threads associated with currently connected
slaves like other client threads. That is, each one is marked as killed and exits when it next checks
its state.
If the server is a slave replication server, it stops the I/O and SQL threads, if they are active, before
marking client threads as killed. The SQL thread is permitted to finish its current statement (to avoid
causing replication problems), and then stops. In MySQL 5.0.80 and earlier, if the SQL thread was
in the middle of a transaction at this point, the transaction was rolled back; in MySQL 5.0.81 and
later, the server waits until the current replication event group (if any) has finished executing, or
until the user issues a
"STOP SLAVE

The Shutdown Process

0
1
mysqld
mysqladmin shutdown
signal, the signal thread might handle shutdown itself, or it might
SIGTERM
"KILL
Syntax", in particular for the instructions about killed
operations on
MyISAM
or
KILL QUERY
Syntax".
ignores
and SIGQUIT.
SIGHUP
command.
mysqladmin
SIGTERM
tables.
statement. See also
KILL CONNECTION
542
[578]
privilege
SHUTDOWN
can be used on any platform
signal. A server running as a
REPAIR TABLE
or
UPDATE
INSERT
Section 13.4.2.8,
or
may

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Mysql 5.0

Table of Contents