You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2009/03/27 21:21:37 UTC
DO NOT REPLY [Bug 46932] New: alias given in select statement is not
used as column header in response data for a JDBC request
https://issues.apache.org/bugzilla/show_bug.cgi?id=46932
Summary: alias given in select statement is not used as column
header in response data for a JDBC request
Product: JMeter
Version: 2.3.2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: mark.aronszajn@openmarket.com
If you use an alias for an existing column name in a select statement used
within a JDBCSampler request, the original column name is returned with the
response data rather than the alias proposed. Any DB client will return the
given alias as a column header and so should JMeter's JDBCSampler.
For example, if the column is 'expected_arrival_time' and the query is
select residential_street_address as address from residence where id = 3;
the response data element will be
<responseData class="java.lang.String">residential_street_address
222 W. 58th Avenue</responseData>
One exceptional case: if the alias is given for a derived column in a view, the
alias is used as expected.
This derives from behavior of methods in ResultSetMetaData. In the Sampler
code, the ResultSetMetaData getColumnName(int) method is used to retrieve a
column header rather than getColumnLabel(int). I believe the latter always
gives the appropriate result.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 46932] alias given in select statement is not used
as column header in response data for a JDBC request
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46932
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Sebb <se...@apache.org> 2009-04-03 02:32:32 PST ---
This has been fixed in SVN as part of Bug 46522
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 46932] alias given in select statement is not used
as column header in response data for a JDBC request
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46932
--- Comment #1 from mark.aronszajn@openmarket.com 2009-03-27 13:24:06 PST ---
(In reply to comment #0)
> If you use an alias for an existing column name in a select statement used
> within a JDBCSampler request, the original column name is returned with the
> response data rather than the alias proposed. Any DB client will return the
> given alias as a column header and so should JMeter's JDBCSampler.
>
> For example, if the column is 'expected_arrival_time' and the query is
>
> select residential_street_address as address from residence where id = 3;
>
> the response data element will be
>
> <responseData class="java.lang.String">residential_street_address
> 222 W. 58th Avenue</responseData>
>
> One exceptional case: if the alias is given for a derived column in a view, the
> alias is used as expected.
>
> This derives from behavior of methods in ResultSetMetaData. In the Sampler
> code, the ResultSetMetaData getColumnName(int) method is used to retrieve a
> column header rather than getColumnLabel(int). I believe the latter always
> gives the appropriate result.
Of course, where I begin to give my example and say, "...if the column is
'expected_arrival_time' and...", I meant to put 'residential_street_address'.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org