|
Posted by Bill Karwin on 10/06/05 20:27
windandwaves wrote:
> Are you allowed to use the following syntax in Mysql 4.0.17-nt :
DELAYED was introduced in MySQL 3.22.15.
There doesn't seem to be doc on when IGNORE was introduced, but I assume
it was present before 4.0.17.
> INSERT DELAYED IGNORE INTO `mytable` ( `ID` , `A` , `B` ) VALUES
> ("'.session_id().'", "2", ROUND(NOW()/10000) );
>
> I am particularly interested in the delayed ignore. I want to make sure
> that no matter what, the instruction is carried out and that, due to
> indexes, the data is not allowed to go in, that we do not get an error.
Note that currently the queued rows are held only in memory until they
are inserted into the table. This means that if you terminate mysqld
forcibly (for example, with kill -9) or if mysqld dies unexpectedly, any
queued rows that have not been written to disk are lost!
This seems not to support your requirement that the instruction is
carried out, no matter what. Better to avoid DELAYED if that is required.
Are you sure you need to use DELAYED. This modifier is meant to queue
up inserts for later insertion, if the table is currently being read by
another thread. Also, DELAYED is not relevant for InnoDB tables, since
in that storage engine, readers do not block writers, and vice versa.
Have you read about the purpose and the limitations of DELAYED on this page:
http://dev.mysql.com/doc/mysql/en/insert-delayed.html ?
Regards,
Bill K.
[Back to original message]
|