Skip to Content.
Sympa Menu

freetds - Output parameters (src/dblib/unittests/t0022.c)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Castellano, Nicholas" <Nicholas_Castellano AT acml.com>
  • To: "'freetds AT franklin.oit.unc.edu'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Output parameters (src/dblib/unittests/t0022.c)
  • Date: Tue, 8 Oct 2002 15:46:30 -0400

The behavior of output parameters in TDS 7/8 is different from TDS 4.2. In
particular, it appears that output parameter results are not sent back to
the client, so the test in src/dblib/unittests/t0022.c always fails.

I verified the behavior by sniffing the traffic from Query Analyzer to a
SQL2K server over a TCP connection. The packets we get back from the server
appear identical to those we get when connecting from FreeTDS. So I don't
think it's something we're doing wrong; SQL Server just never sends a 0xAC
token with the output parameters. When TDS 4.2 is used to connect to the
same server, the 0xAC packet is sent and the test succeeds.

I don't think it's good to include a test that may always fail in certain
setups. Is there some way we can limit this test so it doesn't execute for
TSD7 and TDS8 connections? Or should we just remove the test altogether?

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 for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.




2002-10-04 13:04:43.824518 inside tds_process_login_tokens()
Received header @ 2002-10-04 13:04:44.029963
0000 04 01 00 96 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:04:44.030204
0000 e3 0d 00 01 04 70 6d 64 62 06 6d 61 73 74 65 72 |.....pmdb .master|
0010 ab 36 00 45 16 00 00 02 00 23 00 43 68 61 6e 67 |.6.E..... #.Chang|
0020 65 64 20 64 61 74 61 62 61 73 65 20 63 6f 6e 74 |ed databa se cont|
0030 65 78 74 20 74 6f 20 27 70 6d 64 62 27 2e 07 4e |ext to 'p mdb'..N|
0040 54 53 30 30 39 30 00 00 00 e3 09 00 03 05 69 73 |TS0090... .....is|
0050 6f 5f 31 01 01 ad 20 00 01 04 02 00 00 16 4d 69 |o_1... .. .....Mi|
0060 63 72 6f 73 6f 66 74 20 53 51 4c 20 53 65 72 76 |crosoft S QL Serv|
0070 65 72 00 00 5f 08 00 c2 e3 0a 00 04 03 35 31 32 |er.._.... ....512|
0080 04 34 30 39 36 fd 00 00 00 00 00 00 00 00 |.4096.... .....|


2002-10-04 13:04:44.031229 inside tds_process_default_tokens() marker is e3
2002-10-04 13:04:44.031368 inside tds_process_default_tokens() marker is ab
2002-10-04 13:04:44.031546 inside tds_process_default_tokens() marker is e3
2002-10-04 13:04:44.031759 inside tds_process_default_tokens() marker is e3
2002-10-04 13:04:44.031888 inside tds_process_default_tokens() marker is fd
2002-10-04 13:04:44.032006 leaving tds_process_login_tokens() returning 1
Sending packet @ 2002-10-04 13:04:44.032187
0000 01 01 00 1a 00 00 00 00 73 65 74 20 74 65 78 74 |........s et text|
0010 73 69 7a 65 20 33 32 37 36 38 |size 3276 8|


Received header @ 2002-10-04 13:04:44.034063
0000 04 01 00 11 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:04:44.034275
0000 fd 00 00 be 00 00 00 00 00 |......... |


2002-10-04 13:04:44.034455 processing result tokens. marker is fd
Sending packet @ 2002-10-04 13:04:44.034658
0000 01 01 00 10 00 00 00 00 75 73 65 20 70 6d 64 62 |........u se pmdb|


Received header @ 2002-10-04 13:04:44.036638
0000 04 01 00 58 00 33 01 00 |...X.3..|


