summaryrefslogtreecommitdiffstats
path: root/sql/statement.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/statement.cc')
-rw-r--r--sql/statement.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/statement.cc b/sql/statement.cc
index 09c95da..2a0faa7 100644
--- a/sql/statement.cc
+++ b/sql/statement.cc
@@ -110,6 +110,11 @@ void Statement::Reset(bool clear_bound_vars) {
ref_->connection()->RecordOneEvent(Connection::EVENT_STATEMENT_SUCCESS);
}
+ // Potentially release dirty cache pages if an autocommit statement made
+ // changes.
+ if (ref_->connection())
+ ref_->connection()->ReleaseCacheMemoryIfNeeded(false);
+
succeeded_ = false;
stepped_ = false;
}