pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
New bug or regression between 9.6 releases 0410 and 0310
5+ messages / 3 participants
[nested] [flat]

* New bug or regression between 9.6 releases 0410 and 0310
@ 2017-08-03 12:55  Matej Mihelič <Matej.Mihelic@neosys.si>
  0 siblings, 2 replies; 5+ messages in thread

From: Matej Mihelič @ 2017-08-03 12:55 UTC (permalink / raw)
  To: pgsql-odbc

* 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.

-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: New bug or regression between 9.6 releases 0410 and 0310
@ 2017-08-04 19:59  Mateusz Loskot <mateusz@loskot.net>
  parent: Matej Mihelič <Matej.Mihelic@neosys.si>
  1 sibling, 0 replies; 5+ messages in thread

From: Mateusz Loskot @ 2017-08-04 19:59 UTC (permalink / raw)
  To: Matej Mihelič <Matej.Mihelic@neosys.si>; +Cc: pgsql-odbc

On 4 Aug 2017 21:44, "Matej Mihelič" <Matej.Mihelic@neosys.si> 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.



See also my thread "COLUMN_SIZE for bytea now equals -4 (09.05 vs 09.06)"

https://www.postgresql.org/message-id/CABUeae9TP1500h6OTkabGuXZSAPjTrwWb%2BV47ixrGY7BcFdDtw%40mail.g...

-- 
Mateusz

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: New bug or regression between 9.6 releases 0410 and 0310
@ 2017-08-04 23:13  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Matej Mihelič <Matej.Mihelic@neosys.si>
  1 sibling, 1 reply; 5+ messages in thread

From: Inoue, Hiroshi @ 2017-08-04 23:13 UTC (permalink / raw)
  To: Matej Mihelič <Matej.Mihelic@neosys.si>; +Cc: pgsql-odbc

Hi Matej,

Thanks for the report.
Please give me some time.

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.



-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: New bug or regression between 9.6 releases 0410 and 0310
@ 2017-08-06 05:47  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  0 siblings, 1 reply; 5+ messages in thread

From: Inoue, Hiroshi @ 2017-08-06 05:47 UTC (permalink / raw)
  To: Matej Mihelič <Matej.Mihelic@neosys.si>; +Cc: pgsql-odbc

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/ 
<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.
>
>
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: New bug or regression between 9.6 releases 0410 and 0310
@ 2017-08-06 07:50  Matej Mihelič <Matej.Mihelic@neosys.si>
  parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  0 siblings, 0 replies; 5+ messages in thread

From: Matej Mihelič @ 2017-08-06 07:50 UTC (permalink / raw)
  To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>; +Cc: pgsql-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.





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2017-08-06 07:50 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 12:55 New bug or regression between 9.6 releases 0410 and 0310 Matej Mihelič <Matej.Mihelic@neosys.si>
2017-08-04 19:59 ` Mateusz Loskot <mateusz@loskot.net>
2017-08-04 23:13 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2017-08-06 05:47   ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2017-08-06 07:50     ` Matej Mihelič <Matej.Mihelic@neosys.si>

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