summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-08-15 20:38:21 +0300
committerMichael Widenius <monty@askmonty.org>2011-08-15 20:38:21 +0300
commite71eb27aa2c83f9f7fd3323fe0bed9fede07be23 (patch)
tree087857126ac174d614cdf33ce6c16986909ae223 /storage
parent8b63d346a05b743686c68f036abba4e55bc18764 (diff)
downloadmariadb-git-e71eb27aa2c83f9f7fd3323fe0bed9fede07be23.tar.gz
Fixed bug lp:826377 "Aria DB Format: Reading specific table from dump causes Wrong bytesec"
The bug was that when using bulk insert combined with lock table, we intitalized the io cache with the wrong file position. This fixed a bug where MariaDB could not read in a table dump done with mysqldump. mysql-test/suite/maria/r/locking.result: Test case for locking + write cache bug mysql-test/suite/maria/t/locking.test: Test case for locking + write cache bug storage/maria/ma_extra.c: Initialize write cache used with bulk insert to correct file length. (The old code didn't work if one was using LOCK TABLE for the given table).
Diffstat (limited to 'storage')
-rw-r--r--storage/maria/ma_extra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c
index d986525814e..d9e551eaaf8 100644
--- a/storage/maria/ma_extra.c
+++ b/storage/maria/ma_extra.c
@@ -143,7 +143,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
(READ_CACHE_USED | WRITE_CACHE_USED | OPT_NO_ROWS)) &&
!share->state.header.uniques)
if (!(init_io_cache(&info->rec_cache, info->dfile.file, cache_size,
- WRITE_CACHE,share->state.state.data_file_length,
+ WRITE_CACHE, info->state->data_file_length,
(pbool) (info->lock_type != F_UNLCK),
MYF(share->write_flag & MY_WAIT_IF_FULL))))
{