Re: Regression tests fail with PG12

Christoph Berg <[email protected]> Tue, 10 Dec 2019 11:26:04 +0100
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <[email protected]>
Re: Inoue, Hiroshi 2019-11-12 <[email protected]=
mail.ne.jp>
> Hi Christoph,
>=20
> Sorry for the late reply.
> Could you try the attached patch?

Hi,

that still leaves a regression diff, albeit a smaller one:

prove -e ./runsuite connect stmthandles select update commands multistmt ge=
tresult colattribute result-conversions prepare premature params param-conv=
ersions parse identity notice arraybinding insertreturning dataatexecution =
boolsaschar cvtnulldate alter quotes cursors cursor-movement cursor-commit =
cursor-name cursor-block-delete bookmark declare-fetch-commit declare-fetch=
-block positioned-update bulkoperations catalogfunctions bindcol lfconversi=
on cte deprecated errors error-rollback diagnostic numeric large-object lar=
ge-object-data-at-exec odbc-escapes wchar-char :: --inputdir=3D.
connect .................... ok
stmthandles ................ ok
select ..................... ok
update ..................... ok
commands ................... ok
multistmt .................. ok
getresult .................. ok
colattribute ............... ok
result-conversions ......... ok
prepare .................... ok
premature .................. ok
params ..................... ok
param-conversions .......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
parse ...................... ok
identity ................... ok
notice ..................... ok
arraybinding ............... ok
insertreturning ............ ok
dataatexecution ............ ok
boolsaschar ................ ok
cvtnulldate ................ ok
alter ...................... ok
quotes ..................... ok
cursors .................... ok
cursor-movement ............ ok
cursor-commit .............. ok
cursor-name ................ ok
cursor-block-delete ........ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
bookmark ................... ok
declare-fetch-commit ....... ok
declare-fetch-block ........ double free or corruption (out)
Aborted (core dumped)
declare-fetch-block ........ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
positioned-update .......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
bulkoperations ............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
catalogfunctions ........... ok
bindcol .................... ok
lfconversion ............... ok
cte ........................ ok
deprecated ................. ok
errors ..................... ok
error-rollback ............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
diagnostic ................. ok
numeric .................... ok
large-object ............... ok
large-object-data-at-exec .. ok
odbc-escapes ............... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
wchar-char ................. ok

