diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-10 18:40:57 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-10 18:40:57 +0300 |
commit | bafc5c1321a7dff5f2da292111bf98fed9d1658d (patch) | |
tree | b674bceb1f1fe8b2dc9a8fb7c1aeca6fd1b95dde /sql/records.cc | |
parent | 0025eb3f963fdca88028ff14a27d9b9638079337 (diff) | |
parent | 3b6dadb5ebedab71bf1870579745ff3cd05e498a (diff) | |
download | mariadb-git-bafc5c1321a7dff5f2da292111bf98fed9d1658d.tar.gz |
Merge 10.2 into 10.3
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) |