FreeBSD Bugzilla – Attachment 144512 Details for
Bug 191734
Patch for p5-DBIx-SearchBuilder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
p5-DBIx-SearchBuilder patch for performance/case-sensitivity
p5-DBIx-SearchBuilder-patch.diff (text/plain), 2.92 KB, created by
Michelle Sullivan
on 2014-07-08 10:14:26 UTC
(
hide
)
Description:
p5-DBIx-SearchBuilder patch for performance/case-sensitivity
Filename:
MIME Type:
Creator:
Michelle Sullivan
Created:
2014-07-08 10:14:26 UTC
Size:
2.92 KB
patch
obsolete
>diff -Nru p5-DBIx-SearchBuilder.orig/Makefile p5-DBIx-SearchBuilder/Makefile >--- p5-DBIx-SearchBuilder.orig/Makefile 2014-07-07 21:29:15.000000000 -0500 >+++ p5-DBIx-SearchBuilder/Makefile 2014-07-08 05:12:12.000000000 -0500 >@@ -25,4 +25,14 @@ > USES= perl5 > USE_PERL5= configure > >+OPTIONS_DEFINE= PERFORMANCE >+PERFORMANCE_DESC= Makes ->Fields() Case-Sensitive (see man page for warnings) >+ >+.include <bsd.port.options.mk> >+ >+.if ${PORT_OPTIONS:MPERFORMANCE} >+EXTRA_PATCHES+= ${FILESDIR}/optionalpatch-lib__DBIx__SearchBuilder__Handle.pm \ >+ ${FILESDIR}/optionalpatch-lib__DBIx__SearchBuilder.pm >+.endif >+ > .include <bsd.port.mk> >diff -Nru p5-DBIx-SearchBuilder.orig/files/optionalpatch-lib__DBIx__SearchBuilder.pm p5-DBIx-SearchBuilder/files/optionalpatch-lib__DBIx__SearchBuilder.pm >--- p5-DBIx-SearchBuilder.orig/files/optionalpatch-lib__DBIx__SearchBuilder.pm 1969-12-31 18:00:00.000000000 -0600 >+++ p5-DBIx-SearchBuilder/files/optionalpatch-lib__DBIx__SearchBuilder.pm 2014-07-08 04:58:42.000000000 -0500 >@@ -0,0 +1,16 @@ >+--- ./lib/DBIx/SearchBuilder.pm.orig 2013-07-03 18:40:21.000000000 -0500 >++++ ./lib/DBIx/SearchBuilder.pm 2014-07-08 04:58:35.000000000 -0500 >+@@ -1785,9 +1785,11 @@ >+ >+ =head2 Fields TABLE >+ >+-Return a list of fields in TABLE, lowercased. >++Return a list of fields in TABLE >+ >+-TODO: Why are they lowercased? >++Note: this is a FreeBSD optionally patched version and both the table >++names and the field names are case-sensitive. This could break >++applications that assume everything is lowercased. >+ >+ =cut >+ >diff -Nru p5-DBIx-SearchBuilder.orig/files/optionalpatch-lib__DBIx__SearchBuilder__Handle.pm p5-DBIx-SearchBuilder/files/optionalpatch-lib__DBIx__SearchBuilder__Handle.pm >--- p5-DBIx-SearchBuilder.orig/files/optionalpatch-lib__DBIx__SearchBuilder__Handle.pm 1969-12-31 18:00:00.000000000 -0600 >+++ p5-DBIx-SearchBuilder/files/optionalpatch-lib__DBIx__SearchBuilder__Handle.pm 2014-07-08 04:58:42.000000000 -0500 >@@ -0,0 +1,23 @@ >+--- ./lib/DBIx/SearchBuilder/Handle.pm.orig 2013-06-06 14:06:18.000000000 -0500 >++++ ./lib/DBIx/SearchBuilder/Handle.pm 2014-07-08 04:58:05.000000000 -0500 >+@@ -1430,16 +1430,16 @@ >+ my $self = shift; >+ my $table = shift; >+ >+- unless ( keys %FIELDS_IN_TABLE ) { >+- my $sth = $self->dbh->column_info( undef, '', '%', '%' ) >++ unless ( keys %FIELDS_IN_TABLE && exists $FIELDS_IN_TABLE{$table} ) { >++ my $sth = $self->dbh->column_info( undef, '', $table, '%' ) >+ or return (); >+ my $info = $sth->fetchall_arrayref({}); >+ foreach my $e ( @$info ) { >+- push @{ $FIELDS_IN_TABLE{ lc $e->{'TABLE_NAME'} } ||= [] }, lc $e->{'COLUMN_NAME'}; >++ push @{ $FIELDS_IN_TABLE{ $e->{'TABLE_NAME'} } ||= [] }, $e->{'COLUMN_NAME'}; >+ } >+ } >+ >+- return @{ $FIELDS_IN_TABLE{ lc $table } || [] }; >++ return @{ $FIELDS_IN_TABLE{ $table } || [] }; >+ } >+ >+ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 191734
: 144512