Received packet @ 2002-10-04 13:04:44.036849
0000 e3 0b 00 01 04 70 6d 64 62 04 70 6d 64 62 ab 36 |.....pmdb .pmdb.6|
0010 00 45 16 00 00 01 00 23 00 43 68 61 6e 67 65 64 |.E.....#. Changed|
0020 20 64 61 74 61 62 61 73 65 20 63 6f 6e 74 65 78 | database contex|
0030 74 20 74 6f 20 27 70 6d 64 62 27 2e 07 4e 54 53 |t to 'pmd b'..NTS|
0040 30 30 39 30 00 01 00 fd 00 00 e2 00 00 00 00 00 |0090..... .......|


2002-10-04 13:04:44.037496 inside tds_process_default_tokens() marker is e3
2002-10-04 13:04:44.037621 inside tds_process_default_tokens() marker is ab
2002-10-04 13:04:44.037766 inside tds_process_default_tokens() marker is fd
Sending packet @ 2002-10-04 13:04:44.038384
0000 01 01 00 17 00 00 00 00 64 72 6f 70 20 70 72 6f |........d rop pro|
0010 63 20 74 30 30 32 32 |c t0022|


Received header @ 2002-10-04 13:04:44.040624
0000 04 01 00 7a 00 33 01 00 |...z.3..|


Received packet @ 2002-10-04 13:04:44.040844
0000 aa 66 00 75 0e 00 00 05 0b 53 00 43 61 6e 6e 6f |.f.u..... S.Canno|
0010 74 20 64 72 6f 70 20 74 68 65 20 70 72 6f 63 65 |t drop th e proce|
0020 64 75 72 65 20 27 74 30 30 32 32 27 2c 20 62 65 |dure 't00 22', be|
0030 63 61 75 73 65 20 69 74 20 64 6f 65 73 20 6e 6f |cause it does no|
0040 74 20 65 78 69 73 74 20 69 6e 20 74 68 65 20 73 |t exist i n the s|
0050 79 73 74 65 6d 20 63 61 74 61 6c 6f 67 2e 07 4e |ystem cat alog..N|
0060 54 53 30 30 39 30 00 01 00 fd 02 00 df 00 00 00 |TS0090... .......|
0070 00 00 |..|


2002-10-04 13:04:44.041711 inside tds_process_default_tokens() marker is aa
2002-10-04 13:04:44.042351 inside tds_process_default_tokens() marker is fd
2002-10-04 13:04:44.042490 inside dbresults()
2002-10-04 13:04:44.042598 leaving dbresults() returning 1
2002-10-04 13:04:44.042700 inside dbresults()
2002-10-04 13:04:44.042796 leaving dbresults() returning 2
Sending packet @ 2002-10-04 13:04:44.042960
0000 01 01 00 44 00 00 00 00 63 72 65 61 74 65 20 70 |...D....c reate p|
0010 72 6f 63 20 74 30 30 32 32 20 28 40 62 20 69 6e |roc t0022 (@b in|
0020 74 20 6f 75 74 29 20 61 73 0a 62 65 67 69 6e 0a |t out) as .begin.|
0030 20 73 65 6c 65 63 74 20 40 62 20 3d 20 34 32 0a | select @ b = 42.|
0040 65 6e 64 0a |end.|


Received header @ 2002-10-04 13:04:44.054731
0000 04 01 00 11 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:04:44.054952
0000 fd 00 00 de 00 00 00 00 00 |......... |


2002-10-04 13:04:44.055134 inside tds_process_default_tokens() marker is fd
2002-10-04 13:04:44.055245 inside dbresults()
2002-10-04 13:04:44.055342 leaving dbresults() returning 1
2002-10-04 13:04:44.055440 inside dbresults()
2002-10-04 13:04:44.055534 leaving dbresults() returning 2
Sending packet @ 2002-10-04 13:04:44.055728
0000 01 01 00 30 00 00 00 00 64 65 63 6c 61 72 65 20 |...0....d eclare |
0010 40 61 20 69 6e 74 0a 65 78 65 63 20 74 30 30 32 |@a int.ex ec t002|
0020 32 20 40 62 20 3d 20 40 61 20 6f 75 74 70 75 74 |2 @b = @a output|


