From bb437f82051670959ed022039e9d20de94087129 Mon Sep 17 00:00:00 2001 From: "svoj@mysql.com/april.(none)" <> Date: Tue, 5 Jun 2007 03:16:02 +0500 Subject: [PATCH] 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/mysys/my_seek.c b/mysys/my_seek.c index 3d415400aa2..5c1a6c44b6f 100644 --- a/mysys/my_seek.c +++ b/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