Oracle 5.0 Reference Manual page 1090

Table of Contents

Advertisement

are delayed rows. This means that you should use
that you need it.
The queued rows are held only in memory until they are inserted into the table. This means that if you
terminate
forcibly (for example, with
mysqld
rows that have not been written to disk are lost.
There are some constraints on the use of DELAYED:
works only with MyISAM, MEMORY, and
INSERT DELAYED
support DELAYED, an error occurs.
• An error occurs for
INSERT DELAYED
because the insert must be handled by a separate thread, not by the session that holds the lock.
• For
tables, if there are no free blocks in the middle of the data file, concurrent
MyISAM
and
statements are supported. Under these circumstances, you very seldom need to use
INSERT
with MyISAM.
INSERT DELAYED
should be used only for
INSERT DELAYED
ignores
for
DELAYED
statements.
• Because the
INSERT DELAYED
cannot use
LAST_INSERT_ID()
generate.
rows are not visible to
DELAYED
is treated as a normal
INSERT DELAYED
logging is enabled.
is ignored on slave replication servers, so that
DELAYED
on slaves. This is because
INSERT
master.
• Pending
INSERT DELAYED
to modify the table structure.
is not supported for views.
INSERT DELAYED
The following describes in detail what happens when you use the
REPLACE. In this description, the "thread" is the thread that received an
and "handler" is the thread that handles all
• When a thread executes a
statements for the table, if no such handler already exists.
DELAYED
• The thread checks whether the handler has previously acquired a
handler thread to do so. The
lock on the table. However, the handler waits for all
WRITE
statements to finish, to ensure that the table structure is up to date.
• The thread executes the
of the final row into a queue that is managed by the handler thread. Any syntax errors are noticed by
the thread and reported to the client program.
• The client cannot obtain from the server the number of duplicate rows or the
value for the resulting row, because the
completed. (If you use the C API, the
for the same reason.)
INSERT
kill
if used with a table that has been locked with
INSERT
INSERT ... SELECT
statement returns immediately, before the rows are inserted, you
[961]
to get the
statements until they actually have been inserted.
SELECT
INSERT
DELAYED
statements are lost if a table is write locked and
INSERT DELAYED
statement for a table, a handler thread is created to process all
DELAYED
lock can be obtained even if other threads have a
DELAYED
statement, but instead of writing the row to the table, it puts a copy
INSERT
INSERT
mysql_info()
1070
Syntax
INSERT DELAYED
-9) or if
dies unexpectedly, any queued
mysqld
ARCHIVE
statements that specify value lists. The server
or
INSERT ... ON DUPLICATE KEY UPDATE
AUTO_INCREMENT
if the statement inserts multiple rows and binary
INSERT DELAYED
could cause the slave to have different data than the
DELAYED
statements for a particular table.
DELAYED
ALTER TABLE
returns before the insert operation has been
function does not return anything meaningful,
only when you are really sure
tables. For engines that do not
LOCK TABLES
SELECT
value that the statement might
is treated as a normal
ALTER TABLE
option to
INSERT
statement
INSERT DELAYED
lock; if not, it tells the
READ
locks or
FLUSH TABLES
AUTO_INCREMENT
is used
or
or

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents