Permalink
Browse files

Doing early result release only when result is not buffered

  • Loading branch information...
1 parent cd83480 commit 3d2d08b78ffb5ee2e93cb79ade42a02dce7eb556 @mariano committed Jun 3, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 query.cc
View
@@ -715,7 +715,9 @@ int node_db::Query::eioExecute(eio_req* eioRequest) {
request->rows->push_back(row);
}
- request->result->release();
+ if (!request->result->isBuffered()) {
+ request->result->release();
+ }
}
} catch(const node_db::Exception& exception) {
request->query->connection->unlock();
@@ -870,7 +872,9 @@ void node_db::Query::executeAsync(execute_request_t* request) {
rows->Set(index++, jsRow);
}
- request->result->release();
+ if (!request->result->isBuffered()) {
+ request->result->release();
+ }
argv[1] = rows;
argv[2] = columns;

0 comments on commit 3d2d08b

Please sign in to comment.