开发者

using insert delayed on duplicate update low_priority all together

开发者 https://www.devze.com 2023-03-17 08:11 出处:网络
I want a mysql statement that will insert or update but using the low priority or delayed. This doesn\'t seem to be working

I want a mysql statement that will insert or update but using the low priority or delayed. This doesn't seem to be working

INSERT DELAYED INTO lastaccess
            (x, y, timeaccess)
            VALUES (2, 4, 1309622646)
            ON DUPLICATE KEY UPDATE LOW_PRIORITY timeac开发者_StackOverflowcess = 1309622646


Your problem here is the "ON DUPLICATE KEY UPDATE" statement. This does not work with the INSERT DELAYED statement, as per the documentation:

INSERT DELAYED should be used only for INSERT statements that specify value lists. The server ignores DELAYED for INSERT ... SELECT or INSERT ... ON DUPLICATE KEY UPDATE statements.

http://dev.mysql.com/doc/refman/5.5/en/insert-delayed.html

0

精彩评论

暂无评论...
验证码 换一张
取 消