summaryrefslogtreecommitdiff
path: root/mysys/my_seek.c
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-05-13 18:58:26 +0300
committerunknown <monty@narttu.mysql.fi>2003-05-13 18:58:26 +0300
commitdc1e55f8194db83e7a40dea5bf49e9fef970826c (patch)
treeb0c44d624533c05fb3586c52901c5d00fe1f3186 /mysys/my_seek.c
parent4ccf66df87bfe9290d686e7abd585d3ffe1c1370 (diff)
downloadmariadb-git-dc1e55f8194db83e7a40dea5bf49e9fef970826c.tar.gz
Fix for UNION and LEFT JOIN (Bug #386)
Fixed wrong logging of Access denied error (Bug #398) include/my_global.h: Fix for QNX mysql-test/r/union.result: new test case mysql-test/t/union.test: Test of bug in union and left join mysys/my_seek.c: Safety fix to find out when pos gets a wrong value sql/field.h: Fix for UNION and LEFT JOIN sql/mysql_priv.h: Fix for UNION and LEFT JOIN sql/sql_base.cc: Fix for UNION and LEFT JOIN sql/sql_insert.cc: Fix for UNION and LEFT JOIN sql/sql_parse.cc: Fixed wrong logging of Access denied error sql/sql_union.cc: Fix for UNION and LEFT JOIN sql/sql_update.cc: Fix for UNION and LEFT JOIN
Diffstat (limited to 'mysys/my_seek.c')
-rw-r--r--mysys/my_seek.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/my_seek.c b/mysys/my_seek.c
index 177a5cee953..ec24a26b3d9 100644
--- a/mysys/my_seek.c
+++ b/mysys/my_seek.c
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "mysys_priv.h"
+#include <assert.h>
/* Seek to position in file */
/*ARGSUSED*/
@@ -27,6 +28,8 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
DBUG_PRINT("my",("Fd: %d Hpos: %lu Pos: %lu Whence: %d MyFlags: %d",
fd, (ulong) (((ulonglong) pos) >> 32), (ulong) pos,
whence, MyFlags));
+ DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */
+
newpos=lseek(fd, pos, whence);
if (newpos == (os_off_t) -1)
{