Skip to Content.
Sympa Menu

freetds - RE: [freetds] ODBC unit tests "funccall" and "transaction"

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Castellano, Nicholas" <Nicholas_Castellano AT acml.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] ODBC unit tests "funccall" and "transaction"
  • Date: Fri, 9 Jan 2004 11:46:19 -0500


> From: ZIGLIO Frediano [mailto:Frediano.Ziglio AT vodafone.com]
> Sent: Friday, January 09, 2004 10:22 AM
>
> I really don't understand. I tried using unixODBC 2.0.4 with TDS
> 7.0/8.0... still no error...
> Anyone can post a TDSDUMP and/or test output??

Well I've realized that most of my previous tests were probably meaningless.
I forgot that one needs to install FreeTDS before "make check" can do
anything useful with ODBC (at least in my setup...with "Driver =
/usr/local/lib/libtdsodbc.so" in /usr/local/etc/odbcinst.ini ...)

So, I've changed a whole bunch of variables at once: upgraded to
unixODBC-2.2.7, updated to latest FreeTDS sources with Freddy's workaround,
compiled and installed FreeTDS, and now things have got worse. Five ODBC
tests now fail against both Sybase and SQL servers, on my 32-bit NetBSD
system.

I really don't have the time or knowledge to debug any of this properly.
But I do think something is very wrong, and I think shipping a FreeTDS
release this weekend would be a big mistake. But that's just my opinion.

I have attached test output from a run against a Sybase server.

Cheers,
--nick

-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.

Script started on Fri Jan 9 11:32:51 2004
bash-2.05$ gmake check
Making check in unittests
gmake[1]: Entering directory `/usr/home/nick/freetds/src/odbc/unittests'
gmake t0001 t0002 t0003 t0004 connect print date norowset funccall
lang_error tables binary_test moreandcount earlybind putdata params
raiseerror getdata transaction type genparams preperror
gmake[2]: Entering directory `/usr/home/nick/freetds/src/odbc/unittests'
gmake[2]: `t0001' is up to date.
gmake[2]: `t0002' is up to date.
gmake[2]: `t0003' is up to date.
gmake[2]: `t0004' is up to date.
gmake[2]: `connect' is up to date.
gmake[2]: `print' is up to date.
gmake[2]: `date' is up to date.
gmake[2]: `norowset' is up to date.
gmake[2]: `funccall' is up to date.
gmake[2]: `lang_error' is up to date.
gmake[2]: `tables' is up to date.
gmake[2]: `binary_test' is up to date.
gmake[2]: `moreandcount' is up to date.
gmake[2]: `earlybind' is up to date.
gmake[2]: `putdata' is up to date.
gmake[2]: `params' is up to date.
gmake[2]: `raiseerror' is up to date.
gmake[2]: `getdata' is up to date.
gmake[2]: `transaction' is up to date.
gmake[2]: `type' is up to date.
gmake[2]: `genparams' is up to date.
gmake[2]: `preperror' is up to date.
gmake[2]: Leaving directory `/usr/home/nick/freetds/src/odbc/unittests'
gmake check-TESTS
gmake[2]: Entering directory `/usr/home/nick/freetds/src/odbc/unittests'
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
drop table #odbctestdata
Unable to execute statement
create table #odbctestdata (col1 varchar(30) not null,col2 int not null,col3
float not null,col4 numeric(18,6) not null,col5 datetime not null,col6 text
not null)
insert #odbctestdata values ('ABCDEFGHIJKLMNOP',123456,1234.56,123456.78,'Sep
11 2001 10:00AM','just to check returned length...')
select * from #odbctestdata
output data >ABCDEFGHIJKLMNOP< len_or_ind = 16
output data >123456< len_or_ind = 6
output data >1234.56< len_or_ind = 7
output data >123456.780000< len_or_ind = 13
output data >2001-09-11 10:00:00< len_or_ind = 19
output data >just to check returned length...< len_or_ind = 32
drop table #odbctestdata
Done.
PASS: t0001
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
drop table #odbctestdata
Unable to execute statement
create table #odbctestdata (i int)
insert #odbctestdata values (123)
select * from #odbctestdata where 0=1
select * from #odbctestdata
drop table #odbctestdata
Done.
PASS: t0002
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
create table #odbctestdata (i int)
select * from #odbctestdata select * from #odbctestdata
Getting next recordset
Data not expected
FAIL: t0003
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
Done.
PASS: t0004
SQLConnect connect..
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
connect string DSN connect..
connect string SERVERNAME connect..
odbcinst.ini must be configured with FreeTDS driver..
Unable to open data source (ret=-1)
Done.
PASS: connect
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
print 'Test message'
Message: [FreeTDS][SQL Server]Test message
SELECT donotexistsfield FROM donotexiststable
Message: [FreeTDS][SQL Server]donotexiststable not found. Specify
owner.objectname or use sp_help to check whether the object exists (sp_help
may produce lots of output).

