aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-15 16:03:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-15 16:03:35 +0200
commit7fec1734882ab0bf92ee1d21d898d7ee3d8f07bf (patch)
treee4236acc79107971ff6ffeb2f7d0f834ef8f75ad
parent0a7c90251190205e8bd9f5193b7402e25efa2f81 (diff)
Fix bug in result rebinding logic
-rw-r--r--odb/mysql/statement.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/odb/mysql/statement.cxx b/odb/mysql/statement.cxx
index d1b90e1..1c611c5 100644
--- a/odb/mysql/statement.cxx
+++ b/odb/mysql/statement.cxx
@@ -117,14 +117,6 @@ namespace odb
cond_version_ = cond_->version;
}
- if (data_version_ != data_.version)
- {
- if (mysql_stmt_bind_result (stmt_, data_.bind))
- translate_error (conn_, stmt_);
-
- data_version_ = data_.version;
- }
-
if (mysql_stmt_execute (stmt_))
translate_error (conn_, stmt_);
@@ -156,10 +148,7 @@ namespace odb
select_statement::result select_statement::
fetch ()
{
- // If the result was cached the data image can grow between calls
- // to fetch() as a result of other statements execution.
- //
- if (cached_ && data_version_ != data_.version)
+ if (data_version_ != data_.version)
{
if (mysql_stmt_bind_result (stmt_, data_.bind))
translate_error (conn_, stmt_);