[freeside-devel] MYSQL Support

ivan ivan at 420.am
Tue May 28 15:11:21 PDT 2002


On Tue, May 28, 2002 at 06:04:20PM -0400, Dale Hege wrote:
> > On Tue, May 28, 2002 at 05:27:09PM -0400, Dale Hege wrote:
> >>
> >> I have been working on the mysql patches and have the cust_main
> >> searching worked out.
> >
> > That's good news!
> >
> >> I just want an opinion of how to generate a unique id for the
> >> table names as you suggested in the ticket.
> >> http://pouncequick.420.am/rt/Ticket/Display.html?id=300
> >
> > So, temporary tables don't work?  I'd try that first.  The MySQL manual
> > (appendix 6.3) says "You can't use temporary tables more than once in
> > the same query" but is unclear on whether that means you can't use
> > multiple columns in WHERE clause.  If temporary tables work the whole
> > unique naming thing is moot.
> 
> Temp tables do work but they are not removed until the DB connection is
> closed. If you use connection caching and persistant connections you can
> run into trouble. Everything works fine unless for some reason the script
> fails to finish and drop the temp tables. I might just add a drop before I
> try and create them just to make sure all the stuff from another run is
> gone.

The originally submitted SQL in ticket #300 has the temporary tables being
dropped immediately after being used.  If tempoarary tables do work, why
not just drop them immediately?

-- 
_ivan



More information about the freeside-devel mailing list