summaryrefslogtreecommitdiff
path: root/sql/records.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/records.cc')
-rw-r--r--sql/records.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/sql/records.cc b/sql/records.cc
index 6a611d46ca4..8a152cda4c2 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -320,12 +320,9 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
void end_read_record(READ_RECORD *info)
-{ /* free cache if used */
- if (info->cache)
- {
- my_free_lock(info->cache);
- info->cache=0;
- }
+{
+ /* free cache if used */
+ free_cache(info);
if (info->table)
{
if (info->table->is_created())
@@ -336,6 +333,17 @@ void end_read_record(READ_RECORD *info)
}
}
+
+void free_cache(READ_RECORD *info)
+{
+ if (info->cache)
+ {
+ my_free_lock(info->cache);
+ info->cache=0;
+ }
+}
+
+
static int rr_handle_error(READ_RECORD *info, int error)
{
if (info->thd->killed)