简体   繁体   中英

Is it possible 2 MySQL connections crash when they use the same temporary table name?

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM