当 2 个 MySQL 连接使用相同的临时表名时,它们是否可能崩溃?
我对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???)
这种情况有可能发生吗?或者每个连接都有自己的临时表空间,这样它们(连接)就不会与其他连接冲突?
My call sequence to MySQL is like this:
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???)
Is it possible such a case may happen? Or each connection has its own space for temporary tables so that they (the connections) won't conflict with others?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不;临时表对于创建它们的连接来说是本地的。它们对其他客户端不可见,并且单独的客户端可以创建相互影子的临时表。
No; temporary tables are local to the connection that they're created by. They aren't visible to other clients, and separate clients can create temporary tables that shadow each other.
不,它不应该崩溃。临时表对于其他连接不可见。他们不会互相冲突。
No, it should not crash. Temporary tables are not visible from other connections. They won't conflict with each other.