Fix debug assert to match its intention.
Do not check my_errno before it is set, check errno instead. Also, do not check errno, if prior pread() did not fail.
This commit is contained in:
parent
5804bb4ef0
commit
71eea0c3fb
@ -69,7 +69,7 @@ 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(my_errno != EBADF);
|
||||
DBUG_ASSERT(readbytes != (size_t)-1 || errno != EBADF);
|
||||
my_errno= errno;
|
||||
if (errno == 0 || (readbytes != (size_t) -1 &&
|
||||
(MyFlags & (MY_NABP | MY_FNABP))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user