Thread: 09.03.0400 broken on 32bit

09.03.0400 broken on 32bit

From
Christoph Berg
Date:
Hi,

09.03.0400 is broken on all 32bit architectures:

https://buildd.debian.org/status/logs.php?pkg=psqlodbc&ver=1%3A09.03.0400-1

============== creating database "contrib_regression" ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries        ==============
test sampletables             ... ok
test connect                  ... ok
test stmthandles              ... ok
test select                   ... ok
test commands                 ... ok
test multistmt                ... ok
test getresult                ... ok
test result-conversions       ... FAILED
test prepare                  ... ok
test params                   ... ok
test notice                   ... ok
test arraybinding             ... ok
test insertreturning          ... ok
test dataatexecution          ... ok
test boolsaschar              ... ok
test cvtnulldate              ... ok
test alter                    ... ok
test quotes                   ... ok
test cursors                  ... ok
test cursor-commit            ... ok
test positioned-update        ... ok
test catalogfunctions         ... ok
test bindcol                  ... ok
test lfconversion             ... ok
test cte                      ... ok
test deprecated               ... ok
test error-rollback           ... ok
test diagnostic               ... ok
test numeric                  ... ok
test odbc-escapes             ... ok

=======================
 1 of 30 tests failed.
=======================

The differences that caused some tests to fail can be viewed in the
file "/home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/regression.diffs".  A copy of the test summary that you see
above is saved in the file "/home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/regression.out".

/usr/lib/postgresql/9.4/lib/pgxs/src/makefiles/pgxs.mk:297: recipe for target 'installcheck' failed
make[1]: *** [installcheck] Error 1
make[1]: Leaving directory '/home/cbe/projects/postgresql/psqlodbc/psqlodbc/test'
regression.diffs:
*** /home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/expected/result-conversions.out    2014-10-26
07:08:38.000000000+0100 
--- /home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/results/result-conversions.out    2014-11-12
13:18:49.990297759+0100 
***************
*** 356,371 ****
  'textdata' (text) as SQL_C_INTERVAL_MINUTE_TO_SECOND: interval sign: 0 unknown interval type: 0
  '3234567901' (oid) as SQL_C_CHAR: 3234567901
  '3234567901' (oid) as SQL_C_WCHAR: 3234567901
! '3234567901' (oid) as SQL_C_SSHORT: -26915
! '3234567901' (oid) as SQL_C_USHORT: 38621
! '3234567901' (oid) as SQL_C_SLONG: -1060399395
  '3234567901' (oid) as SQL_C_ULONG: 3234567901
  '3234567901' (oid) as SQL_C_FLOAT: 3234567936.000000
  '3234567901' (oid) as SQL_C_DOUBLE: 3234567901.000000
! '3234567901' (oid) as SQL_C_BIT: 221
! '3234567901' (oid) as SQL_C_STINYINT: -35
! '3234567901' (oid) as SQL_C_UTINYINT: 221
! '3234567901' (oid) as SQL_C_SBIGINT: 3234567901
  '3234567901' (oid) as SQL_C_UBIGINT: 3234567901
  '3234567901' (oid) as SQL_C_BINARY: SQLGetData failed
  07006=Received an unsupported type from Postgres.
--- 356,371 ----
  'textdata' (text) as SQL_C_INTERVAL_MINUTE_TO_SECOND: interval sign: 0 unknown interval type: 0
  '3234567901' (oid) as SQL_C_CHAR: 3234567901
  '3234567901' (oid) as SQL_C_WCHAR: 3234567901
! '3234567901' (oid) as SQL_C_SSHORT: -1
! '3234567901' (oid) as SQL_C_USHORT: 65535
! '3234567901' (oid) as SQL_C_SLONG: 2147483647
  '3234567901' (oid) as SQL_C_ULONG: 3234567901
  '3234567901' (oid) as SQL_C_FLOAT: 3234567936.000000
  '3234567901' (oid) as SQL_C_DOUBLE: 3234567901.000000
! '3234567901' (oid) as SQL_C_BIT: 255
! '3234567901' (oid) as SQL_C_STINYINT: -1
! '3234567901' (oid) as SQL_C_UTINYINT: 255
! '3234567901' (oid) as SQL_C_SBIGINT: -1060399395
  '3234567901' (oid) as SQL_C_UBIGINT: 3234567901
  '3234567901' (oid) as SQL_C_BINARY: SQLGetData failed
  07006=Received an unsupported type from Postgres.

======================================================================

