Martin,
Thanks ... make builds the libs now. I'm still failing a few test, but
I'll try sorting it out from here.
Craig
Craig,
I've taken a quick look at some of the errors you are getting with the
postgres ODBC driver - see below:
Craig Metzer wrote:
~~~~~~~ results ~~~~~~~~
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> DBD-ODBC-1.13]$ make test
TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(1, 'blib/lib', 'blib/arch')" t/*.t
t/01base.........1..5
ok 1 - require DBI;
ok 2 - import DBI
ok 3 - DBI->internal is DBI::dr
ok 4 - Install ODBC driver OK
ok 5 - Version is not empty
ok
t/02simple.......1..36
ok 1 - use DBI;
ok 2 - use ODBCTEST;
ok 3 - Set Auto commit
ok 4 - Auto commit retrieved to what was set
ok 5 - create test table
ok 6 - test table exists
ok 7 - insert test data
ok 8 - select test data
ok 9 - Set Long Read len
ok 10 - Set Long Truncok 1
ok 11 - Set Print Error
ok 12 - Select Long data
ok 13 - Set Long Truncok 0
ok 14 - Select Long Data failure
ok 15 - prepare select from table
ok 16 - Execute select
# Coltype 5 not found in list # #
# Coltype 12 not found in list # #
# Coltype -1 not found in list # #
# Coltype 9 not found in list # #
# Failed test (t/02simple.t at line 76)
not ok 17 - Col count matches correct col count
# got: '0'
# expected: '4'
Caused by the postgres driver returning lowercase column names when the
test expects uppercase names - I will have this fixed in next release of
DBD::ODBC as lowercase names are fine.
ok 18 - Set RaiseError 0
ok 19 - Set PrintError 0
ok 20 - Error reported on bad query
ok 21 - date check select
ok 22 - date check execute
ok 23 - date check rows
ok 24 - group by query prepare
ok 25 - group by query execute
ok 26 - group by query returned rows
# Failed test (t/02simple.t at line 132)
# '0'
# >
# '0'
not ok 27 - data sources test
ok 28 - test ping method
ok 29 - Attrib odbc_ignore_named_placeholders 0 to start
ok 30 - Attrib odbc_ignore_named_placeholders set to 1
ok 31 - test connecting twice to the same database
ok 32 - database name is returned successfully
ok 33 - automatically finish when execute run again
ok 34 - INVALID DSN Test: [unixODBC][Driver Manager]Data source name not
found, and no default driver specified (SQL-IM002)(DBD:
db_login/SQLConnect err=-1)
#
ok 35 - Connection with DSN=
# Looks like you failed 2 tests of 36.
ok 36 - Connection with DSN= and uid and pwd are set
dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 17, 27
Failed 2/36 tests, 94.44% okay
Works for me with latest postgres ODBC driver on Linux.
t/03dbatt........1..24
ok 1 - use DBI;
ok 2 - use ODBCTEST;
ok 3 - Set Long Read Len
ok 4 - AutoCommit set on dbh
ok 5 - commitTest with AutoCommit
ok 6 - AutoCommit turned off
ok 7 - commitTest with AutoCommit off
DBD driver has not implemented the AutoCommit attribute at t/03dbatt.t
line 54.
Issuing rollback() for database handle being DESTROY'd without explicit
disconnect().
Sure I've seen this one before on this list. It works with the latest
version of the postgres ODBC driver I have.
# Looks like you planned 24 tests but only ran 7.
# Looks like your test died just after 7.
dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 8-24
Failed 17/24 tests, 29.17% okay
Obviously, because it failed it skipped some tests in 03dbatt some of
which fail for me.
The test for the column names from a SQLTables call returns ODBC 2
column names instead of ODBC 3 column names. I think this is a bug in
Postgres because it reports itself as an ODBC 3 driver and I will see
about reporting it. For now, I've changed the test to capture and handle
the old column names and output a warning instead.
The test to check $sth->{NAME} returns an empty hash ref before and
after an execute call on an update statement fails for me. I think this
is also a bug in Postgres as the sequence of ODBC calls and the final
error are:
SQLPrepare(update table set column = 100 where column = 100);
SQLNumResultCols returns 0 columns
SQLMoreResults returns SQL_NO_DATA
SQLExecute
SQLRowCount returns 1 row affected
SQLNumResultCols returns 0 columns
SQLMoreResults returns SQL_NO_DATA
SQLNumResultCols returns an error saying
HY000 No query has been executed with that handle
The unixODBC driver manager lets this call through because it is no a
function sequence error (usually the only error you get from
SQLNumResultCols) and:
1. as far as I can see from the ODBC spec SQLNumResultCols should return
success and 0 columns here
2. 3 other drivers I've tried today all work fine with this.
I will attempt to file a bug with Postgres people.
In the mean time, the next release of DBD::ODBC will skip this test for
postgres with a warning.
t/05meth.........1..8
ok 1 - use DBI;
ok 2 - delete prepared statement
ok 3 - Number of rows > 0
ok 4 - Number of rows from DBI matches sth
ok 5 - finished and rolled back
ok 6 - no error
ok 7 - ?
ok 8 - ??
ok
t/07bind.........1..11
ok 1 - use ODBCTEST;
ok 2 - Create tables
ok 3 - Table insert test
ok 4 - Ensure long readlen set correctly
ok 5 - Select tests
ok 6 - Insert with bind tests
ok 7 - select long test data
ok 8 - update long test data
ok 9 - select long test data again
ok 10 - ParamValues test integer
ok 11 - Paramvalues test string
ok
t/08bind2........1..5
ok 1 - use ODBCTEST;
ok 2 - use Data::Dumper;
ok 3 # skip SQLDescribeParam not supported using PostgreSQL
#
ok 4 # skip SQLDescribeParam not supported using PostgreSQL
#
ok 5 # skip SQLDescribeParam not supported using PostgreSQL
#
ok
3/5 skipped: SQLDescribeParam not supported using PostgreSQL
t/09multi........1..7
ok 1 - use strict;
ok 2 - use DBI;
ok 3 - use ODBCTEST;
ok 4 # skip Multiple statements not supported using PostgreSQL
#
ok 5 # skip Multiple statements not supported using PostgreSQL
#
ok 6 # skip Multiple statements not supported using PostgreSQL
#
ok 7 # skip Multiple statements not supported using PostgreSQL
#
ok
4/7 skipped: Multiple statements not supported using PostgreSQL
t/20SqlServer....1..37
ok 1 - use ODBCTEST;
ok 2 - use Data::Dumper;
ok 3 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 4 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 5 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 6 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 7 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 8 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 9 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 10 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 11 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 12 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 13 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 14 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 15 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 16 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 17 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 18 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 19 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 20 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 21 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 22 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 23 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 24 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 25 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 26 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 27 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 28 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 29 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 30 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 31 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 32 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 33 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 34 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 35 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 36 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok 37 # skip Microsoft SQL Server tests not supported using PostgreSQL
ok
35/37 skipped: Microsoft SQL Server tests not supported using
PostgreSQL
t/30Oracle.......1..4
ok 1 - use ODBCTEST;
ok 2 - use Data::Dumper;
ok 3 # skip Oracle tests not supported using PostgreSQL
ok 4 # skip Oracle tests not supported using PostgreSQL
ok
2/4 skipped: Oracle tests not supported using PostgreSQL
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/02simple.t 2 512 36 2 5.56% 17 27
t/03dbatt.t 255 65280 24 34 141.67% 8-24
44 subtests skipped.
Failed 2/9 test scripts, 77.78% okay. 19/137 subtests failed, 86.13% okay.
make: *** [test_dynamic] Error 255
<snipped perl -V output etc>
FYI, I was using DBI 1.58, DBD::ODBC 1.14_1, postgres ODBC driver
08.01.0200, postgres server 8.1 all on 32bit Linux.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com