Received header @ 2002-10-04 13:04:44.058570
0000 04 01 00 31 00 33 01 00 |...1.3..|


Received packet @ 2002-10-04 13:04:44.058790
0000 ff 11 00 c1 00 01 00 00 00 79 00 00 00 00 ac 0f |......... y......|
0010 00 02 40 62 01 38 00 00 00 26 04 04 2a 00 00 00 |..@b.8... &..*...|
0020 fe 00 00 e0 00 01 00 00 00 |......... |


2002-10-04 13:04:44.059178 inside tds_process_default_tokens() marker is ff
2002-10-04 13:04:44.059287 inside tds_process_default_tokens() marker is 79
2002-10-04 13:04:44.059392 inside tds_process_default_tokens() marker is ac
2002-10-04 13:04:44.059519 processing result. type = 38, varint_size 1
2002-10-04 13:04:44.059628 processing result. column_size 4
2002-10-04 13:04:44.059740 processing row. column is 0 varint size = 1
2002-10-04 13:04:44.059847 processing row. column size is 4
2002-10-04 13:04:44.059952 clearing column 0 NULL bit
2002-10-04 13:04:44.060072 inside tds_process_default_tokens() marker is fe
2002-10-04 13:04:44.060189 inside dbresults()
2002-10-04 13:04:44.060288 leaving dbresults() returning 1
2002-10-04 13:04:44.060394 inside dbnextrow()
2002-10-04 13:04:44.060490 leaving dbnextrow() returning -2
2002-10-04 13:04:44.060588 inside dbresults()
2002-10-04 13:04:44.060683 leaving dbresults() returning 2
2002-10-04 13:04:44.060924 inside dbconvert() srctype = 56 desttype = 39
2002-10-04 13:04:44.061037 inside dbconvert() calling tds_convert
2002-10-04 13:04:44.061191 inside dbconvert() outputting 2 bytes character
data destlen = -1
Sending packet @ 2002-10-04 13:04:44.061394
0000 01 01 00 17 00 00 00 00 64 72 6f 70 20 70 72 6f |........d rop pro|
0010 63 20 74 30 30 32 32 |c t0022|


Received header @ 2002-10-04 13:04:44.064220
0000 04 01 00 11 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:04:44.064432
0000 fd 00 00 df 00 00 00 00 00 |......... |


