From: | <noreply(at)pgfoundry(dot)org> |
---|---|
To: | noreply(at)pgfoundry(dot)org |
Subject: | [ psqlodbc-Bugs-1000635 ] Failure with 08.02.0002 / 8.1.3: Cannot read ints of that length |
Date: | 2006-10-20 04:02:12 |
Message-ID: | 20061020040212.5376A216F10@pgfoundry.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Bugs item #1000635, was opened at 2006-05-07 12:05
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000635&group_id=1000125
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Nobody (None)
>Assigned to: Hiroshi Inoue (hinoue)
Summary: Failure with 08.02.0002 / 8.1.3: Cannot read ints of that length
Initial Comment:
I'm trying to get psqlodbc running on OpenBSD 3.9 amd64 and i386 with PostgreSQL 8.1.3, but iodbctest fails. No problems with 8.1.2.
Apps/libs:
iodbc-3.52.4
postgresql-8.1.3
psqlodbc-08.02.0002
My configuration:
$ cat .odbc.ini
;
; odbc.ini
;
[ODBC Data Sources]
PostgreSQL = PostgreSQL ODBC
[ODBC]
TraceFile = stderr
Trace = 0
[PostgreSQL]
Driver = /usr/local/lib/psqlodbc.so
FetchBufferSize = 99
Description = PostgreSQL ODBC driver
Host = localhost
UserName = janus
Password =
Database = janus
ServerOptions =
ConnectOptions =
Options =
ReadOnly = no
RowVersioning = no
ShowSystemTables= no
ShowOidColumn = no
FakeOidIndex = no
Debug = 1
[Default]
Driver = /usr/local/lib/psqlodbc.so
The failing iodbctest:
$ iodbctest "DSN=PostgreSQL"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.0126
1: SQLDriverConnect = Error reading field information;
Cannot read ints of that length (109) SQLSTATE=08S01
The correspondending mylog:
calling getDSNdefaults
CC_connect: entering...
sslmode=disable
original_CC_connect: entering...
original_CC_connect: DSN = 'PostgreSQL', server = '', port = '5432', database = 'janus', username = 'janus', password='xxxxx'
connecting to the server socket...
connection to the server socket succeeded.
sizeof startup packet = 96
sent the authentication block.
sent the authentication block successfully.
gonna do authentication
read 280, global_socket_buffersize=4096
auth got 'R'
areq = 0
auth got 'S'
auth got 'S'
auth got 'S'
auth got 'S'
auth got 'S'
auth got 'S'
Got the PostgreSQL version string: '8.1.3'
Extracted PostgreSQL version number: '8.1'
auth got 'S'
auth got 'S'
auth got 'S'
auth got 'K'
auth got 'Z'
CC_send_settings: entering...
PGAPI_AllocStmt: entering...
**** PGAPI_AllocStmt: hdbc = 49b9e000, stmt = 44ea0000
CC_add_statement: self=49b9e000, stmt=44ea0000
PGAPI_FreeStmt: entering...hstmt=44ea0000, fOption=1
QResult: enter DESTRUCTOR
SC_init_Result(44ea0000)SC_Destructor: self=44ea0000, self->result=0, self->hdbc=49b9e000
APD_free_params: ENTER, self=1156186504
IPD_free_params: ENTER, self=44ea01f0
PDATA_free_params: ENTER, self=44ea02a8
SC_Destructor: EXIT
CC_lookup_lo: entering...
send_query(): conn=49b9e000, query='select oid, typbasetype from pg_type where typname = 'lo''
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 77, global_socket_buffersize=4096
send_query: got id = 'T'
QR_fetch_tuples: cursor = '', self->cursor=0
num_fields = 2
socket error=9 Cannot read ints of that length
READING ATTTYPMOD
CI_read_fields: fieldname='oid', adtid=81788926, adtsize=0, atttypmod=1703936 (rel,att)=(0,0)
socket error=9 Cannot read ints of that length
READING ATTTYPMOD
CI_read_fields: fieldname='ÿÿ', adtid=2037408353, adtsize=29541, atttypmod=1954115681 (rel,att)=(0,116)
CONN ERROR: func=CC_send_query, desc='', errnum=109, errmsg='Error reading field information'
QResult: enter DESTRUCTOR
QResult: in QR_close_result
QResult: free memory in, fcount=0
QResult: free memory out
QResult: enter DESTRUCTOR
QResult: exit close_result
QResult: exit DESTRUCTOR
QResult: enter DESTRUCTOR
Got the large object oid: -999
CC_lookup_characterset: entering...
CONN ERROR: func=PGAPI_DriverConnect, desc='Error from CC_Connect', errnum=109, errmsg='Error reading field information'
[SQLGetDiagRecW]PGAPI_GetDiagRec entering type=2 rec=1
**** PGAPI_ConnectError: hdbc=49b9e000 <512>
enter CC_get_error
enter CC_create_errormsg
msg = 'Error reading field information'
exit CC_create_errormsg
exit CC_get_error
CC_get_error: status = 109, msg = #Error reading field information;
Cannot read ints of that length#
szSqlState = '08S01',len=64, szError='Error reading field information;
Cannot read ints of that length'
PGAPI_GetDiagRec exiting 0
[SQLGetDiagRecW]PGAPI_GetDiagRec entering type=2 rec=2
**** PGAPI_ConnectError: hdbc=49b9e000 <512>
PGAPI_GetDiagRec exiting 100
[SQLGetDiagRecW]PGAPI_GetDiagRec entering type=2 rec=1
**** PGAPI_ConnectError: hdbc=49b9e000 <512>
enter CC_get_error
exit CC_get_error
CC_Get_error returned nothing.
PGAPI_GetDiagRec exiting 100
[[SQLFreeHandle]]PGAPI_FreeConnect: entering...
**** in PGAPI_FreeConnect: hdbc=49b9e000
enter CC_Destructor, self=49b9e000
in CC_Cleanup, self=49b9e000
after CC_abort
SOCK_Destructor
after SOCK destructor
exit CC_Cleanup
after CC_Cleanup
after free statement holders
exit CC_Destructor
PGAPI_FreeConnect: returning...
[[SQLFreeHandle]]**** in PGAPI_FreeEnv: env = 4208f120 **
in EN_Destructor, self=4208f120
exit EN_Destructor: rv = 1
ok
----------------------------------------------------------------------
Comment By: Nobody (None)
Date: 2006-07-02 07:37
Message:
Argh! Stop, revise my last comment about amd64... i tested the wrong binary *selfslap*
The fix DOES work!
Thank you very much :-)
----------------------------------------------------------------------
Comment By: Nobody (None)
Date: 2006-07-02 07:34
Message:
Uhm! I got multiple errors.
First i just found out what was wrong on i386... i need to use ``Servername'' instead of ``Server'' or ``Host'' in odbc.ini.
So my guess that ``server='' in the mylog shows the problem was right, leaving the question wether this is driver dependant.
But on amd64 / PostgreSQL 8.1.4 even with the suggested fix the error remains the same.
----------------------------------------------------------------------
Comment By: Dave Page (dpage)
Date: 2006-05-14 09:32
Message:
Does Hiroshi's suggested fix resolve this issue?
----------------------------------------------------------------------
Comment By: Hiroshi Inoue (hinoue)
Date: 2006-05-09 04:59
Message:
Please change the line 77 in psqlodbc.h
#define Int4 long int
to
#define Int4 int
.
regards,
Hiroshi Inoue
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000635&group_id=1000125
From | Date | Subject | |
---|---|---|---|
Next Message | noreply | 2006-10-20 04:17:26 | [ psqlodbc-Bugs-1000601 ] Strange different behaviour of with SQLColAttribute with SQL_DESC_OCTET or SQL_DESC_LENGHT |
Previous Message | noreply | 2006-10-20 04:00:52 | [ psqlodbc-Bugs-1000678 ] Timeout Not Implemented |