本文介绍了MySQL InnoDB锁定联接的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

"SELECT ... FOR UPDATE"是否在MySQL中锁定联接的行?

Does "SELECT ... FOR UPDATE" lock joined rows in MySQL?

如果是,是否可以禁用此行为?

If so, is it possible to disable this behaviour?

文档中没有关于此的任何内容.我已经看到Oracle支持"SELECT ... FOR UPDATE OF table_name",其中table_name是将锁定受影响的行的主表或其中一个联接表,但是我从未在MySQL的上下文中看到这一点.

There is nothing about this in the documentation. I've seen that Oracle supports "SELECT ... FOR UPDATE OF table_name" where table_name is the main table or one of the joined tables for which the affected rows will be locked, but I've never seen this mentioned in context with MySQL.

推荐答案

请参见此MySQL文档页面.它说:

和:

扫描的行"是指联接中使用的任何表中的行.

"scanned rows" refers to rows from any of the tables that are used in the join.

这篇关于MySQL InnoDB锁定联接的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 01:01