DBI begin_work doesn't work with stored procedure calls

后端 未结 2 1937
别那么骄傲
别那么骄傲 2021-01-22 12:24

I am trying to make a call to a stored procedure from with in a transaction in its simplified form:

my $dbh= DBI->connect(............  );  

my $sth = $dbh-&         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-22 13:06

    Make sure you explicitly finish() every executed prepared procedure CALL before you explicitly commit() the transaction. E.g.,

    $sth->finish;
    $sth->commit();
    

    This appears to be a bug to me, given the typical semantics of finish(). Multiple result sets, calling more_results, etc. did not matter.

    DBD 1.616, DBD::mysql 4.020 and MySQL 5.5.19.

提交回复
热议问题