summaryrefslogtreecommitdiff
path: root/mysys/my_seek.c
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com/april.(none)>2007-06-05 03:16:02 +0500
committerunknown <svoj@mysql.com/april.(none)>2007-06-05 03:16:02 +0500
commitb9234b1f5eb85845c4bf29d5a22f84448420d38f (patch)
tree7fbee96cfd3a432ddb930ad0def24c3d94fac061 /mysys/my_seek.c
parent12d55a8cc616670cf1c11338639c3e367c4fe3d4 (diff)
downloadmariadb-git-b9234b1f5eb85845c4bf29d5a22f84448420d38f.tar.gz
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.
Diffstat (limited to 'mysys/my_seek.c')
-rw-r--r--mysys/my_seek.c1
1 files changed, 1 insertions, 0 deletions
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