diff options
Diffstat (limited to 'sql/records.cc')
-rw-r--r-- | sql/records.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sql/records.cc b/sql/records.cc index 3d709182a4e..817caada8e2 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -316,12 +316,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()) @@ -332,6 +329,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) |