[freeside-devel] MYSQL Support

ivan ivan at 420.am
Tue May 28 14:57:23 PDT 2002


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.

> The only other concern I'd have would be on concurrent access; the "temp1"
> tables would need to be constructed of a unique identifier.  Something
> unique plus the current process id should work to prevent different apache
> instances from trampling on each other's tables.
> 
> I have the pid included

The pid is enough.

> but whould like more since when running with
> mod_perl there is a good chance that you will hit the same apache pid.

Not concurrently, though.

> I have it working but from time to time I run into non unique tables.

I don't know what you mean by this, but I suspect there's something else
not quite right if the pid isn't enough to guarantee concurrent
uniqueness.

> Once I get this worked out I'll fix the other browse features as well as
> the new queued bug.
> Thanks,
> 
> -Dale
> 
> 

-- 
_ivan



More information about the freeside-devel mailing list