You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Nicola Ambrosetti Brolin <am...@gmail.com> on 2014/04/05 21:20:10 UTC

Re: JDBC sampler and sql "select ... as ..."

I've reopened bug
https://issues.apache.org/bugzilla/show_bug.cgi?id=46932to address
this issue. In a nutshell: we should use
ResultSetMetaData.getColumnLabel instead of ResultSetMetaData.getColumnName
in src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java



On 24 March 2014 08:00, Nicola Ambrosetti Brolin <
ambrosetti.nicola@gmail.com> wrote:

> I'm having some trouble with the JDBC sampler: when issuing a sql select
> query of the form
>
> select field1, field2 as alias2 from mytable;
>
> the resulting response has the fields named (field1, field2) instead of
> the expected (field1, alias2). I'm using mysql and I've checked the queries
> directly via the command line and there I get the correct result. I've
> stumbled upon this problem when joining two tables with the same field
> names.
>
> Anyone else had the same problem?
>
> Regards,
>
> Nicola
>