Skip to content
Prev 25901 / 398502 Next

Date: Sun, 1 Dec 2002 13:23:04 -0600

Hi James,

Yes, it's possible to define TEMPORARY tables using RMySQL, but you
need to be aware that TEMPORARY tables are by default in-memory
and always thread-specific (a TEMPORARY table created in one
connection/thread is not visible outside that thread/connection).
In addition, in version of MySQL prior to 4.0 you find the following
warning (Appendix A.6.3, MySQL

   "You can't use temporary tables more than once in the same query.
   For example, the following doesn't work:

     SELECT * from temporary_table, temprary_table as t1;

   We plan to fix the above in 4.0."

Make sure you use dbSendQuery() over the same connection (this will ensure
the queries are handled by the same thread in the MySQL server). [dbGetQuery()
opens an extra connection if the current connection has a pending result set.]

--
David
James Chapman wrote:
Message-ID: <20021202085522.A16907@jessie.research.bell-labs.com>
In-Reply-To: <000201c2996f$12ade100$a5f5d90c@universihf1nvk>; from james-chapman@uiowa.edu on Sun, Dec 01, 2002 at 08:23:19PM +0100