Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResultSet returns double quoted column name if name contains space characters #6183

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working Client interfaces major

Comments

@monetdb-team
Copy link

Date: 2017-01-11 16:24:30 +0100
From: Antonio <>
To: clients devs <>
Version: 11.25.3 (Dec2016)
CC: martin.van.dinther

Last updated: 2017-07-13 16:56:07 +0200

Comment 24879

Date: 2017-01-11 16:24:30 +0100
From: Antonio <>

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier:

Say you have a table with a column named 'my column' (no singles quote included)
If you execute any query the ResultSetMetaData.getColumnLabel and getColumnName methods will return a String equals to '"my column"', including the double quotes characters.
Previous version of MonetDB used to return just the name of the column without this additional double quotes.
If you compare this behaviour with other vendors out there it is clear that the previous behaviour was fine and now this seems a bug.

Reproducible: Always

Steps to Reproduce:

  1. Create a table e.g. 'my_table' with a field called 'my column' (no single quotes included)
  2. execute SELECT * from my_table;
  3. The ResultSetMetaData.getColumnName will return a String containing '"my_column"' instead of 'my_column'

Actual Results:

"my column"

Expected Results:

my column

Comment 24897

Date: 2017-01-19 15:55:40 +0100
From: Martin van Dinther <<martin.van.dinther>>

I can reproduce this problem with monetdb-jdbc-2.24.jar.

A root case analysis showed that in Oct2014-SP1 release the format of the MAPI column names header has been changed to allow correct parsing of names which contain a space or comma or tab or or ". See bug #3616.

The MonetDB JDBC driver has not been adapted to the new MAPI format, hence you experience this problem. We will start work on correcting this.

Comment 24899

Date: 2017-01-19 18:28:04 +0100
From: Antonio <>

(In reply to Martin van Dinther from comment 1)

I can reproduce this problem with monetdb-jdbc-2.24.jar.

A root case analysis showed that in Oct2014-SP1 release the format of the
MAPI column names header has been changed to allow correct parsing of names
which contain a space or comma or tab or or ". See bug #3616.

The MonetDB JDBC driver has not been adapted to the new MAPI format, hence
you experience this problem. We will start work on correcting this.

Thank you for your message, indeed it is reproducible regardless the jdbc driver version (I tried with 2.11 to 2.24)

Comment 24900

Date: 2017-01-19 19:08:31 +0100
From: MonetDB Mercurial Repository <>

Changeset 839ffec1d36d, made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the monetdb-java repo, refers to this bug.

For complete details, see http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=839ffec1d36d

Changeset description:

Fix for bug #6183.
Also created and added test program to test get column names & lables of columns containing a space or a comma or a tab or a  or a combination of tab and comma or an escaped ".

Comment 24901

Date: 2017-01-19 19:29:20 +0100
From: Martin van Dinther <<martin.van.dinther>>

Created attachment 532
patched MonetDB JDBC driver with fix for issue 6183 for testing

Hi Antonio,

I attached a patched MonetDB JDBC driver, see monetdb-jdbc-2.24-fix6183.jar
This allows you to test the fix for your configuration/use case before we create a new release.
Let us know if it resolves your reported issue.

Thx,
Martino

Attached file: monetdb-jdbc-2.24-fix6183.jar (text/plain, 124694 bytes)
Description: patched MonetDB JDBC driver with fix for issue 6183 for testing

Comment 25144

Date: 2017-03-09 15:38:05 +0100
From: MonetDB Mercurial Repository <>

Changeset 8ac493d731ca made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8ac493d731ca

Changeset description:

Add invocation and test results of new jdbc test for bug #6183.

Comment 25145

Date: 2017-03-09 16:17:54 +0100
From: Martin van Dinther <<martin.van.dinther>>

Fix will be included in next release of the JDBC driver (monetdb-jdbc-2.25.jar)

Comment 25463

Date: 2017-07-13 16:56:07 +0200
From: MonetDB Mercurial Repository <>

Changeset 890dce2d5305, made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the monetdb-java repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=890dce2d5305

Changeset description:

Merged changes for Bug #6183
@monetdb-team monetdb-team added bug Something isn't working Client interfaces major labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Client interfaces major
Projects
None yet
Development

No branches or pull requests

2 participants