Menu

#50 [Perl]Return values of nullable are not correct.

open
nobody
None
5
2011-12-31
2011-12-31
Jira Trac
No

Test Build:CUBRID 2008 R4.0 (8.4.0.2019) (64bit release build for linux_gnu)
OS: Linux 64
Description: Return values of nullable are not correct.

Repro Steps:
perl nullable_02.pl

statements in nullable_02.pl:
$dbh - do(create table coo(id int not null primary key auto_increment,col4 bit(8), phone int );)
$dbh-do(insert into coo values(NULL,b'0011', 1234);) or die insert error: $dbh-errstr;

my $sth=$dbh-prepare(select * from coo) or die prepare error: $dbh-errstr;
$sth-execute() or die execute error: $dbh-errstr;
my $fieldNumber=$sth-{NUM_OF_FIELDS};
print Number of field is $fieldNumber\n;

for (my $i=0;$i$fieldNumber; $i++){
print name: $sth-{NAME}-[$i]\n;
print nullable: $sth-{NULLABLE}-[$i]\n\n\n;
}

Actual result:
{noformat}
Number of field is 3
name: id
nullable: 0

name: col4
nullable: 8

name: phone
nullable: 0
{noformat}

Expect result:
{noformat}
Number of field is 3
name: id
nullable:

name: col4
nullable: 1

name: phone
nullable: 1
{noformat}

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.