Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Perl-8.4.1, Perl-Aprium, Perl-8.4.3, Perl-8.4.4
-
Component/s: Perl
-
Labels:None
Description
When exporting a NULL BLOB column, segment fault occurs(Line 20).
The test case is as below:
my $table = "test_cubrid";
my $create = <<EOT;
CREATE TABLE $table (
id INT(3) NOT NULL DEFAULT 0,
picture BLOB )
EOT
ok ($dbh->do($create));
# Insert a row into the test table.......
my ($sth, $query);
$query = "INSERT INTO $table VALUES(1, NULL)";
$sth = $dbh->prepare($query);
$sth->execute;
$sth->finish;
$sth = $dbh->prepare("SELECT * FROM $table WHERE id = 1");
$sth->execute;
$sth->cubrid_lob_get(2);
$sth->cubrid_lob_export(1, "out"); ----->>> Here: segment fault
$sth->cubrid_lob_close;
$sth->finish;

Resolution:
Initialize the buffer to 0 before invoking cci_get_data().
In trunk. Revision: 1386
Merge into RB-8.4.1. Revision: 1387
Merge into RB-8.4.3. Revision: 1388
Merge into RB-8.4.4. Revision: 1389