Skip Menu |

This queue is for tickets about the DBD-Informix CPAN distribution.

Report information
The Basics
Id: 13708
Status: resolved
Estimated: 5 hours (300 min)
Worked: 5 hours (300 min)
Left: 1 hour (60 min)
Priority: 0/
Queue: DBD-Informix

People
Owner: j.leffler [...] acm.org
Requestors: trevor.hills [...] fonterra.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 2005.01
  • 2005.02
  • 2007.0225
  • 2007.0226
Fixed in:
  • 2007.0826
  • 2007.0903
  • 2007.0904



Subject: informix 10.uc3, unable to select from lvarchar columns with a size qualifier
Version strings Linux host 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux IBM Informix Dynamic Server Version 10.00.UC3 Perl v5.8.5 built for i386-linux-thread-multi [user@host]$ perl -MDBI -e'print "$DBI::VERSION\n";' 1.48 [user@host]$ perl -MDBD::Informix -e'print "$DBD::Informix::VERSION\n";' 2005.01 Bug description For the above configuration (at least), values from lvarchar columns with "not null" set are not returned. To test this is create a test table and data: -- create table lvarchar_test ( -- nulls_allowed lvarchar, -- no_nulls_allowed lvarchar not null -- ) -- insert into lvarchar_test (nulls_allowed, no_nulls_allowed) -- values ('this is returned', 'this isnt beening returned'); And run the attached code. Note that this works from within dbaccess and via the informix 3.80 32bit ODBC driver so believe it is a DBD::Informix issue.
#!/usr/bin/perl -w #------------------------------------------------------------------------------- use strict; use diagnostics; use DBI 1.48; my $hostname = 'testhost'; # CHANGE ME my $db_type = 'Informix'; my $database = 'testdatabase'; # CHANGE ME #You will need to ensure this configuration information is correct for your environment. $ENV{'INFORMIXDIR'} = "/usr/informix"; $ENV{'INFORMIXSERVER'} = "$hostname"; $ENV{'ONCONFIG'} = "onconfig"; $ENV{'DBCENTURY'} = "C"; $ENV{'INFORMIXC'} = "i386-glibc20-linux-gcc"; my $INFORMIXDIR = $ENV{'INFORMIXDIR'}; $ENV{'PATH'} .= ":$INFORMIXDIR/bin"; #connect to database my $dbh; if ($dbh = DBI->connect("dbi:${db_type}:${database}")) { $dbh->{PrintError} = 0; $dbh->{AutoCommit} = 1; $dbh->{ChopBlanks} = 1; } else { die "Failed to connect to db $database"; } #run sql my $sql = "SELECT * from lvarchar_test"; my $sth; my $result_set; if ( ($sth = $dbh->prepare($sql)) && ($sth->execute() ) ) { $result_set = $sth->fetchall_arrayref({}); $sth->finish(); print Dumper($result_set); }else{ print STDERR "Error runing sql $DBI::err $DBI::errstr"; } $dbh->disconnect;
Subject: informix 10.uc3, unable to select from lvarchar columns where not null is set
From: trevor.hills [...] fonterra.com
[guest - Thu Jul 14 22:04:06 2005]: Subject should read: informix 10.uc3, unable to select from lvarchar columns where not null is set And need to add line: use Data::Dumper; # Dump data structures To the top of the test script. One of those days...
use DBD::Informix::TechSupport; print_versions("Perl DBI DBD::Informix ESQL/C"); Produces: Perl Version 5.008005 DBI Version 1.48 DBD::Informix Version 2005.01 IBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC3 And attached is the results of a: perl BugReport C 2>&1 | tee bugreport.out
Download bugreport.out
application/octet-stream 30.1k

Message body not shown because it is not plain text.

RT-Send-CC: dbd.informix [...] gmail.com
The problem, after considerable investigation, is IBM CQ bug idsdb00139040 which is present in IBM Informix CSDK 2.90 (and probably in CSDK 2.81 too; CSDK 2.80 appears to be OK). It appears to be resolved by an upgrade to IBM CSDK 3.00.xC2 (untested 3.00.xC1, but you should not try to obtain that version anyway - it was released for the beta versions of IDS 11 - aka Cheetah). Despite considerable effort being expended, no workaround has been found within the CSDK 2.90 versions. Sadly, the recommendation must be to upgrade the CSDK version that you are using. DBD::Informix 2007.0826 (and its successor, 2007.0904) claim this bug is 'fixed' by the upgrade to CSDK 3.00. If you can demonstrate that the problem occurs with CSDK 3.00 on your machine, I'd definitely like to hear about it (well, I need to hear about it; I don't want to :) hear about it). But in the absence of such information, you need either to get an upgrade to your present CSDK version with 139040 fixed - or you need to upgrade to the current CSDK release (CSDK 3.00.xC2, if not CSDK 3.00.xC3). -- Jonathan Leffler <jleffler@earthlink.net> <jleffler@us.ibm.com> Guardian of DBD::Informix 2007.0904 -- see http://dbi.perl.org/ "I don't suffer from insanity - I enjoy every minute of it!"