Skip to Content.
Sympa Menu

freetds - RE: [freetds] TODO reviewed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] TODO reviewed
  • Date: Mon, 11 Apr 2005 12:16:01 -0400

> From: Thompson, Bill D (London)
> Sent: Monday, April 11, 2005 8:42 AM
>
> > . ct_dynamic and friends needed for DBD::Sybase placeholder support
> > Done?? Someone did accurate testing ??
>
> yes, done and tested (to the best of my ability).
> There is a ctlib/unittest for this functionality.
> I haven't tested with DBD::Sybase, although I *think* I asked Michael
> Peppler to do so if/when he had time.

Hi Bill,

I have CVS HEAD installed and the DBD::Sybase test t/exec.t fails. Did
it ever work?

I noticed two things:

1. DBD::Sybase seems to send "COMMIT TRANSACTION" with no corresponding
BEGIN TRAN. It uses ct_options to set CS_OPT_CHAINXACTS (0x07) but
ct_options is a one big noop:

ct.c:3562:ct_options: CS_SET, option = 7
ct.c:3750:ct_option: UNIMPLEMENTED 7
ct.c:3752: tds_send_optioncmd will be option(25) arg(0) arglen(1)
(well, not really) ^^^^^^^
ct.c:622:ct_cmd_alloc()
ct.c:212:setting command state from IDLE to IDLE
ct.c:641:ct_cmd_alloc() : allocating command list to head
ct.c:663:ct_command()

2. The placeholder logic seems not to pass valid SQL to the server.
Look at this code from t/exec.t:

my $sth = $dbh->prepare("exec sp_helpindex \@objname = ?");
ok(defined($sth), 'Prepare sp_helpindex');
my $rc;
$rc = $sth->execute("sysusers");

Here's a chunk o' the dump:

ct.c:641:ct_cmd_alloc() : allocating command list to head
ct.c:663:ct_command()
ct.c:212:setting command state from IDLE to IDLE
ct.c:212:setting command state from IDLE to IDLE
ct.c:747:ct_command() added rpcname "sp_helpindex"
ct.c:212:setting command state from IDLE to READY
ct.c:3292:ct_param()
ct.c:3293:ct_param() data addr = 0x82c9e30 data length = 8
ct.c:4196: _ct_fill_param() status = 86
ct.c:1975:_ct_get_server_type(0)
ct.c:3324: ct_param() added rpc parameter @objname
ct.c:828:ct_send() command_type = 85
ct.c:4111:paraminfoalloc: status = 86, maxlen 0
ct.c:4112:paraminfoalloc: name = @objname, varint size 2 column_type 47
column_cur_size 8 column_output = 0
ct.c:3961:paramrowalloc, size = 8, offset = 0, row_size = 0
util.c:129:Changing query state from TDS_IDLE to TDS_QUERYING
mem.c:453:tds_free_all_results()
query.c:964:tds_put_data_info putting param_name
query.c:991:tds_put_data_info putting status
query.c:1080:tds_put_data: colsize = 8
query.c:1109:tds_put_data: not null param varint_size = 2
util.c:129:Changing query state from TDS_QUERYING to TDS_PENDING
net.c:654:Sending packet
0000 03 01 00 48 00 00 01 00-0c 00 73 00 70 00 5f 00 |...H.... ..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 08 40 00 6f-00 62 00 6a 00 6e 00 61 |x....@.o .b.j.n.a|
0030 00 6d 00 65 00 00 af 00-00 09 04 00 01 00 08 00 |.m.e.... ........|
0040 73 79 73 75 73 65 72 73- |sysusers|

ct.c:212:setting command state from READY to SENT
ct.c:1086:ct_results()
util.c:129:Changing query state from TDS_PENDING to TDS_READING
net.c:441:Received header
0000 04 01 00 11 00 39 01 00- |.....9..|

net.c:535:Received packet
0000 fd 02 01 00 00 00 00 00-00 |........ .|

token.c:526:processing result tokens. marker is fd(DONE)

At this point, I'm set up to test DBD::Sybase whenever you like.

--jkl




-----------------------------------------
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. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.




Archive powered by MHonArc 2.6.24.

Top of Page