Oracle 5.0 Reference Manual page 1228

Table of Contents

Advertisement

FLUSH TABLES WITH READ LOCK
Closes all open tables and locks all tables for all databases with a global read lock. This is a very
convenient way to get backups if you have a file system such as Veritas or ZFS that can take
snapshots in time. Use
FLUSH TABLES WITH READ LOCK
subject to the same behavior as
and implicit commits:
UNLOCK TABLES
locked with
TABLES WITH READ LOCK
• Beginning a transaction causes table locks acquired with
you had executed
acquired with
13.7.6.3.
Syntax
KILL
KILL [CONNECTION | QUERY]
Each connection to
SHOW PROCESSLIST
In MySQL 5.0.0,
KILL CONNECTION
with the given thread_id.
KILL QUERY
connection itself intact.
If you have the
you can kill all threads and statements. Otherwise, you can see and kill only your own threads and
statements.
You can also use the
and kill threads.
When you use KILL, a thread-specific kill flag is set for the thread. In most cases, it might take some
time for the thread to die because the kill flag is checked only at specific intervals:
• In SELECT,
kill flag is set, the statement is aborted.
• During
ALTER
table. If the kill flag was set, the statement is aborted and the temporary table is deleted.
• During
UPDATE
updated or deleted row. If the kill flag is set, the statement is aborted. Note that if you are not using
transactions, the changes are not rolled back.
GET_LOCK()
• An
INSERT DELAYED
Other Administrative Statements
UNLOCK TABLES
LOCK TABLES
implicitly commits any active transaction only if any tables currently have been
TABLES. The commit does not occur for
LOCK
because the latter statement does not acquire table locks.
TABLES. Beginning a transaction does not release a global read lock
UNLOCK
FLUSH TABLES WITH READ
thread_id
runs in a separate thread. You can see which threads are running with the
mysqld
statement and kill a thread with the
permits an optional
KILL
is the same as
terminates the statement that the connection is currently executing, but leaves the
[577]
privilege, you can see all threads. If you have the
PROCESS
mysqladmin processlist
Note
You cannot use
KILL
embedded server merely runs inside the threads of the host application. It does
not create any connection threads of its own.
and
ORDER BY
GROUP BY
TABLE, the kill flag is checked before each block of rows are read from the original
or
operations, the kill flag is checked after each block read and after each
DELETE
[965]
aborts and returns NULL.
thread quickly flushes (inserts) all rows it has in memory and then terminates.
to release the lock.
acquires a global read lock and not table locks, so it is not
and
UNLOCK TABLES
LOCK.
KILL thread_id
or
CONNECTION
QUERY
with no modifier: It terminates the connection associated
KILL
and
mysqladmin kill
with the Embedded MySQL Server library because the
loops, the flag is checked after reading a block of rows. If the
1208
with respect to table locking
following
UNLOCK TABLES
to be released, as though
LOCK TABLES
statement.
modifier:
SUPER
commands to examine
FLUSH
[578]
privilege,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents