Hi all.
I'm using mysql-max-3.23.49a, and I'm having problems *sometimes* creating
temporary tables.
I'm using the wrox jdbc connection pool classes, which I've slightly modified
to ensure they are threadsafe.
In my application I need to create temp tables to simplify some pretty complex
sql. My code
currently looks like:
try {
connect() to database
drop temporary tables if exist
create temporary tables type = heap as select ...
select xyz from tablea, temp_table where ...
} catch (Exception e) { ... }
finally {
drop temporary tables if exist
close()
}
Most of the time everything works fine. However, sometimes, I get the error:
SQLException: General error: Table 'temp_table' already exists
I'm pretty sure it can't be anything to do with the connection pooling, as the
connection is not given up between the initial drop and the create statements.
HELP! This exception is being thrown 2-3 times a week on a production system
supporting about 150
concurrent users.
Thanks for any advice.