/home/cbe/tmp/pg_virtualenv.PhAgYW/log/postgresql-9.4-regress.log:
2014-11-12 13:18:43 CET [5632-1] LOG:  konnte IPv4-Socket nicht binden: Die Adresse wird bereits verwendet
2014-11-12 13:18:43 CET [5632-2] TIPP:  Läuft bereits ein anderer Postmaster auf Port 5433? Wenn nicht, warten Sie
einigeSekunden und versuchen Sie erneut. 
2014-11-12 13:18:43 CET [5633-1] LOG:  Datenbanksystem wurde am 2014-11-12 13:18:42 CET heruntergefahren
2014-11-12 13:18:43 CET [5632-3] LOG:  Datenbanksystem ist bereit, um Verbindungen anzunehmen
2014-11-12 13:18:43 CET [5637-1] LOG:  Autovacuum-Launcher startet
2014-11-12 13:18:43 CET [5639-1] [unbekannt]@[unbekannt] LOG:  unvollständiges Startpaket
2014-11-12 13:18:52 CET [6108-1] cbe@contrib_regression ERROR:  relation "table_not_here" does not exist at character
13
2014-11-12 13:18:52 CET [6108-2] cbe@contrib_regression STATEMENT:  INSERT INTO table_not_here VALUES (1)
2014-11-12 13:18:52 CET [6117-1] cbe@contrib_regression ERROR:  invalid input syntax for integer: "foo" at character 30
2014-11-12 13:18:52 CET [6117-2] cbe@contrib_regression STATEMENT:  INSERT INTO errortab VALUES ('foo')
2014-11-12 13:18:52 CET [6118-1] cbe@contrib_regression ERROR:  invalid input syntax for integer: "foo" at character 30
2014-11-12 13:18:52 CET [6118-2] cbe@contrib_regression STATEMENT:  INSERT INTO errortab VALUES ('foo')
2014-11-12 13:18:52 CET [6119-1] cbe@contrib_regression ERROR:  invalid input syntax for integer: "foo" at character 30
2014-11-12 13:18:52 CET [6119-2] cbe@contrib_regression STATEMENT:  INSERT INTO errortab VALUES ('foo')
2014-11-12 13:18:52 CET [6127-1] cbe@contrib_regression ERROR:  syntax error at or near "broken" at character 1
2014-11-12 13:18:52 CET [6127-2] cbe@contrib_regression STATEMENT:  broken query
2014-11-12 13:18:52 CET [6127-3] cbe@contrib_regression FATAL:  terminating connection due to administrator command
2014-11-12 13:18:52 CET [6127-4] cbe@contrib_regression STATEMENT:  select
pg_terminate_backend(pg_backend_pid());select1;select 1  
Stopping cluster 9.4/regress...


Mit freundlichen Grüßen,
Christoph Berg
--
Senior Berater, Tel.: +49 (0)21 61 / 46 43-187
credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
pgp fingerprint: 5C48 FE61 57F4 9179 5970  87C6 4C5A 6BAB 12D2 A7AE


Re: 09.03.0400 broken on 32bit

From
Heikki Linnakangas
Date:
On 11/12/2014 02:21 PM, Christoph Berg wrote:
> Hi,
>
> 09.03.0400 is broken on all 32bit architectures:
>
> https://buildd.debian.org/status/logs.php?pkg=psqlodbc&ver=1%3A09.03.0400-1
>
> ...
>
> *** /home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/expected/result-conversions.out    2014-10-26
07:08:38.000000000+0100 
> --- /home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/results/result-conversions.out    2014-11-12
13:18:49.990297759+0100 
> ***************
> *** 356,371 ****
>    'textdata' (text) as SQL_C_INTERVAL_MINUTE_TO_SECOND: interval sign: 0 unknown interval type: 0
>    '3234567901' (oid) as SQL_C_CHAR: 3234567901
>    '3234567901' (oid) as SQL_C_WCHAR: 3234567901
> ! '3234567901' (oid) as SQL_C_SSHORT: -26915
> ! '3234567901' (oid) as SQL_C_USHORT: 38621
> ! '3234567901' (oid) as SQL_C_SLONG: -1060399395
>    '3234567901' (oid) as SQL_C_ULONG: 3234567901
>    '3234567901' (oid) as SQL_C_FLOAT: 3234567936.000000
>    '3234567901' (oid) as SQL_C_DOUBLE: 3234567901.000000
> ! '3234567901' (oid) as SQL_C_BIT: 221
> ! '3234567901' (oid) as SQL_C_STINYINT: -35
> ! '3234567901' (oid) as SQL_C_UTINYINT: 221
> ! '3234567901' (oid) as SQL_C_SBIGINT: 3234567901
>    '3234567901' (oid) as SQL_C_UBIGINT: 3234567901
>    '3234567901' (oid) as SQL_C_BINARY: SQLGetData failed
>    07006=Received an unsupported type from Postgres.
> --- 356,371 ----
>    'textdata' (text) as SQL_C_INTERVAL_MINUTE_TO_SECOND: interval sign: 0 unknown interval type: 0
>    '3234567901' (oid) as SQL_C_CHAR: 3234567901
>    '3234567901' (oid) as SQL_C_WCHAR: 3234567901
> ! '3234567901' (oid) as SQL_C_SSHORT: -1
> ! '3234567901' (oid) as SQL_C_USHORT: 65535
> ! '3234567901' (oid) as SQL_C_SLONG: 2147483647
>    '3234567901' (oid) as SQL_C_ULONG: 3234567901
>    '3234567901' (oid) as SQL_C_FLOAT: 3234567936.000000
>    '3234567901' (oid) as SQL_C_DOUBLE: 3234567901.000000
> ! '3234567901' (oid) as SQL_C_BIT: 255
> ! '3234567901' (oid) as SQL_C_STINYINT: -1
> ! '3234567901' (oid) as SQL_C_UTINYINT: 255
> ! '3234567901' (oid) as SQL_C_SBIGINT: -1060399395
>    '3234567901' (oid) as SQL_C_UBIGINT: 3234567901
>    '3234567901' (oid) as SQL_C_BINARY: SQLGetData failed
>    07006=Received an unsupported type from Postgres.

Hmm. The difference is in the conversion of an integer value larger than
2^31, to a C type that's not large enough to hold it. According to the
ODBC spec, that's supposed to raise an error, sqlstate 22015, and the
result is undefined.
(http://msdn.microsoft.com/en-us/library/ms712567%28v=vs.85%29.aspx).

I actually removed those particular test cases after the 09.03.0400
release, when I added tests for large objects. The above OID conversion
tests started to behave differently after the "lo" domain, for large
objects. So the issue should be resolved in git master already, by accident.

The real issue here is that the driver doesn't raise an error when a
numeric value's whole part is truncated.

- Heikki