MySQL connection pool and temporary table creation

I have already set up a MySQL connection pool in Glassfish using JNDI. I am only doing one query at a time, but using the same sql instance. Everything seems to work just fine except for creating temporary tables and using them. In short, although after creating the temporary table, the insert query does not work as the table does not exist. Are there any configurations I could look into? Is it possible to create a temporary table and use it in multiple statements. Thank you in advance!

+2


source to share


1 answer


Temporary tables are only available in the connection / session in which you created them. They can be used across multiple statements, but you cannot switch to another connection in the pool and expect the temporary table to be there.



+2


source







All Articles