Re: Regression tests fail with PG12 - Mailing list pgsql-odbc

From Christoph Berg
Subject Re: Regression tests fail with PG12
Date
Msg-id 20191210102604.GA17124@msg.df7cb.de
Whole thread Raw
In response to Re: Regression tests fail with PG12  ("Inoue, Hiroshi" <h-inoue@dream.email.ne.jp>)
Responses Re: Regression tests fail with PG12  ("Inoue, Hiroshi" <h-inoue@dream.email.ne.jp>)
List pgsql-odbc
Re: Inoue, Hiroshi 2019-11-12 <f4566e2f-e387-b9fa-c55c-0501c18144ef@dream.email.ne.jp>
> Hi Christoph,
>
> 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 getresult colattribute result-conversions
preparepremature params param-conversions parse identity notice arraybinding insertreturning dataatexecution
boolsascharcvtnulldate alter quotes cursors cursor-movement cursor-commit cursor-name cursor-block-delete bookmark
declare-fetch-commitdeclare-fetch-block positioned-update bulkoperations catalogfunctions bindcol lfconversion cte
deprecatederrors error-rollback diagnostic numeric large-object large-object-data-at-exec odbc-escapes wchar-char ::
--inputdir=.
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=46, Tests=46,  5 wallclock secs ( 0.14 usr  0.04 sys +  1.46 cusr  0.64 csys =  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: \ and '"...
  SQLExecDirect failed
! 22P02=ERROR: 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: \ and '"...
  SQLExecDirect failed
! 22P02=ERROR: 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=ERROR: invalid input syntax for integer: "2, 'injected, BAD!'";
  Error while executing the query

  Testing "SELECT 2 > ?" with SQL_C_CHAR -> SQL_SMALLINT param "2, 'injected, BAD!'"...
  SQLExecDirect failed
! 22P02=ERROR: 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', 'injected, 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=ERROR: 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, 'injected, BAD!'"...
  SQLExecDirect failed
! 22P02=ERROR: 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', 'injected, BAD!', '1"...
***************
*** 86,97 ****

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

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param ""...
  SQLExecDirect failed
! 22P02=ERROR: 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=ERROR: invalid input syntax for type integer: "-";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_INTEGER param ""...
  SQLExecDirect failed
! 22P02=ERROR: 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=ERROR: invalid input syntax for integer: "-";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param ""...
  SQLExecDirect failed
! 22P02=ERROR: 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=ERROR: invalid input syntax for type smallint: "-";
  Error while executing the query

  Testing "SELECT 1 > ?" with SQL_C_CHAR -> SQL_SMALLINT param ""...
  SQLExecDirect failed
! 22P02=ERROR: 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=2 delete count=0
!     orientation=4 delete count=30
!     orientation=1 delete count=53
!     orientation=4 delete count=70
!     orientation=1 delete count=83
!     orientation=4 delete count=93
!     orientation=1 delete count=100
!     orientation=4 delete count=105
!     orientation=1 delete count=109
!     orientation=4 delete count=112
!     orientation=1 delete count=114
!     orientation=4 delete count=116
!     orientation=1 delete count=117
!     orientation=4 delete count=118
!     orientation=1 delete count=119
!     orientation=4 delete count=120
! delete all count 120
!     orientation=2 delete count=0
!     orientation=4 delete count=32
!     orientation=1 delete count=56
!     orientation=4 delete count=74
!     orientation=1 delete count=88
!     orientation=4 delete count=98
!     orientation=1 delete count=106
!     orientation=4 delete count=112
!     orientation=1 delete count=116
!     orientation=4 delete count=119
!     orientation=1 delete count=122
!     orientation=4 delete count=124
!     orientation=1 delete count=125
!     orientation=4 delete count=126
!     orientation=1 delete count=127
!     orientation=4 delete count=128
! delete all count 128
!     orientation=2 delete count=0
!     orientation=4 delete count=31
!     orientation=1 delete count=55
!     orientation=4 delete count=73
!     orientation=1 delete count=86
!     orientation=4 delete count=96
!     orientation=1 delete count=103
!     orientation=4 delete count=109
!     orientation=1 delete count=113
!     orientation=4 delete count=116
!     orientation=1 delete count=118
!     orientation=4 delete count=120
!     orientation=1 delete count=121
!     orientation=4 delete count=122
!     orientation=1 delete count=123
!     orientation=4 delete count=124
! delete all count 124
!     orientation=2 delete count=0
!     orientation=4 delete count=10
!     orientation=1 delete count=17
!     orientation=4 delete count=23
!     orientation=1 delete count=27
!     orientation=4 delete count=30
!     orientation=1 delete count=32
!     orientation=4 delete count=34
!     orientation=1 delete count=35
!     orientation=4 delete count=36
!     orientation=1 delete count=37
!     orientation=4 delete count=38
! delete all count 38
! disconnecting
--- 1,4 ----
  connected
      orientation=2 delete count=0
! SQLSetPos delete failed
! 01001=the 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=1, fetched rows=84, total rows=84
- fetchIdx=2, fetched rows=36, total rows=120
- next  total rows=120
- prior total rows=120
- next  total rows=120
- prior total rows=120
- 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=3
! 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=3
! À«,µ
! NULL    NULL
! NULL    NULL
! NULL    NULL
! NULL    NULL

  Updating result set
! SQLSetPos 1st UPDATE failed
! 01001=the 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
! ÀN'
! NULL    NULL
! NULL    NULL
! NULL    NULL
! NULL    NULL

  Updating result set
! SQLBulkOperations failed
! 01001=the 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=ERROR: 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=ERROR: 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=ERROR: 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=ERROR: 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=ERROR: 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=ERROR: invalid input syntax for integer: "fail-1";
  Error while executing the query
  Executing query that will fail
  Failed to execute statement
! 22P02=ERROR: 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=ERROR: 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=ERROR: invalid input syntax for type integer: "fail-1";
  Error while executing the query
  Executing query that will fail
  Failed to execute statement
! 22P02=ERROR: 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



pgsql-odbc by date:

Previous
From: Clemens Ladisch
Date:
Subject: Re: about pgsql odbc insertion efficiency is very low
Next
From: "Inoue, Hiroshi"
Date:
Subject: Re: Regression tests fail with PG12