What does exactly the MySQL docummentation means when it says "the client for a session"?
It's maybe each one of the users for a database?
For example, when it says "A temporary table is only available and accessible to the client that creates it...". Does that means that the table is only available for the mysql user who created it?
CodePudding user response:
A session is a single connection, corresponding to one thread in the MySQL Server, which can be viewed in SHOW PROCESSLIST
.
There are several things that are scoped to the session:
- Session variables
- Temporary tables
- Transactions
- Last insert id generated for an auto-increment column
When the documentation says the temporary table is accessible only to the client that creates it, that means only in the same connection. There may be other connections for the same MySQL user, but each connection is a different session.