Message: [unixODBC][Driver Manager]Function sequence error
Message: [unixODBC][Driver Manager]Function sequence error
Done.
PASS: print
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
select convert(datetime, '2002-12-27 18:43:21')
Date returned: 2002-12-27 18:43:21
select convert(datetime, '2002-12-27 18:43:21')
Date returned: 2002-12-27 18:43:21
Done.
PASS: date
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
drop proc sp_norowset_test
create proc sp_norowset_test as begin declare @i int end
exec sp_norowset_test
select name from sysobjects where name = 'sysobjects'
drop proc sp_norowset_test
Done.
PASS: norowset
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
drop proc simpleresult
Unable to execute statement
create proc simpleresult @i int as begin return @i end
DECLARE @i INT
drop proc simpleresult
drop proc simpleresult2
create proc simpleresult2 @i int, @x int output, @y varchar(20) output as
begin select @x = 6789 select @y = 'test foo' return @i end
Unable to execute statement
FAIL: funccall
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
SELECT DATEADD(dd,-100000,getdate())
Done.
PASS: lang_error
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
Test type '' with row
Unable to execute statement
SQL error 24000 -- [unixODBC][Driver Manager]Invalid cursor state
FAIL: tables
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
create table #binary_test (im IMAGE)
SET TEXTSIZE 1000000
DECLARE @i INT
Input and output buffers of length 131072 match.
Test passed.
PASS: binary_test
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
create table #tmp1 (i int)
create table #tmp2 (i int)
insert into #tmp1 values(1)
insert into #tmp1 values(2)
insert into #tmp1 values(3)
Use direct statement
Result 1
Result 2
Expected another record
FAIL: moreandcount
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
SELECT id, name FROM sysobjects WHERE name = 'sysobjects' SELECT 123, 'foo'
wrong results
FAIL: earlybind
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
CREATE TABLE #putdata (c VARCHAR(255) NULL, b VARBINARY(255) NULL)
DECLARE @i INT
DECLARE @i2 INT
Done.
PASS: putdata
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
drop proc spTestProc
Unable to execute statement
CREATE PROCEDURE spTestProc
@InParam int,
@OutParam int OUTPUT,
@OutString varchar(20) OUTPUT
AS
SELECT @OutParam = @InParam
SELECT @OutString = 'This is cool!'
IF @InParam < 10
RETURN (0)
ELSE
RETURN (1)

drop proc spTestProc
Output:
Return Code = 0
InParam = 5
OutParam = 5
OutString = This is cool!
Done successfully!
PASS: params
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
CREATE PROCEDURE #tmp1
@InParam int,
@OutParam int OUTPUT,
@OutString varchar(20) OUTPUT
AS
SET @OutParam = @InParam
SET @OutString = 'This is bogus!'
RAISERROR('An error occurred.', 11, 1)
RETURN (0)
Unable to create temporary store, probably not mssql (required for this test)
PASS: raiseerror
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
SELECT CONVERT(TEXT,'Prova')
Done.
PASS: getdata
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
DROP TABLE TestTransaction
CREATE TABLE TestTransaction ( value int )
DROP PROCEDURE testinsert
CREATE PROCEDURE testinsert
@value int
AS
insert into TestTransaction values ( @value )
select * from TestTransaction

