diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-15 10:22:03 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-15 10:22:03 +0200 |
commit | b006d2ead4640f0ab4e29687fd7d24988b1c98f1 (patch) | |
tree | a478984bcd7f4bb2e0fd0496eae77b871077a380 /sql/mf_iocache_encr.cc | |
parent | b782971c58b5656820429b8ef3fae5fd82f5a0f7 (diff) | |
parent | dc09f8f29cb2b9fdce7d5d5a623fdc8dcf1814f9 (diff) | |
download | mariadb-git-b006d2ead4640f0ab4e29687fd7d24988b1c98f1.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/mf_iocache_encr.cc')
-rw-r--r-- | sql/mf_iocache_encr.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/mf_iocache_encr.cc b/sql/mf_iocache_encr.cc index 8d7cea4b050..9724ca4e19e 100644 --- a/sql/mf_iocache_encr.cc +++ b/sql/mf_iocache_encr.cc @@ -145,9 +145,10 @@ static int my_b_encr_write(IO_CACHE *info, const uchar *Buffer, size_t Count) if (info->seek_not_done) { - DBUG_ASSERT(info->pos_in_file == 0); + DBUG_ASSERT(info->pos_in_file % info->buffer_length == 0); + my_off_t wpos= info->pos_in_file / info->buffer_length * crypt_data->block_length; - if ((mysql_file_seek(info->file, 0, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR)) + if ((mysql_file_seek(info->file, wpos, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR)) { info->error= -1; DBUG_RETURN(1); |