Skip to Content.
Sympa Menu

freetds - Re: [freetds] [0.95rc2] Preliminary test results

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Sergio NNX <sfhacker AT hotmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] [0.95rc2] Preliminary test results
  • Date: Wed, 13 May 2015 06:07:39 +1000

> I start to suspect this (and the other rpc test) could be due to some
> changes in the protocol for mssql 2008 r2.
> I'll need a dump to confirm it.

dblib/rpc test dump

About to logon
expected error 20201: "Packet size of -1 not supported -- size of 0 used
instead!"
About to open localhost.tempdb
Check if server support long identifiers
1: SELECT 'x' AS this_is_a_really_really_long_identifier
trying to create a temporary stored procedure
Creating procedure #t0022
1:
2: CREATE PROCEDURE #t0022
3: @null_input varchar(30) OUTPUT
4: , @first_type varchar(30) OUTPUT
5: , @nullout int OUTPUT
6: , @varchar_tds7_out varchar(8000) OUTPUT
7: , @nvarchar_tds7_out nvarchar(4000) OUTPUT
8: , @nrows int OUTPUT
9: , @c_this_name_is_way_more_than_thirty_characters_charlie varchar(20)
10: , @nv nvarchar(20) = N'hello'
11: AS
12: BEGIN
13: if @null_input is not NULL begin
14: select 'error: should be NULL' as status, @null_input as
'null_input'
15: return -42
16: end else begin
17: print 'Good: @null_input is NULL'
18: end
19: if @c_this_name_is_way_more_than_thirty_characters_charlie is not
NULL begin
20: select 'error: should be NULL' as status,
@c_this_name_is_way_more_than_thirty_characters_charlie as
'@c_this_name_is_way_more_than_thirty_characters_charlie'
21: return -42
22: end else begin
23: print 'Good:
@c_this_name_is_way_more_than_thirty_characters_charlie is NULL'
24: end
25: select @null_input = max(convert(varchar(30), name)) from systypes
26: select @first_type = min(convert(varchar(30), name)) from systypes
27: select name from sysobjects where 0=1
28: select distinct convert(varchar(30), name) as 'type' from systypes
29: where name in ('int', 'char', 'text')
30: select @nrows = @@rowcount
31: set @varchar_tds7_out = replicate(char(247), 8000)
32: set @nvarchar_tds7_out = replicate(nchar(246), 4000)
33: select distinct @nv as '@nv', convert(varchar(30), name) as name
from sysobjects where type = 'S'
34: select @null_input as 'null_input'
35: , @first_type as 'first_type'
36: , @nullout as 'nullout'
37: , @nrows as 'nrows'
38: , @c_this_name_is_way_more_than_thirty_characters_charlie as 'c'
39: , @nv as 'nv'
40: into #parameters
41: select * from #parameters
42: return 42
43: END
44:
Created procedure #t0022
executing dbrpcinit
executing dbrpcparam for @null_input
executing dbrpcparam for @first_type
executing dbrpcparam for @nullout
executing dbrpcparam for @varchar_tds7_out
executing dbrpcparam for @nvarchar_tds7_out
executing dbrpcparam for @nrows
executing dbrpcparam for
@c_this_name_is_way_more_than_thirty_characters_charlie
executing dbrpcparam for @nv
executing dbrpcsend
executing dbsqlok
Good: @null_input is NULL
Good: @c_this_name_is_way_more_than_thirty_characters_charlie is NULL
fetching results
fetched resultset 1 successfully:
column 1 (name) is 1 wide, buffer initialized to 'one'
name
row count 0
fetched resultset 2 successfully:
column 1 (type) is 1 wide, buffer initialized to 'one'
type
char
int
text
row count 3
fetched resultset 3 successfully:
column 1 (@nv) is 1 wide, buffer initialized to 'one'
column 2 (name) is 1 wide, buffer initialized to 'two'
@nv name
row count 0
fetched resultset 4 successfully:
column 1 (null_input) is 1 wide, buffer initialized to 'one'
column 2 (first_type) is 1 wide, buffer initialized to 'two'
column 3 (nullout) is 1 wide, buffer initialized to 'three'
column 4 (nrows) is 1 wide, buffer initialized to 'four'
column 5 (c) is 1 wide, buffer initialized to 'five'
null_input first_type nullout nrows c
xml bigint 3
row count 1
retrieving return status...
42
retrieving output parameters...
param name type length data
---- ------------------- ---- ----- ------------------------------
1 @null_input 39 3 xml
2 @first_type 39 6 bigint
3 @nullout 56 0
4 @varchar_tds7_out 39 8000 ÷÷÷÷÷÷÷÷÷÷...
5 @nvarchar_tds7_out 39 4000 öööööööööö...
6 @nrows 56 4 3
Good: Got 6 output parameters and 1 return status of 42.
Expected an empty resultset got 2.
FAIL rpc.exe (exit status: 1)


>> freeclose test output
>>
>> [...]
>> Error finding last socket opened
>> FAIL freeclose.exe (exit status: 1)
>>

> Can you try the attached version?

It didn't work. Same error message as before.
I'd like to understand that test. What's a typical result for this function:
odbc_find_last_socket(void)?
What's a common (or default) value for ip remote addr and remote port? Show
me an example.

Thanks for your time.

Sergio.






Archive powered by MHonArc 2.6.24.

Top of Page