Browse Source

BUG#27141 - Calling tell(-1) under Windows causes assertion failure in Debug mode

Original problem was fixed by Magnus (see BUG25807).

Currently only windows debug build causes assertion failure. This patch assures
that my_tell gets correct file descriptor on any platform by DBUG_ASSERT macro.


mysys/my_seek.c:
  Added assertion in case my_tell gets wrong file descriptor.
pull/374/head
unknown 19 years ago
parent
commit
b9234b1f5e
  1. 1
      mysys/my_seek.c

1
mysys/my_seek.c

@ -88,6 +88,7 @@ my_off_t my_tell(File fd, myf MyFlags __attribute__((unused)))
os_off_t pos;
DBUG_ENTER("my_tell");
DBUG_PRINT("my",("Fd: %d MyFlags: %d",fd, MyFlags));
DBUG_ASSERT(fd >= 0);
#ifdef HAVE_TELL
pos=tell(fd);
#else

Loading…
Cancel
Save