Test Summary Report
-------------------
param-conversions        (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
cursor-block-delete      (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
declare-fetch-block      (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
positioned-update        (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
bulkoperations           (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
error-rollback           (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
odbc-escapes             (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=3D46, Tests=3D46,  5 wallclock secs ( 0.14 usr  0.04 sys +  1.46 cusr=
  0.64 csys =3D  2.28 CPU)
Result: FAIL
make[2]: *** [Makefile:33: installcheck] Error 1
make[2]: Leaving directory '/home/cbe/projects/postgresql/psqlodbc/psqlodbc=
/test'
[...]
Dropping cluster 12/regress ...
*** ./expected/param-conversions.out	Fri Oct 11 15:03:22 2019
--- results/param-conversions.out	Tue Dec 10 11:23:44 2019
***************
*** 27,33 ****

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_CHAR param "5 escapes: \ an=
d '"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for integer: "5 escapes: \ and '";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "32767"...
--- 27,33 ----

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_CHAR param "5 escapes: \ an=
d '"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for type integer: "5 escapes: \ and '=
";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "32767"...
***************
*** 62,73 ****
  Testing conversions with invalid values...
  Testing "SELECT 2 > ?" with SQL_C_CHAR -> SQL_INTEGER param "2, 'injected=
, BAD!'"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for integer: "2, 'injected, BAD!'";
  Error while executing the query

  Testing "SELECT 2 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "2, 'injecte=
d, BAD!'"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for integer: "2, 'injected, BAD!'";
  Error while executing the query

  Testing "SELECT 1.3 > ?" with SQL_C_CHAR -> SQL_FLOAT param "3', 'injecte=
d, BAD!', '1"...
--- 62,73 ----
  Testing conversions with invalid values...
  Testing "SELECT 2 > ?" with SQL_C_CHAR -> SQL_INTEGER param "2, 'injected=
, BAD!'"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for type integer: "2, 'injected, BAD!=
'";
  Error while executing the query

  Testing "SELECT 2 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "2, 'injecte=
d, BAD!'"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for type smallint: "2, 'injected, BAD=
!'";
  Error while executing the query

  Testing "SELECT 1.3 > ?" with SQL_C_CHAR -> SQL_FLOAT param "3', 'injecte=
d, BAD!', '1"...
***************
*** 86,97 ****

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param "-"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for integer: "-";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param ""...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for integer: "";
  Error while executing the query

  Testing "SELECT 1-?" with SQL_C_CHAR -> SQL_SMALLINT param "-1"...
--- 86,97 ----

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param "-"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for type integer: "-";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param ""...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for type integer: "";
  Error while executing the query

  Testing "SELECT 1-?" with SQL_C_CHAR -> SQL_SMALLINT param "-1"...
***************
*** 100,111 ****

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "-"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for integer: "-";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param ""...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for integer: "";
  Error while executing the query

  Testing "SELECT 0-?" with SQL_C_SLONG -> SQL_INTEGER param 1234...
--- 100,111 ----

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "-"...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for type smallint: "-";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param ""...
  SQLExecDirect failed
! 22P02=3DERROR: invalid input syntax for type smallint: "";
  Error while executing the query

  Testing "SELECT 0-?" with SQL_C_SLONG -> SQL_INTEGER param 1234...
*** ./expected/cursor-block-delete.out	Fri Oct 11 15:03:22 2019
--- results/cursor-block-delete.out	Tue Dec 10 11:23:47 2019
***************
*** 1,66 ****
  connected
  	orientation=3D2 delete count=3D0
! 	orientation=3D4 delete count=3D30
! 	orientation=3D1 delete count=3D53
! 	orientation=3D4 delete count=3D70
! 	orientation=3D1 delete count=3D83
! 	orientation=3D4 delete count=3D93
! 	orientation=3D1 delete count=3D100
! 	orientation=3D4 delete count=3D105
! 	orientation=3D1 delete count=3D109
! 	orientation=3D4 delete count=3D112
! 	orientation=3D1 delete count=3D114
! 	orientation=3D4 delete count=3D116
! 	orientation=3D1 delete count=3D117
! 	orientation=3D4 delete count=3D118
! 	orientation=3D1 delete count=3D119
! 	orientation=3D4 delete count=3D120
! delete all count 120
! 	orientation=3D2 delete count=3D0
! 	orientation=3D4 delete count=3D32
! 	orientation=3D1 delete count=3D56
! 	orientation=3D4 delete count=3D74
! 	orientation=3D1 delete count=3D88
! 	orientation=3D4 delete count=3D98
! 	orientation=3D1 delete count=3D106
! 	orientation=3D4 delete count=3D112
! 	orientation=3D1 delete count=3D116
! 	orientation=3D4 delete count=3D119
! 	orientation=3D1 delete count=3D122
! 	orientation=3D4 delete count=3D124
! 	orientation=3D1 delete count=3D125
! 	orientation=3D4 delete count=3D126
! 	orientation=3D1 delete count=3D127
! 	orientation=3D4 delete count=3D128
! delete all count 128
! 	orientation=3D2 delete count=3D0
! 	orientation=3D4 delete count=3D31
! 	orientation=3D1 delete count=3D55
! 	orientation=3D4 delete count=3D73
! 	orientation=3D1 delete count=3D86
! 	orientation=3D4 delete count=3D96
! 	orientation=3D1 delete count=3D103
! 	orientation=3D4 delete count=3D109
! 	orientation=3D1 delete count=3D113
! 	orientation=3D4 delete count=3D116
! 	orientation=3D1 delete count=3D118
! 	orientation=3D4 delete count=3D120
! 	orientation=3D1 delete count=3D121
! 	orientation=3D4 delete count=3D122
! 	orientation=3D1 delete count=3D123
! 	orientation=3D4 delete count=3D124
! delete all count 124
! 	orientation=3D2 delete count=3D0
! 	orientation=3D4 delete count=3D10
! 	orientation=3D1 delete count=3D17
! 	orientation=3D4 delete count=3D23
! 	orientation=3D1 delete count=3D27
! 	orientation=3D4 delete count=3D30
! 	orientation=3D1 delete count=3D32
! 	orientation=3D4 delete count=3D34
! 	orientation=3D1 delete count=3D35
! 	orientation=3D4 delete count=3D36
! 	orientation=3D1 delete count=3D37
! 	orientation=3D4 delete count=3D38
! delete all count 38
! disconnecting
--- 1,4 ----
  connected
  	orientation=3D2 delete count=3D0
! SQLSetPos delete failed
! 01001=3Dthe content was changed before deletion
*** ./expected/declare-fetch-block.out	Fri Oct 11 15:03:22 2019
--- results/declare-fetch-block.out	Tue Dec 10 11:23:47 2019
***************
*** 1,10 ****
- connected
- fetchIdx=3D1, fetched rows=3D84, total rows=3D84
- fetchIdx=3D2, fetched rows=3D36, total rows=3D120
- next  total rows=3D120
- prior total rows=3D120
- next  total rows=3D120
- prior total rows=3D120
- FetchScroll beyond the end failed 100
- encountered EOF at 120
- disconnecting
--- 0 ----
*** ./expected/positioned-update.out	Fri Oct 11 15:03:22 2019
--- results/positioned-update.out	Tue Dec 10 11:23:47 2019
***************
*** 2,31 ****
  Creating test table pos_update_test
  Opening a cursor for update, and fetching 10 rows
  exec cursor_type=3D3
! 1	1
! 2	2
! 3	3
! 4	4
! 5	5

  Updating result set
!
! Re-fetching the rows in the result set
! 6	6
! 105	5
! 4	4
!
! Querying the table again
! Result set:
! 1	1
! 2	2
! 3	3
! 4	4
! 105	5
! 7	7
! 8	8
! 9	9
! 10	10
!
! Opening a cursor for update, and fetching 5000 rows
! disconnecting
--- 2,13 ----
  Creating test table pos_update_test
  Opening a cursor for update, and fetching 10 rows
  exec cursor_type=3D3
! =C0=AB,=B5=7F
! NULL	NULL
! NULL	NULL
! NULL	NULL
! NULL	NULL

  Updating result set
! SQLSetPos 1st UPDATE failed
! 01001=3Dthe content was changed before updation
*** ./expected/bulkoperations.out	Fri Oct 11 15:03:22 2019
--- results/bulkoperations.out	Tue Dec 10 11:23:47 2019
***************
*** 1,29 ****
  connected
  Creating test table bulkoperations_test
  Opening a cursor for update, and fetching 10 rows
! 1	1
! 2	2
! 3	3
! 4	4
! 5	5

  Updating result set
! 105	5
! Testing bulk fetch of original, updated, and inserted rows
! row no #2: 2 - 2
! updated row: 105 - 5
! inserted row: 1234 - 5678
!
! Querying the table again
! Result set:
! 1	1
! 2	2
! 3	3
! 4	4
! 105	5
! 6	6
! 7	7
! 9	9
! 10	10
! 1234	5678
! disconnecting
--- 1,12 ----
  connected
  Creating test table bulkoperations_test
  Opening a cursor for update, and fetching 10 rows
! =C0N'=7F
! NULL	NULL
! NULL	NULL
! NULL	NULL
! NULL	NULL

  Updating result set
! SQLBulkOperations failed
! 01001=3Dthe content was changed before updation
*** ./expected/error-rollback.out	Fri Oct 11 15:03:22 2019
--- results/error-rollback.out	Tue Dec 10 11:23:48 2019
***************
*** 3,9 ****
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for integer: "fail1";
  Error while executing the query
  Rolling back with SQLEndTran
  Executing query that will succeed
--- 3,9 ----
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for type integer: "fail1";
  Error while executing the query
  Rolling back with SQLEndTran
  Executing query that will succeed
***************
*** 15,21 ****
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for integer: "fail1";
  Error while executing the query
  Executing query that will succeed
  Result set:
--- 15,21 ----
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for type integer: "fail1";
  Error while executing the query
  Executing query that will succeed
  Result set:
***************
*** 27,43 ****
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for integer: "fail-1";
  Error while executing the query
  Executing query that will succeed
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for integer: "fail-1";
  Error while executing the query
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for integer: "fail-1";
  Error while executing the query
  Executing query that will succeed
  Executing procedure call that will fail
--- 27,43 ----
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for type integer: "fail-1";
  Error while executing the query
  Executing query that will succeed
  Executing query that will succeed
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for type integer: "fail-1";
  Error while executing the query
  Executing query that will fail
  Failed to execute statement
! 22P02=3DERROR: invalid input syntax for type integer: "fail-1";
  Error while executing the query
  Executing query that will succeed
  Executing procedure call that will fail
*** ./expected/odbc-escapes.out	Fri Oct 11 15:03:22 2019
--- results/odbc-escapes.out	Tue Dec 10 11:23:48 2019
***************
*** 68,75 ****
  Param 4: 3.4
  Param 5 is an OUT parameter
  Result set:
! 6.7999999999999998	7	2017-02-24 11:34:46
! OUT params: 6.7999999999999998 : 7 : 2017-02-24 11:34:46

  -- TEST using SQLExecDirect

--- 68,75 ----
  Param 4: 3.4
  Param 5 is an OUT parameter
  Result set:
! 6.8	7	2017-02-24 11:34:46
! OUT params: 6.8 : 7 : 2017-02-24 11:34:46

  -- TEST using SQLExecDirect

***************
*** 139,144 ****
  Param 4: 3.4
  Param 5 is an OUT parameter
  Result set:
! 6.7999999999999998	7	2017-02-24 11:34:46
! OUT params: 6.7999999999999998 : 7 : 2017-02-24 11:34:46
  disconnecting
--- 139,144 ----
  Param 4: 3.4
  Param 5 is an OUT parameter
  Result set:
! 6.8	7	2017-02-24 11:34:46
! OUT params: 6.8 : 7 : 2017-02-24 11:34:46
  disconnecting
make[1]: *** [debian/rules:18: override_dh_auto_test] Fehler 1


Christoph