summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2019-06-17 17:50:08 +0300
committerMichael Widenius <monty@mariadb.org>2019-06-17 17:50:08 +0300
commitc8b5fa4afc6c233101b8163ef19c1abc1be0373d (patch)
tree377b25b9207e3b3d5e1a0f5ab0b63cc1cfb3b685 /mysys
parent2b660fb4c212973ba0f118b47336b608d091f327 (diff)
downloadmariadb-git-c8b5fa4afc6c233101b8163ef19c1abc1be0373d.tar.gz
MDEV-19055 Failures with temporary tables and Aria
There was two separate problems: - Aria pagecache didn't properly handle re-reading of blocks that have given errors before (this triggered an assert) - temporary tables that where opened several times where not properly closed in ALTER, REPAIR or OPTIMIZE table Other things - Added a couple of asserts that will make it easier to find problems like this in the future.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_pread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index 08285738528..15586d00a6f 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -68,6 +68,8 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
if (readbytes != Count)
{
+ /* We should never read with wrong file descriptor! */
+ DBUG_ASSERT(my_errno != 9);
my_errno= errno;
if (errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))