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

发布于 2024-12-15 01:18:46 字数 354 浏览 3 评论 0原文

我对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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柠檬心 2024-12-22 01:18:46

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

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.

水中月 2024-12-22 01:18:46

不,它不应该崩溃。临时表对于其他连接不可见。他们不会互相冲突。

No, it should not crash. Temporary tables are not visible from other connections. They won't conflict with each other.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文