On Thu, Jun 13, 2002 at 01:48:17PM +0100, Tim Bunce wrote:
:
: The C implementations of selectrow_arrayref() and fetchall_arrayref() are
: obviously the big news in this release.
:
: Given the low-level and critical nature of these changes extra care
: in testing is recommended. I've tested it with perl 5.5.3, 5.7.3, and
: 5.8.0 RC1 using DBD::mysql and all seems well.
Looks like you may have a bug, because I'm requesting rows with
two data elements and I'm only getting back one using fetchall_arrayref().
This is with DBD::mysql from DBD-mysql-2.1017 and
Msql-Mysql-modules-1.2219.tar.gz (everything was compiled cleanly
for each one). Here's the code I used
my $sth = $db->prepare( q| SELECT ptid, dep_ptid FROM perceptTypeDep | );
$sth->execute();
my $rows = $sth->fetchall_arrayref();
$sth->finish();
use Data::Dumper;
print Dumper( $rows );
Output DBI-1.26
$VAR1 = [
[
'2'
],
[
'4'
],
[
'5'
],
[
'6'
],
[
'7'
],
[
'17'
],
[
'19'
],
[
'21'
],
[
'23'
],
[
'25'
],
[
'26'
]
];
Output DBI-1.25
$VAR1 = [
[
'2',
'26'
],
[
'4',
'26'
],
[
'5',
'26'
],
[
'6',
'26'
],
[
'7',
'26'
],
[
'17',
'26'
],
[
'19',
'26'
],
[
'21',
'16'
],
[
'23',
'26'
],
[
'25',
'26'
],
[
'26',
'16'
]
];
Table structure output:
mysql> desc perceptTypeDep;
+----------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------+------+-----+---------+-------+
| ptid | int(11) | | PRI | 0 | |
| dep_ptid | int(11) | | PRI | 0 | |
+----------+---------+------+-----+---------+-------+
2 rows in set (0.00 sec)
Table data output:
mysql> select * from perceptTypeDep;
+------+----------+
| ptid | dep_ptid |
+------+----------+
| 2 | 26 |
| 4 | 26 |
| 5 | 26 |
| 6 | 26 |
| 7 | 26 |
| 17 | 26 |
| 19 | 26 |
| 21 | 16 |
| 23 | 26 |
| 25 | 26 |
| 26 | 16 |
+------+----------+
11 rows in set (0.00 sec)
MySQL version 3.23.49 (InnoDB tables)
# perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.9-21smp, archname=i386-linux
uname='linux pk1.austin.texas.net 2.4.9-21smp #1 smp thu jan 17 14:01:48 est 2002
i686 unknown '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc
-Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
-Duseshrplib -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow
-Di_syslog -Dman3ext=3pm -Uuselargefiles -Uusemymalloc -Ubincompat5005'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
optimize='-O2 -march=i386 -mcpu=i686',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.1 2.96-99)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.6.1/i386-linux/CORE'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options:
Built under linux
Compiled at Feb 1 2002 14:21:07
@INC:
/usr/lib/perl5/5.6.1/i386-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i386-linux
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl
* Philip Molter
* Texas.net Internet
* http://www.texas.net/
* [EMAIL PROTECTED]