perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <pgollu...@p6m7g8.com>
Subject Re: [RFC PATCH BUG DBI] Apache::AuthDBI broken
Date Tue, 04 Apr 2006 00:26:56 GMT
pedersen@meridian-enviro.com wrote:
> I just noticed one additional tweak that would be worth adding to your list:
> 
> It would be good to add "DISTINCT" to the group select statement...  That
> is, change (after my patch):
>   my $select    = "SELECT $Attr->{grp_field}, $Attr->{uid_field}";
> to:
>   my $select    = "SELECT DISTINCT $Attr->{grp_field}, $Attr->{uid_field}";
> 
> Consider the following setting:
> 
>   PerlSetVar Auth_DBI_grp_whereclause    "users.superuser = 'Y' OR
> (users.id = user_groups.user_id AND user_groups.group_id = groups.id)"
> 
> This currently results in a *VERY* long list of groups when a superuser
> logs in.  :)
> 
> I don't think there's any down-side to adding DISTINCT.  (Is it standard
> sql?  I think it probably is, but I don't have a reference.)  If there
> is, it would be worth adding another yes/no knob to the config.
I'll go the knob root, b/c DISTINCT requires more work on the database.  The 
term is escaping me at the moment *sigh*

-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Mime
View raw message