diff options
author | Michael Widenius <monty@mariadb.org> | 2019-06-17 17:50:08 +0300 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2019-06-17 17:50:08 +0300 |
commit | c8b5fa4afc6c233101b8163ef19c1abc1be0373d (patch) | |
tree | 377b25b9207e3b3d5e1a0f5ab0b63cc1cfb3b685 /storage/maria/ma_pagecache.c | |
parent | 2b660fb4c212973ba0f118b47336b608d091f327 (diff) | |
download | mariadb-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 'storage/maria/ma_pagecache.c')
-rw-r--r-- | storage/maria/ma_pagecache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c index 7b0f395f926..f8c83e12a18 100644 --- a/storage/maria/ma_pagecache.c +++ b/storage/maria/ma_pagecache.c @@ -3464,8 +3464,6 @@ restart: pagecache_pthread_mutex_lock(&pagecache->cache_lock); #endif } - if (status & PCBLOCK_ERROR) - my_errno= block->error; } remove_reader(block); @@ -3497,6 +3495,7 @@ restart: if (status & PCBLOCK_ERROR) { + my_errno= block->error; DBUG_ASSERT(my_errno != 0); DBUG_PRINT("error", ("Got error %d when doing page read", my_errno)); DBUG_RETURN((uchar *) 0); |