diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-19 10:49:00 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-19 10:49:00 +0300 |
commit | 02979daab48d871e8c43a227b8f4462128439f17 (patch) | |
tree | 21dba14f0073df2328677ed0a90a3596f043bdeb /mysys/my_pread.c | |
parent | efbfcc8b73d9fd8bafd86ab387e0c1edd39e208b (diff) | |
parent | 192aa295b4bc877d0fed24154c57304c3f789179 (diff) | |
download | mariadb-git-02979daab48d871e8c43a227b8f4462128439f17.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysys/my_pread.c')
-rw-r--r-- | mysys/my_pread.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/my_pread.c b/mysys/my_pread.c index 69a4ca08b78..56cc91ae083 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(readbytes != (size_t)-1 || errno != EBADF); my_errno= errno; if (errno == 0 || (readbytes != (size_t) -1 && (MyFlags & (MY_NABP | MY_FNABP)))) |