summaryrefslogtreecommitdiff
path: root/sql/records.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2019-06-19 00:35:44 +0300
committerMichael Widenius <monty@mariadb.org>2019-06-19 00:35:44 +0300
commit8acbf9c1f961aa1008ef509e059e1a09943f5ed3 (patch)
treef3b0b2c2d0510aea9e06a75eb4f949d0281ebd48 /sql/records.cc
parentb23c82fef38839f9f6b758091dfb5064c017f608 (diff)
downloadmariadb-git-8acbf9c1f961aa1008ef509e059e1a09943f5ed3.tar.gz
MDEV-19595 fixed
The test cases for the MDEV found several independent bugs in MariaDB server and Aria: - If a temporary table was marked as crashed, it could never be deleted. - Opening of a crashed temporary table gave an error message but the error was never forwarded to the caller which caused an assert() in my_ok() - init_read_record() did mmap of all temporary tables, which is probably not a good idea as this area can potentially be very big. Changed code to only mmap internal temporary tables. - mmap-ed tables where not unmapped in case of repair/optimize which caused bad data in table and crashes if the original table files where replaced with new ones (as the old mmap was still in place). Fixed by removing the mmap in case of repair. - Cleaned up usage of code that disabled mmap in Aria
Diffstat (limited to 'sql/records.cc')
-rw-r--r--sql/records.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/records.cc b/sql/records.cc
index 3db34425e29..6a611d46ca4 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -197,8 +197,7 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
info->forms= &info->table; /* Only one table */
info->addon_field= addon_field;
- if ((table->s->tmp_table == INTERNAL_TMP_TABLE ||
- table->s->tmp_table == NON_TRANSACTIONAL_TMP_TABLE) &&
+ if ((table->s->tmp_table == INTERNAL_TMP_TABLE) &&
!addon_field)
(void) table->file->extra(HA_EXTRA_MMAP);