summaryrefslogtreecommitdiff
path: root/mysys/my_pread.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-06-19 10:49:00 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-06-19 10:49:00 +0300
commit02979daab48d871e8c43a227b8f4462128439f17 (patch)
tree21dba14f0073df2328677ed0a90a3596f043bdeb /mysys/my_pread.c
parentefbfcc8b73d9fd8bafd86ab387e0c1edd39e208b (diff)
parent192aa295b4bc877d0fed24154c57304c3f789179 (diff)
downloadmariadb-git-02979daab48d871e8c43a227b8f4462128439f17.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysys/my_pread.c')
-rw-r--r--mysys/my_pread.c2
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))))