From: Matej Mihelič <Matej.Mihelic@neosys.si>
To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: New bug or regression between 9.6 releases 0410 and 0310
Date: Sun, 6 Aug 2017 07:50:18 +0000
Message-ID: <14be4afe0c3e46219872bf492e3c7b13@neosys.si> (raw)
In-Reply-To: <7f237e45-88ab-bc99-cc11-bfc95f386ae2@dream.email.ne.jp>
References: <5fa150b747df4271b2752d66b92c30f3@neosys.si>
<376580d7-d54d-0e2b-51cb-bd25a60d5c5e@dream.email.ne.jp>
<7f237e45-88ab-bc99-cc11-bfc95f386ae2@dream.email.ne.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Good morning!
I've only made a quick test and nothing more! The new ODBC driver (32-bit 9.6.4.11) is working correctly at least on the record in question.
Thank you very much for such a quick reaction. I have to say that I am very impressed and grateful!
I'll ask my colleagues to test the driver thoroughly tomorrow.
Have a nice day ( or evening 😉 ), Matej.
From: Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
Sent: Sunday, August 6, 2017 7:47 AM
To: Matej Mihelič <Matej.Mihelic@neosys.si>
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] New bug or regression between 9.6 releases 0410 and 0310
Hi Matej,
On 2017/08/05 8:13, Inoue, Hiroshi wrote:
Hi Matej,
Thanks for the report.
Please give me some time.
Could you please try the test drivers 9.6.0411 at
http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
?
regards,
Hiroshi Inoue
regards,
Hiroshi Inoue
On 2017/08/03 21:55, Matej Mihelič wrote:
* New bug or regression between 9.6 releases 0410 and 0310
Win64/Win32 ODBC: With the 0410 release we are seeing a ODBC manager error "[Microsoft][ODBC Driver Manager] Invalid string or buffer length" on a particular row when fetching a BYTEA field. This was a single field SELECT. We can read the value from all preceding rows so it to do something with this field value.
The error disappears when we revert back to the 0310 ODBC release.
I can send you the exact value of the BLOB in a private email if necessary. I've double check the following:
a) LENGTH(contents) from the database does return the expected length: 25560.
b) I took the hex- encoded value from the log file and compared it with the value in the database. The value is the same.
( select LENGTH(contents)=length(test) LenIsEqual, contents=test as ContentIsEqual, * from ( select contents, CAST(E'\\xff0a0054465... )
Excerpt from the log:
[6976-45.657]ColAttSet in
[6976-45.657]updatable=1 tab=1 fields=1[6976-45.657]->1
[6976-45.657]PARSE: searchColInfo by attnum=5
[6976-45.657]PARSE: fieldtype=17, col_name='contents', column_size=-4
[6976-45.658]describeCol: col 0 fieldname = 'contents'
[6976-45.658]describeCol: col 0 fieldtype = 17
[6976-45.658]describeCol: col 0 column_size = -4
[6976-45.658]describeCol: col 0 *pfSqlType = -4
[6976-45.658]describeCol: col 0 *pcbColDef = 0
[6976-45.658]describeCol: col 0 *pibScale = 0
[6976-45.658]describeCol: col 0 *pfNullable = 1
[6976-45.659]DiscardStatementSvp:in_progress=0 previous=0
[6976-45.659][SQLBindCol][6976-45.659]PGAPI_BindCol: entering...
[6976-45.659]**** PGAPI_BindCol: stmt = 044D2F00, icol = 1
[6976-45.659]**** : fCType=-2 rgb=00000000 valusMax=0 pcb=03623A84
[6976-45.659]extend_getdata_info: entering ... self=044D3088, gdata_allocated=0, num_columns=1
[6976-45.660]exit extend_gdata_info=044D79C8
[6976-45.660][SQLNumResultCols][6976-45.660]PGAPI_NumResultCols: entering...
[6976-45.660]SC_describe: status = 3
[6976-45.660]PGAPI_NumResultCols: result = 04473E90, status = 3, numcols = 1
[6976-45.661][[SQLGetDiagField]] Handle=(3,044D2F00) Rec=1 Id=12 info=(06C1FD2C,-6)
[6976-45.661]PGAPI_GetDiagField entering rec=1[6976-45.661]PGAPI_GetDiagField exiting -1
[6976-45.661][SQLDescribeCol][6976-45.661]PGAPI_DescribeCol: entering.1..
[6976-45.661]PARSE: fieldtype=17, col_name='contents', column_size=-4
[6976-45.661]describeCol: col 0 fieldname = 'contents'
[6976-45.662]describeCol: col 0 fieldtype = 17
[6976-45.662]describeCol: col 0 column_size = -4
[6976-45.662]describeCol: col 0 *pfSqlType = -4
[6976-45.662]describeCol: col 0 *pcbColDef = 0
[6976-45.662]describeCol: col 0 *pibScale = 0
[6976-45.662]describeCol: col 0 *pfNullable = 1
[6976-45.663][SQLFreeStmt][6976-45.663]PGAPI_FreeStmt: entering...hstmt=044D2F00, fOption=2
[6976-45.663]reset_a_column_binding: entering ... self=044D2F90, bindings_allocated=1, icol=1
[6976-45.663][SQLRowCount][6976-45.663]PGAPI_RowCount: entering...
[6976-45.663]RowCount=-1
[6976-45.663][SQLBindCol][6976-45.664]PGAPI_BindCol: entering...
[6976-45.664]**** PGAPI_BindCol: stmt = 044D2F00, icol = 1
[6976-45.664]**** : fCType=-2 rgb=00000000 valusMax=0 pcb=03623A84
[6976-45.664][[SQLFetch]][6976-45.664]PGAPI_ExtendedFetch: stmt=044D2F00 rowsetSize=1
[6976-45.664]SQL_FETCH_NEXT: num_tuples=2147483647, currtuple=-1, rowst=-1
[6976-45.665]PGAPI_ExtendedFetch: new currTuple = -1
[6976-45.665]fetch_cursor=1, 04473E90->total_read=100
[6976-45.665]QR_next_tuple: fetch_number < fcount: returning tuple 0, fcount = 100
[6976-45.665]fetch: cols=1, lf=0, opts = 044D2F90, opts->bindings = 044D79A8, buffer[] = 00000000
[6976-45.665][SQLGetData][6976-45.665]PGAPI_GetData: enter, stmt=044D2F00 icol=1
[6976-45.666] socket: value = '\xff0a005446524d4142435f534b4c455049003010b825000054504630f10e5466726d4142435f736b6c6570690d66726d4142435f736b6c657069044c65667403b20203546f7003ea000743617074696f6e062d536b72626e696b20696e20646174756d206f6264656c616e65676120
...
20546f70203d203136320d0a2020656e640d0a656e640d0a'
[6976-45.817]**** PGAPI_GetData: icol = 0, target_type = -2, field_type = 17, value = '\xff0a005446524d4142435f534b4c455049003010b825000054504630f10e5466726d4142435f736b6c6570690d66726d4142435f736b6c657069044c65667403b20203546f7003ea000743617074696f6e062d536b72626e696b20696e20646174756d206f6264656c616e65676120
...
20546f70203d203136320d0a2020656e640d0a656e640d0a'
[6976-45.968]copy_and_convert: field_type = 17, fctype = -2, value = '\xff0a005446524d4142435f534b4c455049003010b825000054504630f10e5466726d4142435f736b6c6570690d66726d4142435f736b6c657069044c65667403b20203546f7003ea000743617074696f6e062d536b72626e696b20696e20646174756d206f6264656c616e65676120
...
20546f70203d203136320d0a2020656e640d0a656e640d0a', cbValueMax=32752
[6976-46.123]convert_text_field_to_sql_c:field_type=17 type=-2
[6976-46.123]convert_from_pgbinary: in=51120, out = 25560
[6976-46.123]convert_from_pgbinary: in=51120, out = 25560
[6976-46.124]DEFAULT: len = 25560, ptr = '��[6976-46.124] SQL_C_BINARY, default: len = 25560, cbValueMax = 32752, rgbValueBindRow = '��[6976-46.124]STATEMENT WARNING: func=PGAPI_GetData, desc='', errnum=-2, errmsg='The buffer was too small for the GetData.'
[6976-46.125][SQLCancel][6976-46.125]PGAPI_Cancel: entering...
[6736-54.703][SQLFreeStmt][6736-54.703]PGAPI_FreeStmt: entering...hstmt=044D2F00, fOption=0
[6736-54.703]SC_recycle_statement: self= 044D2F00
[6736-54.703]!!!refcnt 044DA020:1 -> 0
[6736-54.703]SC_set_Result(44d2f00, 0)[6736-54.704]QResult: enter DESTRUCTOR
-- Regards, Matej.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: Matej.Mihelic@neosys.si, h-inoue@dream.email.ne.jp
Subject: Re: New bug or regression between 9.6 releases 0410 and 0310
In-Reply-To: <14be4afe0c3e46219872bf492e3c7b13@neosys.si>
References: <5fa150b747df4271b2752d66b92c30f3@neosys.si> <376580d7-d54d-0e2b-51cb-bd25a60d5c5e@dream.email.ne.jp> <7f237e45-88ab-bc99-cc11-bfc95f386ae2@dream.email.ne.jp> <14be4afe0c3e46219872bf492e3c7b13@neosys.si>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox