Skip Menu |
Report information
Id: 130145
Status: rejected
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: michael.okeefe [at] sdbmwmc.com
Cc:
AdminCc:

Operating System: mswin32
PatchStatus: (no value)
Severity: High
Type: library
Perl Version: 5.22.0
Fixed In: (no value)



CC: support [...] ActiveState.com
Subject: Storable.dll causes ODBC Table name truncation in DBI
To: perlbug [...] perl.org
Date: Mon, 21 Nov 2016 16:27:30 -0800
From: Michael O'Keefe <Michael.OKeefe [...] sdbmwmc.com>
This is a bug report for perl from michael.okeefe@sdbmwmc.com, generated with the help of perlbug 1.40 running under perl 5.22.0. ----------------------------------------------------------------- [Please describe your issue here] Using DBI to access ODBC Paradox Databases works fine, unless Storable is used anywhere. use strict; use DBI; #use Storable; #my $dsn = q(dbi:Proxy:hostname=localhost;port=58000;dsn=dbi:ODBC:); my $dsn = q(dbi:ODBC:DSN=); my $test = DBI->connect($dsn . q(Test),q(),q()) || die "Could not connect to database: $DBI::errstr"; my $sql = q{SELECT ColumnField FROM LongTableName}; my $query = $test->prepare($sql); $query->execute() or die($main::errstr); while (my $result = $query->fetchrow_hashref()) { warn($result->{ColumnField}); } $query->finish(); $test->disconnect(); This works fine. Uncomment the "use Storable", and ODBC driver complains that LongTableName cannot be found. Using ProcessExplorer, I found that the filename that the driver was then trying to open was truncated to 8 chars (ie LongTabl) Using the dbiproxy instead of direct local access to the ODBC is fine as well. I found that commenting out the ... XSLoader::load('Storable', $Storable::VERSION); from Storable.pm stopped the truncation. But then Storable was unusable. That's as far as I got without debugging the Storable.dll [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=high module=Storable --- Site configuration information for perl 5.22.0: Configured by gecko at Mon Jul 20 18:53:42 2015. Summary of my perl5 (revision 5 version 22 subversion 0) configuration: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread-64int uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='undef', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.6.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8, longdblkind=3 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='undef', ldflags ='-s -static-libgcc -static-libstdc++ -L"C:\Perl32-5.22.0\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' libpth=C:\MinGW\i686-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl522.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -static-libgcc -static-libstdc++ -L"C:\Perl32-5.22.0\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' Locally applied patches: ActivePerl Build 2200 [299195] --- @INC for perl 5.22.0: C:/Perl32-5.22.0/site/lib C:/Perl32-5.22.0/lib . --- Environment for perl 5.22.0: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\Program Files\Java\jdk1.6.0_21\bin;D:\ADP\php\ PERL_BADLANG (unset) SHELL (unset)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.5k
On Mon, 21 Nov 2016 16:27:52 -0800, michael.okeefe@sdbmwmc.com wrote: Show quoted text
> Using DBI to access ODBC Paradox Databases works fine, unless Storable > is used anywhere. > > use strict; > use DBI; > > #use Storable; > #my $dsn = q(dbi:Proxy:hostname=localhost;port=58000;dsn=dbi:ODBC:); > my $dsn = q(dbi:ODBC:DSN=); > > my $test = DBI->connect($dsn . q(Test),q(),q()) || die "Could not > connect to database: $DBI::errstr"; > my $sql = q{SELECT ColumnField FROM LongTableName}; > my $query = $test->prepare($sql); > $query->execute() or die($main::errstr); > while (my $result = $query->fetchrow_hashref()) { > warn($result->{ColumnField}); } > $query->finish(); > $test->disconnect(); > > This works fine. > Uncomment the "use Storable", and ODBC driver complains that > LongTableName cannot be found. > Using ProcessExplorer, I found that the filename that the driver was > then trying to open was truncated to 8 chars (ie LongTabl) > Using the dbiproxy instead of direct local access to the ODBC is fine > as > well. > I found that commenting out the ... > > XSLoader::load('Storable', $Storable::VERSION); > > from Storable.pm stopped the truncation. > But then Storable was unusable. > > That's as far as I got without debugging the Storable.dll
Unfortunately it's unlikely that any of us has easy access to Paradox which means we can't attempt to reproduce it, let alone debug it. You might try running your program under DrMemory: http://www.drmemory.org/ to see if it detects any issues, otherwise it's unlikely we can help you. Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.6k
On Wed, 01 Feb 2017 20:19:15 -0800, tonyc wrote: Show quoted text
> On Mon, 21 Nov 2016 16:27:52 -0800, michael.okeefe@sdbmwmc.com wrote:
> > Using DBI to access ODBC Paradox Databases works fine, unless > > Storable > > is used anywhere. > > > > use strict; > > use DBI; > > > > #use Storable; > > #my $dsn = q(dbi:Proxy:hostname=localhost;port=58000;dsn=dbi:ODBC:); > > my $dsn = q(dbi:ODBC:DSN=); > > > > my $test = DBI->connect($dsn . q(Test),q(),q()) || die "Could not > > connect to database: $DBI::errstr"; > > my $sql = q{SELECT ColumnField FROM LongTableName}; > > my $query = $test->prepare($sql); > > $query->execute() or die($main::errstr); > > while (my $result = $query->fetchrow_hashref()) { > > warn($result->{ColumnField}); } > > $query->finish(); > > $test->disconnect(); > > > > This works fine. > > Uncomment the "use Storable", and ODBC driver complains that > > LongTableName cannot be found. > > Using ProcessExplorer, I found that the filename that the driver was > > then trying to open was truncated to 8 chars (ie LongTabl) > > Using the dbiproxy instead of direct local access to the ODBC is > > fine > > as > > well. > > I found that commenting out the ... > > > > XSLoader::load('Storable', $Storable::VERSION); > > > > from Storable.pm stopped the truncation. > > But then Storable was unusable. > > > > That's as far as I got without debugging the Storable.dll
> > Unfortunately it's unlikely that any of us has easy access to Paradox > which means we can't attempt to reproduce it, let alone debug it. > > You might try running your program under DrMemory: > > http://www.drmemory.org/ > > to see if it detects any issues, otherwise it's unlikely we can help > you.
No response in 11 months. Closing. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org