TEMPORARY TABLES are suppose to work this way. They are only there during a connection and then dropped when the connection to the database is closed. One thing they are great for is when you have temporary information that needs to be kept and worked with. One of my programs has to pull things from other tables and I put them into a temporary table where I can do things with this information easier than I could by putting them into variables. It makes sorts much easier and the information is only used to generate the pages that a client is viewing. Instead of having a table for every client that has to be deleted afterwards, I use a temporary table. You also don't have to have the table be a different name for each client that is connecting because only the connection that created it can see it. So if 5 people access my page at the same time and each have thier own "population" table, it is not shared so the information can/will be different for each of them.
Before I started using temporary tables, I would have my script come up with a random name for the table. Problem was that if the client killed the connection before the table could be dropped, it would stay in the database until I manually dropped it. In my opinion, this was the biggest benefit of TEMPORARY TABLES.


Steve

At 02:58 PM 10/26/2003, you wrote:
Hi there,

I'm trying to restrict the access that a Tomcat server has to mysql
4.0.15-standard-log database server.  Unfortunately some of the queries use
temporary tables, so I've had to GRANT CREATE TEMPORARY TABLES to the user.

However, since the server is using connection pooling, it also DROPS the
temporary tables after the queries have completed.

I'd really like to be able to GRANT DROP TEMPORARY TABLES, but this doesn't
seem to exist, so I've got to GRANT DROP - which feels a less safe to me :(

Is there a better way of doing this that someone has found before, or is
there a way to grant DROPS of the temporary table?

Many Thanks,

Mike



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to