pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Raiskup <praiskup@redhat.com>
To: PostgreSQL ODBC <pgsql-odbc@postgresql.org>
Subject: Failing tests on Fedora
Date: Fri, 23 May 2014 07:32:38 +0200
Message-ID: <2260528.sCvkWcF69Q@nb.usersys.redhat.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Hello, I started with running the testsuite recently, thanks a lot for its
existence!

There are currently 8 fails on my system (Fedora 20 x86_64), I didn't look
at all the errors carefully yet as I found in `git show a5e2002a` note
about expected failures — iirc, there is not specified what tests are
expected to fail.

Could we add one additional "EXP_FAIL" state for the testsuite to make
that clear?  Or at least have a list of expected failures somewhere?
(Also instructions how to run single test would be useful in README.txt).

Attached files (regression.out, regression.diffs).

--

I tried to look at the first FAIL so far.  Not sure what is the correct
fix-approach (maybe I face some misconfiguration) but VACUUM statement
does not seem to be candidate for PREPARE; none of STMT_TYPE_SPECIAL
statements actually.  So proposed fix is attached together with full
compressed "mylog" (+ patch with ignored indentation changes).

Pavel

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

Attachments: download all (5 files, .tar.gz)

regression.out (text/plain, 993B) download test sampletables ... ok test connect ... ok test stmthandles ... ok test select ... ok test commands ... FAILED test multistmt ... ok test getresult ... ok test prepare ... FAILED test params ... FAILED test notice ... FAILED test arraybinding ... ok test insertreturning ... ok test dataatexecution ... ok test boolsaschar ... ok test cvtnulldate ... FAILED test alter ... ok test quotes ... ok test cursors ... ok test positioned-update ... ok test catalogfunctions ... FAILED test bindcol ... ok test lfconversion ... ok test cte ... ok test deprecated ... FAILED test error-rollback ... ok test diagnostic ... FAILED
regression.diffs (text/x-patch, 10.4K) download *** /home/praiskup/rh/projects/psqlodbc/test/expected/commands.out 2013-12-13 08:03:35.798378158 +0100 --- /home/praiskup/rh/projects/psqlodbc/test/results/commands.out 2014-05-22 19:01:06.690174158 +0200 *************** *** 2,8 **** connected Testing VACUUM with SQLExecDirect... Testing VACUUM with SQLPrepare/SQLExecute... ! Disabling autocommit... ! Testing VACUUM with SQLExecDirect... ! Testing VACUUM with SQLPrepare/SQLExecute... ! disconnecting --- 2,7 ---- connected Testing VACUUM with SQLExecDirect... Testing VACUUM with SQLPrepare/SQLExecute... ! SQLExecute failed ! HY000=ERROR: syntax error at or near "VACUUM" at character 29; ! Error while executing the query ====================================================================== *** /home/praiskup/rh/projects/psqlodbc/test/expected/prepare.out 2014-02-17 13:36:45.610763228 +0100 --- /home/praiskup/rh/projects/psqlodbc/test/results/prepare.out 2014-05-22 19:01:11.051205906 +0200 *************** *** 5,117 **** 2 bar Result set: 3 foobar ! inserting bytea values... 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 done! ! Now reading them back... ! Result set: ! 4000 4000 ! 4001 4001 ! 4002 4002 ! 4003 4003 ! 4004 4004 ! 4005 4005 ! 4006 4006 ! 4007 4007 ! 4008 4008 ! 4009 4009 ! 4010 4010 ! 4011 4011 ! 4012 4012 ! 4013 4013 ! 4014 4014 ! 4015 4015 ! 4016 4016 ! 4017 4017 ! 4018 4018 ! 4019 4019 ! 4020 4020 ! 4021 4021 ! 4022 4022 ! 4023 4023 ! 4024 4024 ! 4025 4025 ! 4026 4026 ! 4027 4027 ! 4028 4028 ! 4029 4029 ! 4030 4030 ! 4031 4031 ! 4032 4032 ! 4033 4033 ! 4034 4034 ! 4035 4035 ! 4036 4036 ! 4037 4037 ! 4038 4038 ! 4039 4039 ! 4040 4040 ! 4041 4041 ! 4042 4042 ! 4043 4043 ! 4044 4044 ! 4045 4045 ! 4046 4046 ! 4047 4047 ! 4048 4048 ! 4049 4049 ! 4050 4050 ! 4051 4051 ! 4052 4052 ! 4053 4053 ! 4054 4054 ! 4055 4055 ! 4056 4056 ! 4057 4057 ! 4058 4058 ! 4059 4059 ! 4060 4060 ! 4061 4061 ! 4062 4062 ! 4063 4063 ! 4064 4064 ! 4065 4065 ! 4066 4066 ! 4067 4067 ! 4068 4068 ! 4069 4069 ! 4070 4070 ! 4071 4071 ! 4072 4072 ! 4073 4073 ! 4074 4074 ! 4075 4075 ! 4076 4076 ! 4077 4077 ! 4078 4078 ! 4079 4079 ! 4080 4080 ! 4081 4081 ! 4082 4082 ! 4083 4083 ! 4084 4084 ! 4085 4085 ! 4086 4086 ! 4087 4087 ! 4088 4088 ! 4089 4089 ! 4090 4090 ! 4091 4091 ! 4092 4092 ! 4093 4093 ! 4094 4094 ! 4095 4095 ! 4096 4096 ! 4097 4097 ! 4098 4098 ! 4099 4099 ! Result set: ! 1 @ 1 day one day ! 2 @ 10 secs ten secs ! # of result cols: 2 ! Result set: ! 2 bar ! disconnecting --- 5,8 ---- 2 bar Result set: 3 foobar ! inserting bytea values... 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 \ No newline at end of file ====================================================================== *** /home/praiskup/rh/projects/psqlodbc/test/expected/params.out 2013-12-13 08:03:35.799378164 +0100 --- /home/praiskup/rh/projects/psqlodbc/test/results/params.out 2014-05-22 19:01:16.254243759 +0200 *************** *** 2,8 **** connected # of result cols: 2 Result set: - 1 0102030405060708 Testing SQLBindParameter with SQLExecDirect... Result set: --- 2,7 ---- *************** *** 10,17 **** bar Testing SQLDescribeParam... ! Param 1: type INTEGER; size 10; dec digits -1; nullable ! # of result cols: 2 ! Result set: ! 3 foobar ! disconnecting --- 9,13 ---- bar Testing SQLDescribeParam... ! SQLDescribeParams failed ! IM001=[unixODBC][Driver Manager]Driver does not support this function ====================================================================== *** /home/praiskup/rh/projects/psqlodbc/test/expected/notice.out 2013-12-13 08:03:35.799378164 +0100 --- /home/praiskup/rh/projects/psqlodbc/test/results/notice.out 2014-05-22 19:01:16.366244575 +0200 *************** *** 1,7 **** \! ./src/notice-test connected got SUCCESS_WITH_INFO ! 00000=NOTICE: test notice: foo got SUCCESS_WITH_INFO 00000= disconnecting --- 1,7 ---- \! ./src/notice-test connected got SUCCESS_WITH_INFO ! 00000=NOTICE: test notice: foo got SUCCESS_WITH_INFO 00000= disconnecting ====================================================================== *** /home/praiskup/rh/projects/psqlodbc/test/expected/cvtnulldate.out 2013-12-13 08:03:35.799378164 +0100 --- /home/praiskup/rh/projects/psqlodbc/test/results/cvtnulldate.out 2014-05-22 19:01:20.562275081 +0200 *************** *** 1,5 **** \! ./src/cvtnulldate-test connected ! Result set: ! 1 ! disconnecting --- 1,5 ---- \! ./src/cvtnulldate-test connected ! SQLExecDirect failed ! HY000=ERROR: invalid input syntax for type date: "" at character 30; ! Error while executing the query ====================================================================== *** /home/praiskup/rh/projects/psqlodbc/test/expected/catalogfunctions.out 2014-05-20 14:09:21.105643253 +0200 --- /home/praiskup/rh/projects/psqlodbc/test/results/catalogfunctions.out 2014-05-22 19:01:21.385281062 +0200 *************** *** 119,144 **** Check for SQLForeignKeys Result set metadata: pktable_cat: VARCHAR(64) digits: 0, nullable ! pktable_schem: VARCHAR(64) digits: 0, not nullable ! pktable_name: VARCHAR(64) digits: 0, not nullable ! pkcolumn_name: VARCHAR(64) digits: 0, not nullable fktable_cat: VARCHAR(64) digits: 0, nullable ! fktable_schem: VARCHAR(64) digits: 0, not nullable ! fktable_name: VARCHAR(64) digits: 0, not nullable ! fkcolumn_name: VARCHAR(64) digits: 0, not nullable key_seq: SMALLINT(5) digits: 0, nullable update_rule: SMALLINT(5) digits: 0, nullable delete_rule: SMALLINT(5) digits: 0, nullable ! fk_name: VARCHAR(64) digits: 0, not nullable ! pk_name: VARCHAR(64) digits: 0, not nullable deferrablity: SMALLINT(5) digits: 0, nullable Result set: contrib_regression public testtab1 id contrib_regression public testtab_fk id 1 3 3 testtab_fk_id_fkey testtab1_pkey 7 Check for SQLProcedures Result set metadata: procedure_cat: VARCHAR(255) digits: 0, nullable ! procedure_schem: VARCHAR(64) digits: 0, not nullable ! procedure_name: VARCHAR(64) digits: 0, not nullable num_input_params: VARCHAR(255) digits: 0, nullable num_output_params: VARCHAR(255) digits: 0, nullable num_result_sets: VARCHAR(255) digits: 0, nullable --- 119,144 ---- Check for SQLForeignKeys Result set metadata: pktable_cat: VARCHAR(64) digits: 0, nullable ! pktable_schem: VARCHAR(64) digits: 0, nullable ! pktable_name: VARCHAR(64) digits: 0, nullable ! pkcolumn_name: VARCHAR(64) digits: 0, nullable fktable_cat: VARCHAR(64) digits: 0, nullable ! fktable_schem: VARCHAR(64) digits: 0, nullable ! fktable_name: VARCHAR(64) digits: 0, nullable ! fkcolumn_name: VARCHAR(64) digits: 0, nullable key_seq: SMALLINT(5) digits: 0, nullable update_rule: SMALLINT(5) digits: 0, nullable delete_rule: SMALLINT(5) digits: 0, nullable ! fk_name: VARCHAR(64) digits: 0, nullable ! pk_name: VARCHAR(64) digits: 0, nullable deferrablity: SMALLINT(5) digits: 0, nullable Result set: contrib_regression public testtab1 id contrib_regression public testtab_fk id 1 3 3 testtab_fk_id_fkey testtab1_pkey 7 Check for SQLProcedures Result set metadata: procedure_cat: VARCHAR(255) digits: 0, nullable ! procedure_schem: VARCHAR(64) digits: 0, nullable ! procedure_name: VARCHAR(64) digits: 0, nullable num_input_params: VARCHAR(255) digits: 0, nullable num_output_params: VARCHAR(255) digits: 0, nullable num_result_sets: VARCHAR(255) digits: 0, nullable ====================================================================== *** /home/praiskup/rh/projects/psqlodbc/test/expected/deprecated.out 2014-04-02 08:37:57.065266936 +0200 --- /home/praiskup/rh/projects/psqlodbc/test/results/deprecated.out 2014-05-22 19:01:21.702283366 +0200 *************** *** 6,12 **** Check for SQLGetConnectOption Access type is: read-write Check for SQLError ! Error check: ERROR: relation "table_not_here" does not exist; Error while executing the query Check for SQLSetParam Result set: --- 6,12 ---- Check for SQLGetConnectOption Access type is: read-write Check for SQLError ! Error check: ERROR: relation "table_not_here" does not exist at character 13; Error while executing the query Check for SQLSetParam Result set: ====================================================================== *** /home/praiskup/rh/projects/psqlodbc/test/expected/diagnostic.out 2014-04-23 09:16:29.679056999 +0200 --- /home/praiskup/rh/projects/psqlodbc/test/results/diagnostic.out 2014-05-22 19:01:21.850284442 +0200 *************** *** 1,15 **** \! ./src/diagnostic-test connected SQLExecDirect ! 42601=ERROR: syntax error at or near "broken"; Error while executing the query get same message again ! 42601=ERROR: syntax error at or near "broken"; Error while executing the query killing connection... ! 57P01=FATAL: terminating connection due to administrator command; Error while executing the query SQLGetDiagRec on connection says: ! 57P01=FATAL: terminating connection due to administrator command SQLGetDiagRec called again: ! 57P01=FATAL: terminating connection due to administrator command --- 1,15 ---- \! ./src/diagnostic-test connected SQLExecDirect ! HY000=ERROR: syntax error at or near "broken" at character 1; Error while executing the query get same message again ! HY000=ERROR: syntax error at or near "broken" at character 1; Error while executing the query killing connection... ! HY000=FATAL: terminating connection due to administrator command; Error while executing the query SQLGetDiagRec on connection says: ! HY000=FATAL: terminating connection due to administrator command SQLGetDiagRec called again: ! HY000=FATAL: terminating connection due to administrator command ======================================================================
mylog_praiskup6591.log.xz (application/x-xz, 3.3K) download
patch-ignored-space.patch (text/x-patch, 3.4K) download commit 1260947446ed6d5629dd8164640bf156c7fa7e5b (HEAD, praiskup_testsuite) Author: Pavel Raiskup <praiskup@redhat.com> AuthorDate: Thu May 22 18:34:44 2014 +0200 Commit: Pavel Raiskup <praiskup@redhat.com> CommitDate: Fri May 23 07:28:51 2014 +0200 Do not wrap STMT_TYPE_SPECIAL statement by PREPARE Having UseServerSidePrepare=1 (default) caused failing the commands-tests.c testcase. Seems like inquireHowToPrepare function should detect STMT_TYPE_SPECIAL statements and mark them as PREPARE_BY_THE_DRIVER (causes HowToPrepareBeforeExec return doNothing). Adjust also corresponding testcase to test having UseServerSidePrepare set explicitly to 0 and 1. diff --git a/execute.c b/execute.c index 1cc4f04..623a598 100644 --- a/execute.c +++ b/execute.c @@ -214,6 +214,7 @@ inquireHowToPrepare(const StatementClass *stmt) conn = SC_get_conn(stmt); ci = &(conn->connInfo); if (!ci->use_server_side_prepare || + stmt->statement_type == STMT_TYPE_SPECIAL || PG_VERSION_LT(conn, 7.3)) { /* Do prepare operations by the driver itself */ diff --git a/test/expected/commands.out b/test/expected/commands.out index 58058c3..d1f60bf 100644 --- a/test/expected/commands.out +++ b/test/expected/commands.out @@ -1,4 +1,21 @@ \! ./src/commands-test +~> Running with UseServerSidePrepare=0 +connected +Testing VACUUM with SQLExecDirect... +Testing VACUUM with SQLPrepare/SQLExecute... +Disabling autocommit... +Testing VACUUM with SQLExecDirect... +Testing VACUUM with SQLPrepare/SQLExecute... +disconnecting +~> Running with UseServerSidePrepare=1 +connected +Testing VACUUM with SQLExecDirect... +Testing VACUUM with SQLPrepare/SQLExecute... +Disabling autocommit... +Testing VACUUM with SQLExecDirect... +Testing VACUUM with SQLPrepare/SQLExecute... +disconnecting +~> Running with NULL (default) connected Testing VACUUM with SQLExecDirect... Testing VACUUM with SQLPrepare/SQLExecute... diff --git a/test/src/commands-test.c b/test/src/commands-test.c index 96ca7ad..0bc36df 100644 --- a/test/src/commands-test.c +++ b/test/src/commands-test.c @@ -12,7 +12,18 @@ int main(int argc, char **argv) char *sqlend; int i; - test_connect(); + const char *conn_strings[] = { + "UseServerSidePrepare=0", + "UseServerSidePrepare=1", + NULL, + }; + + const char **connstr; + + for (connstr = conn_strings; ; connstr++) { + printf("~> Running with %s\n", *connstr ? *connstr : "NULL (default)"); + test_connect_ext(*connstr); + rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt); if (!SQL_SUCCEEDED(rc)) @@ -78,4 +89,8 @@ int main(int argc, char **argv) /* Clean up */ test_disconnect(); + + if (!*connstr) + break; + } } diff --git a/test/src/common.c b/test/src/common.c index 2423ad0..70a79bd 100644 --- a/test/src/common.c +++ b/test/src/common.c @@ -24,7 +24,7 @@ print_diag(char *msg, SQLSMALLINT htype, SQLHANDLE handle) } void -test_connect_ext(char *extraparams) +test_connect_ext(const char *extraparams) { SQLRETURN ret; SQLCHAR str[1024]; diff --git a/test/src/common.h b/test/src/common.h index 34ad156..e63eada 100644 --- a/test/src/common.h +++ b/test/src/common.h @@ -24,7 +24,7 @@ extern SQLHDBC conn; } extern void print_diag(char *msg, SQLSMALLINT htype, SQLHANDLE handle); -extern void test_connect_ext(char *extraparams); +extern void test_connect_ext(const char *extraparams); extern void test_connect(void); extern void test_disconnect(void); extern void print_result_meta_series(HSTMT hstmt,
0001-Do-not-wrap-STMT_TYPE_SPECIAL-statement-by-PREPARE.patch.xz (application/x-xz, 2.1K) download

view thread (5+ messages)  latest in thread

Message-ID: <2260528.sCvkWcF69Q@nb.usersys.redhat.com>
Permalink:  ../2260528.sCvkWcF69Q@nb.usersys.redhat.com/
Also on:    postgresql.org/message-id/2260528.sCvkWcF69Q@nb.usersys.redhat.com

 ·  · 

reply

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: praiskup@redhat.com
  Subject: Re: Failing tests on Fedora
  In-Reply-To: <2260528.sCvkWcF69Q@nb.usersys.redhat.com>
  References: <2260528.sCvkWcF69Q@nb.usersys.redhat.com>

* 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