DO NOT REPLY [Bug 43831] New: - Unexpected Result with mysql jdbc 5.1.5, column aliases not reported

[email protected]
Newsgroups gmane.comp.jakarta.taglibs.devel
Message-ID <[email protected]/bugzilla/>
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43831>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43831

           Summary: Unexpected Result with mysql jdbc 5.1.5, column aliases
                    not reported
           Product: Taglibs
           Version: 1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Standard Taglib
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Unexpected Result with mysql jdbc 5.1.5, column aliases not reported
see http://bugs.mysql.com/bug.php?id=21596

I suggest changing getColumnName to getColumnLabel.

Index: C:/dev/jee/workspace/standard/src/javax/servlet/jsp/jstl/sql/ResultImpl.java
===================================================================
---
C:/dev/jee/workspace/standard/src/javax/servlet/jsp/jstl/sql/ResultImpl.java
(revision 593646)
+++
C:/dev/jee/workspace/standard/src/javax/servlet/jsp/jstl/sql/ResultImpl.java
(working copy)
@@ -67,7 +67,7 @@
         // Create the column name array
         columnNames = new String[noOfColumns];
         for (int i = 1; i <= noOfColumns; i++) {
-            columnNames[i-1] = rsmd.getColumnName(i);
+            columnNames[i-1] = rsmd.getColumnLabel(i);
         }
 
         // Throw away all rows upto startRow

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
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.