EXEC testinsert 1
EXEC testinsert 2
DROP PROCEDURE testinsert
DROP TABLE TestTransaction
Done.
PASS: transaction
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
Setted type SQL_C_CHAR -> [1 (SQL_C_CHAR), 1 (SQL_C_CHAR), 0]
Setted type SQL_C_LONG -> [4 (SQL_C_LONG), 4 (SQL_C_LONG), 0]
Setted type SQL_C_SHORT -> [5 (SQL_C_SHORT), 5 (SQL_C_SHORT), 0]
Setted type SQL_C_FLOAT -> [7 (SQL_C_FLOAT), 7 (SQL_C_FLOAT), 0]
Setted type SQL_C_DOUBLE -> [8 (SQL_C_DOUBLE), 8 (SQL_C_DOUBLE), 0]
Setted type SQL_C_NUMERIC -> [2 (SQL_C_NUMERIC), 2 (SQL_C_NUMERIC), 0]
Setted type SQL_C_DEFAULT -> [99 (SQL_C_DEFAULT), 99 (SQL_C_DEFAULT), 0]
Setted type SQL_C_DATE -> [91 (SQL_C_TYPE_DATE), 9 (SQL_C_DATE), 1]
Setted type SQL_C_TIME -> [92 (SQL_C_TYPE_TIME), 9 (SQL_C_DATE), 2]
Setted type SQL_C_TIMESTAMP -> [93 (SQL_C_TYPE_TIMESTAMP), 9 (SQL_C_DATE), 3]
Setted type SQL_C_TYPE_DATE -> [91 (SQL_C_TYPE_DATE), 9 (SQL_C_DATE), 1]
Setted type SQL_C_TYPE_TIME -> [92 (SQL_C_TYPE_TIME), 9 (SQL_C_DATE), 2]
Setted type SQL_C_TYPE_TIMESTAMP -> [93 (SQL_C_TYPE_TIMESTAMP), 9
(SQL_C_DATE), 3]
Setted type SQL_C_INTERVAL_YEAR -> [101 (SQL_C_INTERVAL_YEAR), 10
(SQL_C_TIME), 1]
Setted type SQL_C_INTERVAL_MONTH -> [102 (SQL_C_INTERVAL_MONTH), 10
(SQL_C_TIME), 2]
Setted type SQL_C_INTERVAL_DAY -> [103 (SQL_C_INTERVAL_DAY), 10 (SQL_C_TIME),
3]
Setted type SQL_C_INTERVAL_HOUR -> [104 (SQL_C_INTERVAL_HOUR), 10
(SQL_C_TIME), 4]
Setted type SQL_C_INTERVAL_MINUTE -> [105 (SQL_C_INTERVAL_MINUTE), 10
(SQL_C_TIME), 5]
Setted type SQL_C_INTERVAL_SECOND -> [106 (SQL_C_INTERVAL_SECOND), 10
(SQL_C_TIME), 6]
Setted type SQL_C_INTERVAL_YEAR_TO_MONTH -> [107
(SQL_C_INTERVAL_YEAR_TO_MONTH), 10 (SQL_C_TIME), 7]
Setted type SQL_C_INTERVAL_DAY_TO_HOUR -> [108 (SQL_C_INTERVAL_DAY_TO_HOUR),
10 (SQL_C_TIME), 8]
Setted type SQL_C_INTERVAL_DAY_TO_MINUTE -> [109
(SQL_C_INTERVAL_DAY_TO_MINUTE), 10 (SQL_C_TIME), 9]
Setted type SQL_C_INTERVAL_DAY_TO_SECOND -> [110
(SQL_C_INTERVAL_DAY_TO_SECOND), 10 (SQL_C_TIME), 10]
Setted type SQL_C_INTERVAL_HOUR_TO_MINUTE -> [111
(SQL_C_INTERVAL_HOUR_TO_MINUTE), 10 (SQL_C_TIME), 11]
Setted type SQL_C_INTERVAL_HOUR_TO_SECOND -> [112
(SQL_C_INTERVAL_HOUR_TO_SECOND), 10 (SQL_C_TIME), 12]
Setted type SQL_C_INTERVAL_MINUTE_TO_SECOND -> [113
(SQL_C_INTERVAL_MINUTE_TO_SECOND), 10 (SQL_C_TIME), 13]
Setted type SQL_C_BINARY -> [-2 (SQL_C_BINARY), -2 (SQL_C_BINARY), 0]
Setted type SQL_C_BIT -> [-7 (SQL_C_BIT), -7 (SQL_C_BIT), 0]
Setted type SQL_C_SBIGINT -> [-25 (SQL_C_SBIGINT), -25 (SQL_C_SBIGINT), 0]
Setted type SQL_C_UBIGINT -> [-27 (SQL_C_UBIGINT), -27 (SQL_C_UBIGINT), 0]
Setted type SQL_C_TINYINT -> [-6 (SQL_C_TINYINT), -6 (SQL_C_TINYINT), 0]
Setted type SQL_C_SLONG -> [-16 (SQL_C_SLONG), -16 (SQL_C_SLONG), 0]
Setted type SQL_C_SSHORT -> [-15 (SQL_C_SSHORT), -15 (SQL_C_SSHORT), 0]
Setted type SQL_C_STINYINT -> [-26 (SQL_C_STINYINT), -26 (SQL_C_STINYINT), 0]
Setted type SQL_C_ULONG -> [-18 (SQL_C_ULONG), -18 (SQL_C_ULONG), 0]
Setted type SQL_C_USHORT -> [-17 (SQL_C_USHORT), -17 (SQL_C_USHORT), 0]
Setted type SQL_C_UTINYINT -> [-28 (SQL_C_UTINYINT), -28 (SQL_C_UTINYINT), 0]
Setted type SQL_C_GUID -> [-11 (SQL_C_GUID), -11 (SQL_C_GUID), 0]
Error setting type -5 (SQL_BIGINT)
Error setting type -3 (SQL_VARBINARY)
Error setting type -4 (SQL_LONGVARBINARY)
Error setting type 12 (SQL_VARCHAR)
Error setting type -1 (SQL_LONGVARCHAR)
Error setting type 3 (SQL_DECIMAL)
Error setting type 6 (SQL_FLOAT)