2002-10-04 13:04:44.064627 inside tds_process_default_tokens() marker is fd
2002-10-04 13:04:44.064745 inside dbresults()
2002-10-04 13:04:44.064846 leaving dbresults() returning 1
2002-10-04 13:04:44.064944 inside dbresults()
2002-10-04 13:04:44.065037 leaving dbresults() returning 2
2002-10-04 13:06:13.600826 inside tds_process_login_tokens()
Received header @ 2002-10-04 13:06:13.626814
0000 04 01 01 8a 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:06:13.627067
0000 e3 17 00 01 04 70 00 6d 00 64 00 62 00 06 6d 00 |.....p.m. d.b..m.|
0010 61 00 73 00 74 00 65 00 72 00 ab 60 00 45 16 00 |a.s.t.e.r ..`.E..|
0020 00 02 00 23 00 43 00 68 00 61 00 6e 00 67 00 65 |...#.C.h. a.n.g.e|
0030 00 64 00 20 00 64 00 61 00 74 00 61 00 62 00 61 |.d. .d.a. t.a.b.a|
0040 00 73 00 65 00 20 00 63 00 6f 00 6e 00 74 00 65 |.s.e. .c. o.n.t.e|
0050 00 78 00 74 00 20 00 74 00 6f 00 20 00 27 00 70 |.x.t. .t. o. .'.p|
0060 00 6d 00 64 00 62 00 27 00 2e 00 07 4e 00 54 00 |.m.d.b.'. ...N.T.|
0070 53 00 30 00 30 00 39 00 30 00 00 00 00 e3 17 00 |S.0.0.9.0 .......|
0080 02 0a 75 00 73 00 5f 00 65 00 6e 00 67 00 6c 00 |..u.s._.e .n.g.l.|
0090 69 00 73 00 68 00 00 ab 68 00 47 16 00 00 01 00 |i.s.h...h .G.....|
00a0 27 00 43 00 68 00 61 00 6e 00 67 00 65 00 64 00 |'.C.h.a.n .g.e.d.|
00b0 20 00 6c 00 61 00 6e 00 67 00 75 00 61 00 67 00 | .l.a.n.g .u.a.g.|
00c0 65 00 20 00 73 00 65 00 74 00 74 00 69 00 6e 00 |e. .s.e.t .t.i.n.|
00d0 67 00 20 00 74 00 6f 00 20 00 75 00 73 00 5f 00 |g. .t.o. .u.s._.|
00e0 65 00 6e 00 67 00 6c 00 69 00 73 00 68 00 2e 00 |e.n.g.l.i .s.h...|
00f0 07 4e 00 54 00 53 00 30 00 30 00 39 00 30 00 00 |.N.T.S.0. 0.9.0..|
0100 00 00 e3 0f 00 03 05 69 00 73 00 6f 00 5f 00 31 |.......i. s.o._.1|
0110 00 01 01 00 e3 0b 00 05 04 31 00 30 00 33 00 33 |......... 1.0.3.3|
0120 00 00 e3 05 00 06 01 30 00 00 ad 36 00 01 07 00 |.......0. ..6....|
0130 00 00 16 4d 00 69 00 63 00 72 00 6f 00 73 00 6f |...M.i.c. r.o.s.o|
0140 00 66 00 74 00 20 00 53 00 51 00 4c 00 20 00 53 |.f.t. .S. Q.L. .S|
0150 00 65 00 72 00 76 00 65 00 72 00 00 00 00 00 08 |.e.r.v.e. r......|
0160 00 00 c2 e3 13 00 04 04 34 00 30 00 39 00 36 00 |........4 .0.9.6.|
0170 04 34 00 30 00 39 00 36 00 fd 00 00 00 00 00 00 |.4.0.9.6. .......|
0180 00 00 |..|


2002-10-04 13:06:13.629731 inside tds_process_default_tokens() marker is e3
2002-10-04 13:06:13.629881 inside tds_process_default_tokens() marker is ab
2002-10-04 13:06:13.630067 inside tds_process_default_tokens() marker is e3
2002-10-04 13:06:13.630195 inside tds_process_default_tokens() marker is ab
2002-10-04 13:06:13.630328 inside tds_process_default_tokens() marker is e3
2002-10-04 13:06:13.630450 inside tds_process_default_tokens() marker is e3
2002-10-04 13:06:13.630568 inside tds_process_default_tokens() marker is e3
2002-10-04 13:06:13.630689 inside tds_process_default_tokens() marker is e3
2002-10-04 13:06:13.630810 increasing block size from 4096 to 4096
2002-10-04 13:06:13.630946 inside tds_process_default_tokens() marker is fd
2002-10-04 13:06:13.631070 leaving tds_process_login_tokens() returning 1
Sending packet @ 2002-10-04 13:06:13.631253
0000 01 01 00 2c 00 00 01 00 73 00 65 00 74 00 20 00 |...,....s .e.t. .|
0010 74 00 65 00 78 00 74 00 73 00 69 00 7a 00 65 00 |t.e.x.t.s .i.z.e.|
0020 20 00 33 00 32 00 37 00 36 00 38 00 | .3.2.7.6 .8.|


Received header @ 2002-10-04 13:06:13.633446
0000 04 01 00 11 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:06:13.633662
0000 fd 00 00 be 00 00 00 00 00 |......... |


2002-10-04 13:06:13.633844 processing result tokens. marker is fd
Sending packet @ 2002-10-04 13:06:13.634048
0000 01 01 00 18 00 00 01 00 75 00 73 00 65 00 20 00 |........u .s.e. .|
0010 70 00 6d 00 64 00 62 00 |p.m.d.b.|


Received header @ 2002-10-04 13:06:13.636222
0000 04 01 00 8a 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:06:13.636437
0000 e3 13 00 01 04 70 00 6d 00 64 00 62 00 04 70 00 |.....p.m. d.b..p.|
0010 6d 00 64 00 62 00 ab 60 00 45 16 00 00 01 00 23 |m.d.b..`. E.....#|
0020 00 43 00 68 00 61 00 6e 00 67 00 65 00 64 00 20 |.C.h.a.n. g.e.d. |
0030 00 64 00 61 00 74 00 61 00 62 00 61 00 73 00 65 |.d.a.t.a. b.a.s.e|
0040 00 20 00 63 00 6f 00 6e 00 74 00 65 00 78 00 74 |. .c.o.n. t.e.x.t|
0050 00 20 00 74 00 6f 00 20 00 27 00 70 00 6d 00 64 |. .t.o. . '.p.m.d|
0060 00 62 00 27 00 2e 00 07 4e 00 54 00 53 00 30 00 |.b.'....N .T.S.0.|
0070 30 00 39 00 30 00 00 01 00 fd 00 00 e2 00 00 00 |0.9.0.... .......|
0080 00 00 |..|


