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

ODBC datatype conversion for INTEGER not working properly #3392

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

ODBC datatype conversion for INTEGER not working properly #3392

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2013-11-02 14:58:46 +0100
From: Baraa <>
To: clients devs <>
Version: 11.15.17 (Feb2013-SP5)
CC: bem85

Last updated: 2013-12-03 13:59:31 +0100

Comment 19315

Date: 2013-11-02 14:58:46 +0100
From: Baraa <>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Build Identifier:

I have oracle 11g database (64bit) on "host1" and monetdb (64bit) on "host2"
Using Monetdb ODBC driver I created a dblink from oracle to MonetDB.

some queries are working correctly but other queries are either giving some connection errors or returning the results with wrong values( datatype conversion). For my case it is the Integer column who poses a problem.

Reproducible: Always

Steps to Reproduce:

  1. In oracle I created a DB link "monora" (I used unixODBC as ODBC driver manager)
  2. in monetDB I have the following table

CREATE TABLE "sys"."patientc" (
"id" INTEGER,
"age" INTEGER,
"mothername" VARCHAR(30),
"city" VARCHAR(20)
);

  1. In oracle: I execute the following query:
    select "id" from "patientc"@monora where rownum<20;

Actual Results:

ID

 1

8589934592
2
1.2885E+10
3
1.7180E+10
4
2.1475E+10
5
2.5770E+10
6
3.0065E+10
7
3.4360E+10
8
3.8655E+10
9
4.2950E+10
10

Expected Results:

ID

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Comment 19316

Date: 2013-11-02 15:04:10 +0100
From: Baraa <>

Created attachment 248
the attachmenet is the odbc log file

Attached file: sql.log (text/plain, 135921 bytes)
Description: the attachmenet is the odbc log file

Comment 19317

Date: 2013-11-02 15:16:42 +0100
From: Baraa <>

In the log file you find the errors produced when executing the same query four times.
One of the executions, does not give error but it retreives the integer values as shown in the actual results.

Comment 19325

Date: 2013-11-06 11:49:50 +0100
From: MonetDB Mercurial Repository <>

Changeset 4cfad18a81ae made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

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

Changeset description:

SQL_C_SLONG refers to 32 bit int, not to potentially 64 bit long.
This hopefully fixes bug #3392.

Comment 19350

Date: 2013-11-20 11:12:51 +0100
From: @sjoerdmullender

I'm assuming the patch fixed the problem. If not, please reopen.

Comment 19374

Date: 2013-12-03 13:59:31 +0100
From: @sjoerdmullender

Feb2013-SP6 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant