[svn:dbi] r14194 - dbi/trunk/lib/DBI/DBD

[email protected]
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: hmbrand
Date: Tue Jun 29 01:18:36 2010
New Revision: 14194

Modified:
   dbi/trunk/lib/DBI/DBD/SqlEngine.pm

Log:
Fix assert failure for NAME_lc and NAME_uc

Modified: dbi/trunk/lib/DBI/DBD/SqlEngine.pm
==============================================================================
--- dbi/trunk/lib/DBI/DBD/SqlEngine.pm	(original)
+++ dbi/trunk/lib/DBI/DBD/SqlEngine.pm	Tue Jun 29 01:18:36 2010
@@ -806,8 +806,13 @@
 {
     my ( $sth, $attrib ) = @_;
 
-    $attrib eq "NAME"
-      and return [ $sth->sql_get_colnames() ];
+    if ( $attrib =~ m/^NAME(?:|_lc|_uc)$/ )
+    {
+	my @cn = $sth->sql_get_colnames();
+	return [ $attrib eq "NAME_lc" ? map { lc $_ } @cn
+	       : $attrib eq "NAME_uc" ? map { uc $_ } @cn
+	       : @cn ];
+    }
 
     if ( $attrib eq "NULLABLE" )
     {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.