2002-10-04 13:06:13.637611 inside tds_process_default_tokens() marker is e3
2002-10-04 13:06:13.637747 inside tds_process_default_tokens() marker is ab
2002-10-04 13:06:13.637880 inside tds_process_default_tokens() marker is fd
Sending packet @ 2002-10-04 13:06:13.638497
0000 01 01 00 26 00 00 01 00 64 00 72 00 6f 00 70 00 |...&....d .r.o.p.|
0010 20 00 70 00 72 00 6f 00 63 00 20 00 74 00 30 00 | .p.r.o.c . .t.0.|
0020 30 00 32 00 32 00 |0.2.2.|


Received header @ 2002-10-04 13:06:13.641202
0000 04 01 00 d4 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:06:13.641425
0000 aa c0 00 75 0e 00 00 05 0b 53 00 43 00 61 00 6e |...u..... S.C.a.n|
0010 00 6e 00 6f 00 74 00 20 00 64 00 72 00 6f 00 70 |.n.o.t. . d.r.o.p|
0020 00 20 00 74 00 68 00 65 00 20 00 70 00 72 00 6f |. .t.h.e. .p.r.o|
0030 00 63 00 65 00 64 00 75 00 72 00 65 00 20 00 27 |.c.e.d.u. r.e. .'|
0040 00 74 00 30 00 30 00 32 00 32 00 27 00 2c 00 20 |.t.0.0.2. 2.'.,. |
0050 00 62 00 65 00 63 00 61 00 75 00 73 00 65 00 20 |.b.e.c.a. u.s.e. |
0060 00 69 00 74 00 20 00 64 00 6f 00 65 00 73 00 20 |.i.t. .d. o.e.s. |
0070 00 6e 00 6f 00 74 00 20 00 65 00 78 00 69 00 73 |.n.o.t. . e.x.i.s|
0080 00 74 00 20 00 69 00 6e 00 20 00 74 00 68 00 65 |.t. .i.n. .t.h.e|
0090 00 20 00 73 00 79 00 73 00 74 00 65 00 6d 00 20 |. .s.y.s. t.e.m. |
00a0 00 63 00 61 00 74 00 61 00 6c 00 6f 00 67 00 2e |.c.a.t.a. l.o.g..|
00b0 00 07 4e 00 54 00 53 00 30 00 30 00 39 00 30 00 |..N.T.S.0 .0.9.0.|
00c0 00 01 00 fd 02 00 df 00 00 00 00 00 |......... ...|


