小编Lat*_*chy的帖子

使用LEFT JOIN的MYSQL innoDB SELECT FOR UPDATE

有人可以告诉我使用innoDB存储引擎为SELECT FOR UPDATE进行LEFT JOIN表时会发生什么。

所有联接表中的所有行是否都被锁定,还是只有主表中的行?

例如,如果我这样做。

SELECT userID, countryID FROM user LEFT JOIN address USING (userID) WHERE userID = 1 FOR UPDATE
Run Code Online (Sandbox Code Playgroud)

地址表中的行也会被锁定吗?还是我需要分别锁定?

sql mysqli innodb

5
推荐指数
1
解决办法
2978
查看次数

“docker compose up”永远挂起(通常),即使使用 V2,尽管熵很高(Ubuntu)

我的命令有问题docker compose up

因此,我最近创建了一个全新的 Ubuntu 操作系统安装,并且一直在设置我的开发环境。我已经安装了 Docker,并且大多数情况似乎都工作正常。启动单个容器按预期工作,例如:

~$ docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are …
Run Code Online (Sandbox Code Playgroud)

ubuntu docker docker-compose docker-machine

5
推荐指数
0
解决办法
607
查看次数

标签 统计

docker ×1

docker-compose ×1

docker-machine ×1

innodb ×1

mysqli ×1

sql ×1

ubuntu ×1