summaryrefslogtreecommitdiff
path: root/sql/records.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 18:40:57 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 18:40:57 +0300
commitbafc5c1321a7dff5f2da292111bf98fed9d1658d (patch)
treeb674bceb1f1fe8b2dc9a8fb7c1aeca6fd1b95dde /sql/records.cc
parent0025eb3f963fdca88028ff14a27d9b9638079337 (diff)
parent3b6dadb5ebedab71bf1870579745ff3cd05e498a (diff)
downloadmariadb-git-bafc5c1321a7dff5f2da292111bf98fed9d1658d.tar.gz
Merge 10.2 into 10.3
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 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)