2002-10-04 13:06:13.642847 inside tds_process_default_tokens() marker is aa
2002-10-04 13:06:13.643504 inside tds_process_default_tokens() marker is fd
2002-10-04 13:06:13.643645 inside dbresults()
2002-10-04 13:06:13.643754 leaving dbresults() returning 1
2002-10-04 13:06:13.643857 inside dbresults()
2002-10-04 13:06:13.643956 leaving dbresults() returning 2
Sending packet @ 2002-10-04 13:06:13.644131
0000 01 01 00 80 00 00 01 00 63 00 72 00 65 00 61 00 |........c .r.e.a.|
0010 74 00 65 00 20 00 70 00 72 00 6f 00 63 00 20 00 |t.e. .p.r .o.c. .|
0020 74 00 30 00 30 00 32 00 32 00 20 00 28 00 40 00 |t.0.0.2.2 . .(.@.|
0030 62 00 20 00 69 00 6e 00 74 00 20 00 6f 00 75 00 |b. .i.n.t . .o.u.|
0040 74 00 29 00 20 00 61 00 73 00 0a 00 62 00 65 00 |t.). .a.s ...b.e.|
0050 67 00 69 00 6e 00 0a 00 20 00 73 00 65 00 6c 00 |g.i.n... .s.e.l.|
0060 65 00 63 00 74 00 20 00 40 00 62 00 20 00 3d 00 |e.c.t. .@ .b. .=.|
0070 20 00 34 00 32 00 0a 00 65 00 6e 00 64 00 0a 00 | .4.2...e .n.d...|


Received header @ 2002-10-04 13:06:13.668975
0000 04 01 00 11 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:06:13.669198
0000 fd 00 00 de 00 00 00 00 00 |......... |


2002-10-04 13:06:13.669430 inside tds_process_default_tokens() marker is fd
2002-10-04 13:06:13.669545 inside dbresults()
2002-10-04 13:06:13.669644 leaving dbresults() returning 1
2002-10-04 13:06:13.669745 inside dbresults()
2002-10-04 13:06:13.669840 leaving dbresults() returning 2
Sending packet @ 2002-10-04 13:06:13.670318
0000 01 01 00 58 00 00 01 00 64 00 65 00 63 00 6c 00 |...X....d .e.c.l.|
0010 61 00 72 00 65 00 20 00 40 00 61 00 20 00 69 00 |a.r.e. .@ .a. .i.|
0020 6e 00 74 00 0a 00 65 00 78 00 65 00 63 00 20 00 |n.t...e.x .e.c. .|
0030 74 00 30 00 30 00 32 00 32 00 20 00 40 00 62 00 |t.0.0.2.2 . .@.b.|
0040 20 00 3d 00 20 00 40 00 61 00 20 00 6f 00 75 00 | .=. .@.a . .o.u.|
0050 74 00 70 00 75 00 74 00 |t.p.u.t.|


Received header @ 2002-10-04 13:06:13.673746
0000 04 01 00 1f 00 33 01 00 |.....3..|


Received packet @ 2002-10-04 13:06:13.673965
0000 ff 11 00 c1 00 01 00 00 00 79 00 00 00 00 fe 00 |......... y......|
0010 00 e0 00 01 00 00 00 |.......|


2002-10-04 13:06:13.674242 inside tds_process_default_tokens() marker is ff
2002-10-04 13:06:13.674353 inside tds_process_default_tokens() marker is 79
2002-10-04 13:06:13.674459 inside tds_process_default_tokens() marker is fe
2002-10-04 13:06:13.674574 inside dbresults()
2002-10-04 13:06:13.674674 leaving dbresults() returning 1
2002-10-04 13:06:13.674782 inside dbnextrow()
2002-10-04 13:06:13.674880 leaving dbnextrow() returning -2
2002-10-04 13:06:13.674978 inside dbresults()
2002-10-04 13:06:13.675074 leaving dbresults() returning 2



Archive powered by MHonArc 2.6.24.

Top of Page