anchor.diff:  
   -spec prepare_statement(binary(), conn(), stmt()) -> {ok, stmt()} | {error, integer(), binary()}.
   prepare_statement(Sql, Conn, Stmt) ->
  -    {ok, _, S2} = case Stmt#stmt.closed of
  -    true -> {ok, Conn, Stmt};
  +    {ok, S2} = case Stmt#stmt.closed of
  +    true -> {ok, Stmt};
       false -> free_statement(Conn, Stmt, close)
       end,
   
  
positive.code:         efirebirdsql_op:op_fetch(StmtHandle, XSqlVars)),
      {ok, Rows, MoreData} = efirebirdsql_op:get_fetch_response(Conn, Stmt),
      Stmt2 = Stmt#stmt{rows=Rows, more_data=MoreData},
      {ok, _Conn, Stmt3} = if
          MoreData =:= true -> {ok, nil, Stmt2};
          MoreData =:= false -> free_statement(Conn, Stmt2, close)
      end,
      Stmt3;
  
negative.code:         efirebirdsql_op:op_prepare_statement(TransHandle, StmtHandle, Sql)),
      efirebirdsql_op:get_prepare_statement_response(Conn, S2).
  
  -spec free_statement(conn(), stmt(), atom()) -> {ok, stmt()} | {error, integer(), binary()}.
  free_statement(Conn, Stmt, Type) ->
      efirebirdsql_socket:send(Conn,
          efirebirdsql_op:op_free_statement(Stmt#stmt.stmt_handle, Type)),
      case efirebirdsql_op:get_response(Conn) of
      {op_response, _, _} -> {ok, Stmt#stmt{closed=true}};
      {error, ErrNo, Msg} -> {error, ErrNo, Msg}
      end.
  
  -spec columns(stmt()) -> list().
  