当它们使用相同的临时表名时,2个MySQL连接是否可能崩溃?

问题描述 投票:0回答:2

我对MySQL的调用顺序是这样的:

Connection1: 
create temporary table 'temp_table'...

Connection2: 
create temporary table 'temp_table'... (already exists, crash???) 

Connection1: 
drop table 'temp_table'... 

Connection2:
drop table 'temp_table'... (no longer exists, crash???)

是否可能发生这种情况?或者每个连接都有自己的临时表空间,以便它们(连接)不会与其他连接冲突?

php mysql connection temp-tables
2个回答
1
投票

没有;临时表是由它们创建的连接的本地表。它们对其他客户端不可见,并且单独的客户端可以创建相互影响的临时表。


1
投票

不,它不应该崩溃。从其他连接中看不到临时表。他们不会相互冲突。

© www.soinside.com 2019 - 2024. All rights reserved.