freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Michael Peppler <mpeppler AT bluewin.ch>
- To: freddyz77 AT lycos.com, FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Cc:
- Subject: Re: [freetds] ct_dynamic()/ct_param() support
- Date: Sun, 12 Oct 2003 10:20:29 -0700
On Sun, 2003-10-12 at 01:40, Frediano Ziglio wrote:
> >I haven't been following the latest developments here very closely, but
> >I've been tasked with developing a perl DBI driver specifically for
> >FreeTDS. I'll base it off DBD::Sybase, and of course use the CT-Lib
> >interface.
> >
> >One of the features that has been lacking in FreeTDS was the support for
> >?-style placeholders, which in Client Library are implemented via
> >ct_dynamic() and ct_param() - so my question is: how close (or far) is
> >FreeTDS to support that feature for MS-SQL servers?
> >
>
> Problem is not MS-SQL or Sybase, problem is CTLib. Code for dynamic was in
> FreeTDS since 0.61 (with some bugs..) however it still works! I did
> many updates for ODBC but CTLib is not my library (I don't know even
> how to submit a dynamic query using CTLib...). Looking at code I saw a
> lot of TODO. No tds_submit_prepare/tds_submit_execute are called
> however code for parameters seem present (for RPC). Bill is preparing
> a patch for CTLib but I don't know is this patch include dynamic
> implementation.
Thanks - I looked at the code a little, and it *appears* that RPCs are
supported. After two small patches (one to support CS_NULLTERM as the
datalen parameter) I got the code to "work" - but it crashes the MSSQL
2k server that I've got running here (the server crashes *hard*!).
I've attached the tdsdump file, in case anyone can see what is missing.
Michael
Starting log file for FreeTDS 0.62.dev.20031011
on 2003-10-12 10:00:53 with debug level 99.
names for ISO-8859-1: ISO-8859-1
names for UTF-8: UTF-8
names for UCS-2LE: UCS-2LE
names for UCS-2BE: UCS-2BE
iconv to convert client-side data to the "ISO-8859-1" character set
10:00:53.071172 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
10:00:53.071402 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
10:00:53.071529 Connecting to 192.168.45.128 port 1433, TDS 8.0.
10:00:53.073060 tds_put_string converting 0 bytes of "troll.peppler.org"
10:00:53.088291 tds_put_string wrote 34 bytes
10:00:53.088439 tds_put_string converting 0 bytes of "sa"
10:00:53.088525 tds_put_string wrote 4 bytes
10:00:53.088603 password "" could not be converted to USC-2
10:00:53.088700 tds_put_string converting 0 bytes of "exec.t"
10:00:53.088784 tds_put_string wrote 12 bytes
10:00:53.088856 tds_put_string converting 0 bytes of "kiruna_win"
10:00:53.088936 tds_put_string wrote 20 bytes
10:00:53.089008 tds_put_string converting 0 bytes of "CT-Library"
10:00:53.089147 tds_put_string wrote 20 bytes
10:00:53.089221 tds_put_string converting 0 bytes of "us_english"
10:00:53.089299 tds_put_string wrote 20 bytes
10:00:53.089371 tds_put_string wrote 0 bytes
10:00:53.089653 tds_process_login_tokens()
Received header @ 10:00:53.200862
0000 04 01 01 7f 00 33 01 00- |.....3..|
Received packet @ 10:00:53.201192
0000 e3 1b 00 01 06 6d 00 61-00 73 00 74 00 65 00 72 |ã....m.a .s.t.e.r|
0010 00 06 6d 00 61 00 73 00-74 00 65 00 72 00 ab 6a |..m.a.s. t.e.r.«j|
0020 00 45 16 00 00 02 00 25-00 43 00 68 00 61 00 6e |.E.....% .C.h.a.n|
0030 00 67 00 65 00 64 00 20-00 64 00 61 00 74 00 61 |.g.e.d. .d.a.t.a|
0040 00 62 00 61 00 73 00 65-00 20 00 63 00 6f 00 6e |.b.a.s.e . .c.o.n|
0050 00 74 00 65 00 78 00 74-00 20 00 74 00 6f 00 20 |.t.e.x.t . .t.o. |
0060 00 27 00 6d 00 61 00 73-00 74 00 65 00 72 00 27 |.'.m.a.s .t.e.r.'|
0070 00 2e 00 0a 4b 00 49 00-52 00 55 00 4e 00 41 00 |....K.I. R.U.N.A.|
0080 5f 00 57 00 49 00 4e 00-00 00 00 e3 08 00 07 05 |_.W.I.N. ...ã....|
0090 09 04 d0 00 34 00 e3 17-00 02 0a 75 00 73 00 5f |..Ð.4.ã. ...u.s._|
00a0 00 65 00 6e 00 67 00 6c-00 69 00 73 00 68 00 00 |.e.n.g.l .i.s.h..|
00b0 ab 6e 00 47 16 00 00 01-00 27 00 43 00 68 00 61 |«n.G.... .'.C.h.a|
00c0 00 6e 00 67 00 65 00 64-00 20 00 6c 00 61 00 6e |.n.g.e.d . .l.a.n|
00d0 00 67 00 75 00 61 00 67-00 65 00 20 00 73 00 65 |.g.u.a.g .e. .s.e|
00e0 00 74 00 74 00 69 00 6e-00 67 00 20 00 74 00 6f |.t.t.i.n .g. .t.o|
00f0 00 20 00 75 00 73 00 5f-00 65 00 6e 00 67 00 6c |. .u.s._ .e.n.g.l|
0100 00 69 00 73 00 68 00 2e-00 0a 4b 00 49 00 52 00 |.i.s.h.. ..K.I.R.|
0110 55 00 4e 00 41 00 5f 00-57 00 49 00 4e 00 00 00 |U.N.A._. W.I.N...|
0120 00 ad 36 00 01 07 01 00-00 16 4d 00 69 00 63 00 |.6..... ..M.i.c.|
0130 72 00 6f 00 73 00 6f 00-66 00 74 00 20 00 53 00 |r.o.s.o. f.t. .S.|
0140 51 00 4c 00 20 00 53 00-65 00 72 00 76 00 65 00 |Q.L. .S. e.r.v.e.|
0150 72 00 00 00 00 00 08 00-00 c2 e3 11 00 04 03 35 |r....... .Âã....5|
0160 00 31 00 32 00 04 34 00-30 00 39 00 36 00 fd 00 |.1.2..4. 0.9.6.ý.|
0170 00 00 00 00 00 00 00 - |.......|
10:00:53.202216 looking for login token, got e3(ENVCHANGE)
10:00:53.202305 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 12 from wire to give 6 to client.
tds_get_string: reading 12 from wire to give 6 to client.
10:00:53.202679 looking for login token, got ab(INFO)
10:00:53.202757 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 74 from wire to give 37 to client.
tds_get_string: reading 20 from wire to give 10 to client.
10:00:53.203024 looking for login token, got e3(ENVCHANGE)
10:00:53.203105 tds_process_default_tokens() marker is e3(ENVCHANGE)
10:00:53.203257 tds_iconv_info_init: client charset name "" unrecognized
10:00:53.203340 looking for login token, got e3(ENVCHANGE)
10:00:53.203414 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 20 from wire to give 10 to client.
10:00:53.203554 looking for login token, got ab(INFO)
10:00:53.203727 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 78 from wire to give 39 to client.
tds_get_string: reading 20 from wire to give 10 to client.
10:00:53.204011 looking for login token, got ad(LOGINACK)
tds_get_string: reading 44 from wire to give 22 to client.
10:00:53.204153 looking for login token, got e3(ENVCHANGE)
10:00:53.204228 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 6 from wire to give 3 to client.
tds_get_string: reading 8 from wire to give 4 to client.
10:00:53.204430 looking for login token, got fd(DONE)
10:00:53.204505 tds_process_default_tokens() marker is fd(DONE)
10:00:53.204579 tds_process_end: more_results = 0
10:00:53.204610 was_cancelled = 0
10:00:53.204632 error = 0
10:00:53.204651 done_count_valid = 0
10:00:53.204715 leaving tds_process_login_tokens() returning 1
10:00:53.204891 tds_put_string converting 0 bytes of "set textsize 64512 "
10:00:53.204985 tds_put_string wrote 38 bytes
Sending packet @ 10:00:53.205062
0000 01 01 00 2e 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 36 00 34 00 35 00-31 00 32 00 20 00 | .6.4.5. 1.2. .|
Received header @ 10:00:53.212029
0000 04 01 00 11 00 33 01 00- |.....3..|
Received packet @ 10:00:53.212189
0000 fd 00 00 be 00 00 00 00-00 |ý..¾.... .|
10:00:53.212294 processing result tokens. marker is fd(DONE)
10:00:53.212377 tds_process_end: more_results = 0
10:00:53.212409 was_cancelled = 0
10:00:53.212431 error = 0
10:00:53.212451 done_count_valid = 0
10:00:53.212516 tds_process_result_tokens() state is COMPLETED
10:00:53.212616 leaving ct_connect() returning 1
10:00:53.213836 ct_cmd_alloc()
10:00:53.214056 ct_command()
10:00:53.214152 ct_command() added rpcname "sp_helpindex"
10:00:53.214246 ct_param()
10:00:53.214316 ct_param() data addr = 136722448 data length = -9
_ct_fill_param() status = 86
10:00:53.214445 _ct_get_server_type(1)
ct_param() added rpc parameter (null)
10:00:53.214593 ct_send()
10:00:53.214696 paraminfoalloc: status = 86, maxlen 0
10:00:53.214775 paraminfoalloc: name = .*s, varint size 0 column_type 0
column_cur_size 136723180 column_output = 2
10:00:53.214920 tds_put_data_info putting param_name
10:00:53.215006 tds_put_data_info putting status
10:00:53.215088 tds_put_data: is_null = 0, colsize = 8
10:00:53.215164 tds_put_data: not null param varint_size = 2
Sending packet @ 10:00:53.215243
0000 03 01 00 38 00 00 01 00-0c 00 73 00 70 00 5f 00 |...8.... ..s.p._.|
0010 68 00 65 00 6c 00 70 00-69 00 6e 00 64 00 65 00 |h.e.l.p. i.n.d.e.|
0020 78 00 00 00 00 00 af 00-00 09 04 d0 00 34 08 00 |x.....¯. ...Ð.4..|
0030 73 79 73 75 73 65 72 73- |sysusers|
10:00:53.215575 ct_results()
10:00:57.477914 ct_con_props() action = CS_GET property = 13
10:00:57.478167 fetching userdata 135302976
10:00:57.478417 processing result tokens. marker is 0()
10:00:57.478503 tds_process_default_tokens() marker is 0()
10:00:57.478575 leaving tds_process_default_tokens() connection dead
10:00:57.478647 ct_results() process_result_tokens returned 0 (type
1073787440)
10:00:57.479241 ct_cmd_drop()
10:00:57.479499 ct_close()
10:00:57.479649 ct_con_drop()
-
[freetds] ct_dynamic()/ct_param() support,
Michael Peppler, 10/10/2003
- <Possible follow-up(s)>
-
Re: [freetds] ct_dynamic()/ct_param() support,
Frediano Ziglio, 10/12/2003
-
Re: [freetds] ct_dynamic()/ct_param() support,
Michael Peppler, 10/12/2003
-
Re: [freetds] ct_dynamic()/ct_param() support,
Mark J. Lilback, 10/12/2003
-
Re: [freetds] ct_dynamic()/ct_param() support,
James K. Lowden, 10/13/2003
- Re: [freetds] ct_dynamic()/ct_param() support, Michael Peppler, 10/13/2003
-
Re: [freetds] ct_dynamic()/ct_param() support,
James K. Lowden, 10/13/2003
-
Re: [freetds] ct_dynamic()/ct_param() support,
Mark J. Lilback, 10/12/2003
-
Re: [freetds] ct_dynamic()/ct_param() support,
Michael Peppler, 10/12/2003
- RE: [freetds] ct_dynamic()/ct_param() support, ZIGLIO Frediano, 10/13/2003
- RE: [freetds] ct_dynamic()/ct_param() support, ZIGLIO Frediano, 10/13/2003
- RE: [freetds] ct_dynamic()/ct_param() support, ZIGLIO Frediano, 10/13/2003
Archive powered by MHonArc 2.6.24.