Setted type SQL_C_CHAR -> [1 (SQL_C_CHAR), 1 (SQL_C_CHAR), 0]
Setted type SQL_C_LONG -> [4 (SQL_C_LONG), 4 (SQL_C_LONG), 0]
Setted type SQL_C_SHORT -> [5 (SQL_C_SHORT), 5 (SQL_C_SHORT), 0]
Setted type SQL_C_FLOAT -> [7 (SQL_C_FLOAT), 7 (SQL_C_FLOAT), 0]
Setted type SQL_C_DOUBLE -> [8 (SQL_C_DOUBLE), 8 (SQL_C_DOUBLE), 0]
Setted type SQL_C_NUMERIC -> [2 (SQL_C_NUMERIC), 2 (SQL_C_NUMERIC), 0]
Error setting type 99 (SQL_C_DEFAULT)
Error setting type 9 (SQL_C_DATE)
Error setting type 10 (SQL_C_TIME)
Error setting type 11 (SQL_C_TIMESTAMP)
Error setting type 91 (SQL_C_TYPE_DATE)
Error setting type 92 (SQL_C_TYPE_TIME)
Setted type SQL_C_TYPE_TIMESTAMP -> [93 (SQL_C_TYPE_TIMESTAMP), 9
(SQL_C_DATE), 3]
Error setting type 101 (SQL_C_INTERVAL_YEAR)
Error setting type 102 (SQL_C_INTERVAL_MONTH)
Error setting type 103 (SQL_C_INTERVAL_DAY)
Error setting type 104 (SQL_C_INTERVAL_HOUR)
Error setting type 105 (SQL_C_INTERVAL_MINUTE)
Error setting type 106 (SQL_C_INTERVAL_SECOND)
Error setting type 107 (SQL_C_INTERVAL_YEAR_TO_MONTH)
Error setting type 108 (SQL_C_INTERVAL_DAY_TO_HOUR)
Error setting type 109 (SQL_C_INTERVAL_DAY_TO_MINUTE)
Error setting type 110 (SQL_C_INTERVAL_DAY_TO_SECOND)
Error setting type 111 (SQL_C_INTERVAL_HOUR_TO_MINUTE)
Error setting type 112 (SQL_C_INTERVAL_HOUR_TO_SECOND)
Error setting type 113 (SQL_C_INTERVAL_MINUTE_TO_SECOND)
Setted type SQL_C_BINARY -> [-2 (SQL_C_BINARY), -2 (SQL_C_BINARY), 0]
Setted type SQL_C_BIT -> [-7 (SQL_C_BIT), -7 (SQL_C_BIT), 0]
Error setting type -25 (SQL_C_SBIGINT)
Error setting type -27 (SQL_C_UBIGINT)
Setted type SQL_C_TINYINT -> [-6 (SQL_C_TINYINT), -6 (SQL_C_TINYINT), 0]
Error setting type -16 (SQL_C_SLONG)
Error setting type -15 (SQL_C_SSHORT)
Error setting type -26 (SQL_C_STINYINT)
Error setting type -18 (SQL_C_ULONG)
Error setting type -17 (SQL_C_USHORT)
Error setting type -28 (SQL_C_UTINYINT)
Setted type SQL_C_GUID -> [-11 (SQL_C_GUID), -11 (SQL_C_GUID), 0]
Setted type SQL_BIGINT -> [-5 (SQL_BIGINT), -5 (SQL_BIGINT), 0]
Setted type SQL_VARBINARY -> [-3 (SQL_VARBINARY), -3 (SQL_VARBINARY), 0]
Setted type SQL_LONGVARBINARY -> [-4 (SQL_LONGVARBINARY), -4
(SQL_LONGVARBINARY), 0]
Setted type SQL_VARCHAR -> [12 (SQL_VARCHAR), 12 (SQL_VARCHAR), 0]
Setted type SQL_LONGVARCHAR -> [-1 (SQL_LONGVARCHAR), -1 (SQL_LONGVARCHAR), 0]
Setted type SQL_DECIMAL -> [3 (SQL_DECIMAL), 3 (SQL_DECIMAL), 0]
Setted type SQL_FLOAT -> [6 (SQL_FLOAT), 6 (SQL_FLOAT), 0]
PASS: type
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
drop proc spTestProc
Unable to execute statement
CREATE PROC spTestProc @i NUMERIC(18,2) OUTPUT AS SELECT @i =
CONVERT(NUMERIC(18,2), '123')
drop proc spTestProc
SELECT CONVERT(INTEGER, '12345')
CREATE TABLE #tmp_insert (col VARCHAR(20))
SELECT * FROM #tmp_insert WHERE col = CONVERT(VARCHAR(20), '12345')
DROP TABLE #tmp_insert
Done successfully!
PASS: genparams
odbctest
--------

connection parameters:
server: 'stpmdb'
user: 'scbdp'
password: '????'
database: 'pmdb'
use pmdb
CREATE TABLE #urls ( recdate DATETIME )
INSERT INTO #urls ( recdate ) VALUES ( '2003-10-1 10:11:1 0' )
Done.
PASS: preperror
====================
5 of 22 tests failed
====================
gmake[2]: *** [check-TESTS] Error 1
gmake[2]: Leaving directory `/usr/home/nick/freetds/src/odbc/unittests'
gmake[1]: *** [check-am] Error 2
gmake[1]: Leaving directory `/usr/home/nick/freetds/src/odbc/unittests'
gmake: *** [check-recursive] Error 1
bash-2.05$ exit

Script done on Fri Jan 9 11:32:59 2004



Archive powered by MHonArc 2.6.24.

Top of Page