From 689a32385ae0857aa52e77c693f3212b5eb01734 Mon Sep 17 00:00:00 2001 From: "thek@kpdesk.mysql.com" <> Date: Mon, 6 Nov 2006 11:41:52 +0100 Subject: [PATCH 1/4] Bug#23010 _my_b_read() passing illegal file handles to my_seek() - The io cache flag seek_not_done was not set properly in the reinit_io_cache function call and this led my_seek to be called desipite an invalid file handle. - Added a test in reinit_io_cache to ensure we have a valid file handle before setting seek_not_done flag. --- mysys/mf_iocache.c | 6 +++++- mysys/my_seek.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index a7937da0cc2..5f0069d9bed 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -313,7 +313,11 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type, if (info->type == READ_CACHE) { info->write_end=info->write_buffer+info->buffer_length; - info->seek_not_done=1; + /* + Trigger a new seek only if we have a valid + file handle. + */ + info->seek_not_done= (info->file >= 0); } info->end_of_file = ~(my_off_t) 0; } diff --git a/mysys/my_seek.c b/mysys/my_seek.c index ec24a26b3d9..f47383b7ace 100644 --- a/mysys/my_seek.c +++ b/mysys/my_seek.c @@ -30,6 +30,11 @@ my_off_t my_seek(File fd, my_off_t pos, int whence, whence, MyFlags)); DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */ + /* + Make sure we are using a valid file descriptor + */ + DBUG_ASSERT(fd >= 0); + newpos=lseek(fd, pos, whence); if (newpos == (os_off_t) -1) { From 090699345776cd31d3ee004d539fd181766ea084 Mon Sep 17 00:00:00 2001 From: "thek@kpdesk.mysql.com" <> Date: Tue, 9 Jan 2007 12:28:46 +0100 Subject: [PATCH 2/4] Cset exclude: thek@kpdesk.mysql.com|ChangeSet|20061106104152|07628 --- mysys/mf_iocache.c | 6 +----- mysys/my_seek.c | 5 ----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 5f0069d9bed..a7937da0cc2 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -313,11 +313,7 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type, if (info->type == READ_CACHE) { info->write_end=info->write_buffer+info->buffer_length; - /* - Trigger a new seek only if we have a valid - file handle. - */ - info->seek_not_done= (info->file >= 0); + info->seek_not_done=1; } info->end_of_file = ~(my_off_t) 0; } diff --git a/mysys/my_seek.c b/mysys/my_seek.c index f47383b7ace..ec24a26b3d9 100644 --- a/mysys/my_seek.c +++ b/mysys/my_seek.c @@ -30,11 +30,6 @@ my_off_t my_seek(File fd, my_off_t pos, int whence, whence, MyFlags)); DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */ - /* - Make sure we are using a valid file descriptor - */ - DBUG_ASSERT(fd >= 0); - newpos=lseek(fd, pos, whence); if (newpos == (os_off_t) -1) { From b63c167f6607a9a2cc671d578a0eb33bced72698 Mon Sep 17 00:00:00 2001 From: "joerg@trift2." <> Date: Wed, 10 Jan 2007 00:36:41 +0100 Subject: [PATCH 3/4] support-files/MySQL-shared-compat.spec.sh : Dummy, irrelevant change - just trigger a new build. --- support-files/MySQL-shared-compat.spec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/MySQL-shared-compat.spec.sh b/support-files/MySQL-shared-compat.spec.sh index 37733141451..14a98616863 100644 --- a/support-files/MySQL-shared-compat.spec.sh +++ b/support-files/MySQL-shared-compat.spec.sh @@ -29,7 +29,7 @@ # Change this to match the version of the shared libs you want to include # %define version50 @MYSQL_NO_DASH_VERSION@ -%define version41 4.1.16 +%define version41 4.1.17 %define version40 4.0.26 %define version3 3.23.58 From 1768b21a1482e7737ff2c752d12a2f8049ec8263 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/kent-amd64.(none)" <> Date: Wed, 10 Jan 2007 14:50:09 +0100 Subject: [PATCH 4/4] configure.in: Removed line accidently inserted when correcting bug#18526 --- configure.in | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.in b/configure.in index 69a0f9b576e..99a9f3b74ea 100644 --- a/configure.in +++ b/configure.in @@ -1074,7 +1074,6 @@ case $SYSTEM_TYPE in ;; *darwin*) AC_DEFINE([DEFAULT_SKIP_THREAD_PRIORITY], [1], [default to skip thread priority]) - CPPFLAGS="-D" if test "$ac_cv_prog_gcc" = "yes" then FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT"