开发者

is update with left join will lock all MyIsam tables mysql?

I am doing a table update in mysql including 2 left join on other tables. This is all MyIsam tabl开发者_运维百科es.

UPDATE DB.tutorial_code LEFT JOIN tutorial ON tutorial.id_tutorial=tutorial_code.ref_tutorial LEFT JOIN tutorial_code_language ON tutorial_code_language.id_tutorial_code_language='1' SET tutorial_code = 'code to be added',ref_tutorial_code_language = '2' WHERE tutorial_code.id_tutorial_code ='3' AND tutorial.ref_tutorial_main='1' AND tutorial_code_language.id_tutorial_code_language='1'

I am wondering if only the table updated will be locked during the process or if the total of the 3 tables (the update one and the two joined ones) will be locked during the process. Indeed I don't want the joined tables to be modified during the process as the update depends on them.

If the 2 joined tables are not locked, I guess that I will have to use lock and lock write every tables used


They will all lock.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