Subject: | Failure with long blob when mysql_server_prepare = 1 |
Hello,
When I try to retrieve a blob from the db with mysql_server_prepare=1
in the connection parameters, the drivers fails that way:
panic: malloc at bla.pl line 16.
DBI handle 0x9bf3b44 cleared whilst still active.
DBI handle 0x9bf3b44 has uncleared implementors data.
dbih_clearcom (sth 0x9bf3b44, com 0x9bfd9a0, imp DBD::mysql::st):
FLAGS 0x80117: COMSET IMPSET Active Warn PrintError
PARENT DBI::db=HASH(0x9bf39ac)
KIDS 0 (0 Active)
IMP_DATA undef
NUM_OF_FIELDS 1
NUM_OF_PARAMS 0
* HOW TO REPRODUCE *
- Set a table with a longblob field into mysql. Populate it with binary
data.
- Fetch data with perl Use the option mysql_server_prepare=1 in the
connection string like that:
my $dbh =
DBI->connect('dbi:mysql:database=test;port:3306;host=127.0.0.1;mysql_server_prepare=1',
'');
my $sql = 'SELECT blobfield FROM table WHERE id = 1 ';
my $sth = $dbh->prepare($sql);
$sth->execute();
my $row = $sth->fetch();
* SOFTWARE VERSIONS *
MySQL server:
version | 4.1.14-standard
version_comment | MySQL Community Edition - Standard (GPL)
version_compile_machine | i686
version_compile_os | pc-linux-gnu
MySQL client:
$ mysql --version
mysql Ver 14.7 Distrib 4.1.18, for pc-linux-gnu (i686) using readline 4.3
Perl version:
This is perl, v5.8.6 built for i386-linux-thread-multi
DBD::mysql version : 3.0006 compiled with gcc gcc (GCC) 4.0.0 20050519
(Red Hat 4.0.0-8)