Subject: | Inserting into a SERIAL8 column does not populate $sth->{'ix_sqlerrd'}[1] |
The following script demonstrates the problem:
---
#!/usr/bin/perl
use strict;
use DBI;
my $dbh = DBI->connect('dbi:Informix:test@test', 'test', 'mysecret',
{ AutoCommit => 1, RaiseError => 1 });
$dbh->do('CREATE TABLE serial_test (id serial, num int)');
$dbh->do('CREATE TABLE serial8_test (id serial8, num int)');
my $sth = $dbh->prepare('INSERT INTO serial_test (id, num) VALUES (0, 1)');
$sth->execute;
print "Inserted value (serial): ", $sth->{'ix_sqlerrd'}[1], "\n";
my $sth = $dbh->prepare('INSERT INTO serial8_test (id, num) VALUES (0, 1)');
$sth->execute;
print "Inserted value (serial8): ", $sth->{'ix_sqlerrd'}[1], "\n";
$dbh->do('DROP TABLE serial_test');
$dbh->do('DROP TABLE serial8_test');
$dbh->disconnect;
---
Expected output:
Inserted value (serial): 1
Inserted value (serial8): 1
Actual output:
Inserted value (serial): 1
Inserted value (serial8): 0
This is perl 5.8.8, DBD::Informix 2007.0914 and (I *think*) CSDK
2.81.UC3.LINUX-I32. (If there's a way for me to determine the CSDK
version directly from a DBD::Informix install alone, let me know.)