mysql线程安全,MySQL过程线程安全吗?

I am developing some websites that need to interact with a database. I will not bring here a complicated example. My question actually comes down to: Is a MySQL procedure thread safe? If one client on my site triggers a procedure, can I assume it is atomic, or could it interfere with another request from another user?

解决方案

Depends on if you're using SQL transactions. Its possible, without the appropriate use of transactions and the actual serialization level, that a procedure can expose some data in a write call, for instance, that is visible to other queries / procedures before the complete procedure has completed.

in short: a given procedure will only be atomic if you use the appropriate transaction level

你可能感兴趣的:(mysql线程安全)