diff options
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r-- | mysys/mf_iocache.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index f9e51e48189..02e5c5373ae 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -1527,8 +1527,13 @@ int _my_b_get(IO_CACHE *info) int _my_b_write(register IO_CACHE *info, const uchar *Buffer, size_t Count) { size_t rest_length,length; + my_off_t pos_in_file= info->pos_in_file; - if (info->pos_in_file+info->buffer_length > info->end_of_file) + DBUG_EXECUTE_IF("simulate_huge_load_data_file", + { + pos_in_file=(my_off_t)(5000000000ULL); + }); + if (pos_in_file+info->buffer_length > info->end_of_file) { my_errno=errno=EFBIG; return info->error = -1; |