Bug #23467 FREE ERROR BIND!FREE ERROR FBIND! Server side prepare
Submitted: 19 Oct 2006 15:23 Modified: 26 Oct 2006 10:39
Reporter: Andrew Baumhauer Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connectors: DBD::mysql ( Perl ) Severity:S3 (Non-critical)
Version:3.0008_1 OS:
Assigned to: CPU Architecture:Any
Tags: 3.0008_1, BIND, error, FREE

[19 Oct 2006 15:23] Andrew Baumhauer
Description:
Using supplied test code (FC6 x86_64) and DBD::mysql (v 3.0006 - 3.0008_1) results in FREE ERROR BIND!FREE ERROR FBIND! messages as shown below from the output of the test program supplied.  Using emulated prepares, the problem goes away.

  Perl            : 5.008008    (x86_64-linux-thread-multi)
  OS              : linux       (2.6.9-34.elsmp)
  DBI             : 1.52
  DBD::mysql      : 3.0008_1
  DBD::XBase      : 0.241
  DBD::Sponge     : 11.10
  DBD::SQLite2    : 0.33
  DBD::SQLite     : 1.12
  DBD::Proxy      : install_driver(Proxy) failed: Can't locate RPC/PlClient.pm in @INC
  DBD::Pg         : 1.49
  DBD::File       : 0.35
  DBD::ExampleP   : 11.12
  DBD::DBM        : 0.03
  DBD::CSV        : 0.22
  DBD::AnyData    : 0.08
MyISAM
FREE ERROR BIND!FREE ERROR FBIND!

How to repeat:
#!/usr/bin/perl
use strict;
use DBI;
use DBD::mysql;
use DBI;
use DBD::mysql;

my $dsn = 'DBI:mysql:database=test;host=localhost';
my $dbh = DBI->connect($dsn, 'user', 'password',
        { RaiseError => 1,
          AutoCommit => 1,
          mysql_auto_reconnect => 1,
          mysql_emulated_prepare => 0 }
);

my $stm = $dbh->prepare( qq
    {
      SHOW VARIABLES WHERE Variable_Name LIKE ?
    }
);
  
$stm->execute("table_type");
DBI->installed_versions;
print $stm->fetchrow_array() . "\n";
$stm->finish();
$dbh->disconnect;
exit(0);

Suggested fix:
Set mysql_emulated_prepare => 1
[26 Oct 2006 10:39] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicates bug #20559
[12 Mar 2008 22:14] xiaofeng li
I got the same bug. I am wondering when it can be fixed?

perl -MDBI -e 'DBI->installed_versions'
  Perl            : 5.008008    (i386-linux-thread-multi)
  OS              : linux       (2.6.9-42.0.3.elsmp)
  DBI             : 1.52
  DBD::mysql      : 3.0007
  DBD::Sponge     : 11.10
  DBD::Proxy      : install_driver(Proxy) failed: Can't locate RPC/PlClient.pm in @INC
  DBD::File       : 0.35
  DBD::ExampleP   : 11.12
  DBD::DBM        : 0.03