Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 65617
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: aff [...] cpan.org
sveta.smirnova [...] oracle.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 4.018
Fixed in: (no value)



Subject: Add bind_param_inout support
DBI defines a method "bind_param_inout" to handle INOUT parameters with stored procedures. This is currently not supported in DBD-mysql: DBD::mysql::st bind_param_inout failed: Output parameters not implemented INOUT parameters are quite common with stored procedures, and relevant support in DBD-mysql would be highly appreciated.
Subject: Add support for IN and INOUT parameters to DBD::mysql
Originally reported by Giuseppe Maxia at http://bugs.mysql.com/bug.php?id=23554 Description: The DBI defines a method "bind_param_inout" to handle IN and INOUT parameters with stored procedures. The underlying drivers should implement such method. However, DBD::mysql does not. If we want to use stored procedures with IN and INOUT parameters, we need such method to be implemented. If you try to use it, it will issue this error: DBD::mysql::st bind_param_inout failed: Output parameters not implemented ... How to repeat: #!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI->connect("DBI:mysql:test" . ";mysql_read_default_file=$ENV{HOME}/.my.cnf", undef, undef, {RaiseError => 1}) or die "can't connect\n"; my $query = qq{ call some_proc(?) }; my $sth = $dbh->prepare($query); my $param = 1; $sth->bind_param_inout(1, \$param, 1); $sth->execute(); Suggested fix: A workaround is possible, with user variables. my $param = 1; $dbh->do(qq{SET \@result = ? }, undef, $param); my $query = qq{call some_proc(\@result)}; my $sth = $dbh->prepare($query); $sth->execute(); my ($result) = $dbh->selectrow_array(qq{select \@result});