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.
parent e93c6568
...@@ -88,6 +88,7 @@ my_off_t my_tell(File fd, myf MyFlags __attribute__((unused))) ...@@ -88,6 +88,7 @@ my_off_t my_tell(File fd, myf MyFlags __attribute__((unused)))
os_off_t pos; os_off_t pos;
DBUG_ENTER("my_tell"); DBUG_ENTER("my_tell");
DBUG_PRINT("my",("Fd: %d MyFlags: %d",fd, MyFlags)); DBUG_PRINT("my",("Fd: %d MyFlags: %d",fd, MyFlags));
DBUG_ASSERT(fd >= 0);
#ifdef HAVE_TELL #ifdef HAVE_TELL
pos=tell(fd); pos=tell(fd);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment