freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref
- From: Martin Schroth <m.schroth AT crapoud.com>
- To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
- Subject: [freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref
- Date: 03 Feb 2003 20:19:03 +0100
Hi,
DBI gets the following error if there are no rows to return:
Can't get DBI::st=HASH(0x...)->{NAME}: unrecognised attribute
Example:
my $stmt = "SELECT 1 FROM test WHERE 1=0"
my $hash = $dbh->selectall_hashref($stmt,1);
Environment:
Redhat 8.0, 2.4.18-18.8.0, Perl 5.8.0, DBI 1.32
DBD::Sybase 0.95 (same problem with 0.94)
current freetds 2002-02-03 04:19 --with-tdsver=7.0
MSSQL 2000 ServicePack 3
Best regards,
ms.
DBI Trace:
DBI 1.32-ithread dispatch trace level set to 3
-> DBI->connect(dbi:Sybase:encryptPassword=1:server=***,***,***)
-> DBI->install_driver(Sybase) for linux perl=5.008 pid=16414
ruid=500 euid=500
syb_init() -> DBD::Sybase 0.95 initialized
OpenClient version: 48
install_driver: DBD::Sybase version 0.95 loaded from
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Sybase.pm
New DBI::dr (for DBD::Sybase::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x805af30)=>DBI::dr=HASH(0x81f99a0),
DBD::Sybase::dr, 0, Null!)
dbih_make_com(Null!, DBD::Sybase::dr, 84) thr#804b3c0
<- install_driver= DBI::dr=HASH(0x805af30)
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x805af30)~0x81f99a0
'encryptPassword=1:server=***' '***' **** HASH(0x810d81c)) thr#804b3c0
New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x81f99a0),
id=)
dbih_setup_handle(DBI::db=HASH(0x81f9958)=>DBI::db=HASH(0x81f98e0),
DBD::Sybase::db, 805ac60, Null!)
dbih_make_com(DBI::dr=HASH(0x81f99a0), DBD::Sybase::db, 1708)
thr#804b3c0
syb_db_login() -> ct_config(CS_LOGIN_TIMEOUT,15)
syb_db_login() -> checking for chained transactions
syb_db_login() -> chained transactions are not supported
<- connect= DBI::db=HASH(0x81f9958) at DBI.pm line 513 via dbtest.pl
line 13
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x81f98e0)~INNER
'PrintError' 1) thr#804b3c0
STORE DBI::db=HASH(0x81f98e0) 'PrintError' => 1
<- STORE= 1 at DBI.pm line 555 via dbtest.pl line 13
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x81f98e0)~INNER
'AutoCommit' 1) thr#804b3c0
<- STORE= 1 at DBI.pm line 555 via dbtest.pl line 13
<- connect= DBI::db=HASH(0x81f9958)
-> selectall_hashref in DBD::_::db for DBD::Sybase::db
(DBI::db=HASH(0x81f9958)~0x81f98e0 'SELECT 1 FROM test WHERE 1=0' 1)
thr#804b3c0
1 -> prepare for DBD::Sybase::db (DBI::db=HASH(0x81f98e0)~INNER
'SELECT 1 FROM test WHERE 1=0' undef) thr#804b3c0
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x81f98e0),
id=)
dbih_setup_handle(DBI::st=HASH(0x81f9964)=>DBI::st=HASH(0x81f9940),
DBD::Sybase::st, 81f9970, Null!)
dbih_make_com(DBI::db=HASH(0x81f98e0), DBD::Sybase::st, 396)
thr#804b3c0
1 <- prepare= DBI::st=HASH(0x81f9964) at DBI.pm line 1266 via
dbtest.pl line 22
-> execute for DBD::Sybase::st (DBI::st=HASH(0x81f9964)~0x81f9940)
thr#804b3c0
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4046) == 1
ct_results() final retcode = 15
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_execute() -> got CS_CMD_DONE: resetting ACTIVE, moreResults,
dyn_execed
<- execute= '0E0' at DBI.pm line 1268 via dbtest.pl line 22
-> fetchall_hashref in DBD::_::st for DBD::Sybase::st
(DBI::st=HASH(0x81f9964)~0x81f9940 1) thr#804b3c0
1 -> FETCH for DBD::Sybase::st (DBI::st=HASH(0x81f9940)~INNER
'NAME_hash') thr#804b3c0
2 -> FETCH for DBD::Sybase::st (DBI::st=HASH(0x81f9940)~INNER 'NAME')
thr#804b3c0
Can't get DBI::st=HASH(0x81f9940)->{NAME}: unrecognised attribute at
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBI.pm line 1609.
<> DESTROY ignored for outer handle DBI::st=HASH(0x81f9964) (inner
DBI::st=HASH(0x81f9940))
<> DESTROY ignored for outer handle DBI::db=HASH(0x81f9958) (inner
DBI::db=HASH(0x81f98e0))
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x81f9940)~INNER)
thr#804b3c0
syb_st_destroy: called on 820e070...
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef
-> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x81f98e0)~INNER)
thr#804b3c0
syb_db_disconnect() -> ct_close()
<- DESTROY= undef
-- DBI::END
-> disconnect_all for DBD::Sybase::dr
(DBI::dr=HASH(0x805af30)~0x81f99a0) thr#804b3c0
<- disconnect_all= 1 at DBI.pm line 575 via dbtest.pl line 0
<> DESTROY for DBI::dr=HASH(0x805af30) ignored (inner handle gone)
-
[freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref,
Martin Schroth, 02/03/2003
- Re: [freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref, Michael Peppler, 02/03/2003
Archive powered by MHonArc 2.6.24.