开发者

ajax not completing process due to table locking

i have 2 开发者_运维技巧quires which i am implementing in ajax

the first insert.php insert thousand record in database the second update.php gets the num of inserted records every 10 milliseconds.

when i make a call to insert.php the insertion in table starts. but when update.php also starts to run i don't get any output from update.php until insert.php has completed its operation.

i am using mysql and storage engine is Innob

individually both the functions work perfectly.

can anyone explain what problem there is. What i can think of is that there is a table locking issue.

your suggestions are most appreciated.

Thanks


Please read: http://dev.mysql.com/doc/refman/5.1/en/innodb-lock-modes.html

INSERT sets an exclusive lock. The update is trying also a lock, but as the manual says: "lock cannot be granted immediately" no matter if the update wants a shared or exclusive lock.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