[freeside-devel] Fwd: Re: Error in cust_main.cgi
Donald Greer
dgreer at austintx.com
Wed Feb 13 13:57:50 PST 2002
ivan wrote:
> Considering these searches are for "all customers", "all pacakges" and
> "all services", I don't think the HEAP type is appropriate.
I didn't know what sort of size these tables would grow to. It
certainly makes since. The table size should be selected strickly for
speed, since any disconnection will destroy the table anyway (because
it's a TEMPORARY table).
>
> 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.
No. The "TEMPORARY" takes care of that. Each session can hace a
table "foo" as a TEMPORARY open at the same time. Don't know what the
internal magic is, probably prepends the connection id to the table when
it's created and destroys it when the session is killed (or the server
is restart in the case of a crash).
>
> I look forward to a MySQL patch for search/cust_main.cgi,
> search/cust_pkg.cgi and search/svc_acct.cgi. Should be pretty
> straightforward; import the datasrc subroutine from FS::UID:
>
> use FS::UID qw(datasrc);
>
> then
>
> if ( datasrc =~ /mysql/ ) {
> #set query to msyql query
> } else {
> #use regular query
> }
>
> If I'm not mistaken, you'll also need to reverse the order of the
> "ORDER BY" and "LIMIT..OFFSET" clauses for MySQL.
>
> I've put all necessary information into ticket #300 in the bugtracking
> system for anyone who's interested in working on this.
> http://pouncequick.420.am/rt/Ticket/Display.html?id=300
>
> Thanks!
>
You're welcome. I just hope it works! ;^)
Don
--
--------------------------------------------------------
Donald L. Greer, Jr dgreer at AustinTX.COM
System Administrator Voice: 512-300-0176
AustinTX http://www.AustinTX.COM/
All opinions are my own. Flame me directly.
"I don't necessarily believe software should be free...
but if you pay for it, it should work!" -- Me
More information about the freeside-devel
mailing list