Menu

#397 [Perl] After importing a NULL BLOB file, the exporting operation cause segment fault.

open
nobody
None
5
2013-01-26
2013-01-26
Jira Trac
No

When exporting a NULL BLOB column, segment fault occurs(Line 20).

The test case is as below:

{code}
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;
{code}

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.