Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBD::Sybase 1.01 & FTDS 0.62-dev & temp tables

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jerry Grooms <grooms AT uky.edu>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] DBD::Sybase 1.01 & FTDS 0.62-dev & temp tables
  • Date: Tue, 2 Dec 2003 16:14:35 -0500 (EST)


Michael Peppler <mpeppler AT peppler.org> writes:

> I've read through the thread, and the only thing that I can
> think of is that DBD::Sybase opens new connections for some
> reason.

> You could check this by running with DBI->trace(3).

Ok, after further investigation, here's what I think I know:

o) script/queries were working before upgrading DBD & FTDS
o) when extracting the same SQL from Perl script and execing via
SQSH & FTDS 0.62-dev, query seems to work ok (now).

What I can glean from the trace is that the first row is returned,
but then things grind to a halt. Perhaps my DBD code is not 100%
compliant, although it appears fairly straight-forward.

Thanks for any hints the trace might bring to light.

Jerry

---


=HASH(0x403050ac) trace level set to 3 in DBI 1.38-ithread
Note: perl is running without the recommended perl -w option



Department CPU Hours
---------------------------- ---------
-> prepare for DBD::Sybase::db (DBI::db=HASH(0x40304da4)~0x403050ac '

select ProjectId,
CpuHrs=sum(UsageValue)
into #cpuhrs
from ParDetail
where
UsageType = 'CPUH' and
SvrCd like 'SDX%' and
SampleDate between 'Jan 1, 2002 00:00' and 'Dec 1, 2003 00:00'
group by ProjectId


select
'Department'=substring(Department,1,25),
'Cpu Hrs'=convert(numeric (10,0),sum(D.CpuHrs))
from Project C, #cpuhrs D
where
C.ProjectId = D.ProjectId
and C.I...') thr#4001bfb0
dbih_setup_handle(DBI::st=HASH(0x403051a8)=>DBI::st=HASH(0x4030522c),
DBD::Sybase::st, 403051b4, Null!)
dbih_make_com(DBI::db=HASH(0x403050ac), 40305480, DBD::Sybase::st, 396,
0) thr#4001bfb0
<- prepare= DBI::st=HASH(0x403051a8) at usage_by_dept_test.pl line 63
-> execute for DBD::Sybase::st (DBI::st=HASH(0x403051a8)~0x4030522c)
thr#4001bfb0
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4047) == 1
st_next_result() -> ct_results(4046) == 1
st_next_result() -> ct_results(4043) == 1
ct_res_info() returns 1 columns
ct_describe(0): type = 2, maxlen = 4
describe() -> col 0, type 2, realtype 2
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
<- execute= 176 at usage_by_dept_test.pl line 89
-> fetchrow_array for DBD::Sybase::st
(DBI::st=HASH(0x403051a8)~0x4030522c) thr#4001bfb0
dbih_setup_fbav for 1 fields => 0x40305220
<- fetchrow_array= ( 0 ) [1 items] row1 at usage_by_dept_test.pl line 90
0 0.0
-> fetchrow_array for DBD::Sybase::st
(DBI::st=HASH(0x403051a8)~0x4030522c) thr#4001bfb0
st_next_result() -> ct_results(4040) == 1
ct_res_info() returns 2 columns
ct_describe(0): type = 1, maxlen = 25
describe() -> col 0, type 1, realtype 1
ct_describe(1): type = 15, maxlen = 8
describe() -> col 1, type 15, realtype 15
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_fetch() -> st_next_results() == 4040
<- fetchrow_array= ( ) [0 items] row2 at usage_by_dept_test.pl line 90
-> finish for DBD::Sybase::st (DBI::st=HASH(0x403051a8)~0x4030522c)
thr#4001bfb0
syb_st_finish() -> ct_cancel(CS_CANCEL_ALL)
syb_st_finish() -> resetting ACTIVE, moreResults, dyn_execed
<- finish= 1 at usage_by_dept_test.pl line 96


-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x4030522c)~INNER)
thr#4001bfb0
syb_st_destroy: called on 401645b0...
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef
-> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x403050ac)~INNER)
thr#4001bfb0
syb_db_disconnect() -> ct_close()
<- DESTROY= undef





Archive powered by MHonArc 2.6.24.

Top of Page