summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2002-01-31 11:04:49 -0700
committerunknown <sasha@mysql.sashanet.com>2002-01-31 11:04:49 -0700
commit8612588aeb74cc1a3252206da9c14cd83f392b4e (patch)
treebd625aaa09009624436017b04d9f7584655ced93 /mysys
parentf5a75e7965c781389128b3163e1c37c6f5fc71bd (diff)
parent1d76e90c1b61981e284bd583e54345cce9fe3551 (diff)
downloadmariadb-git-8612588aeb74cc1a3252206da9c14cd83f392b4e.tar.gz
Merge work:/home/bk/mysql-4.0
into mysql.sashanet.com:/reiser-data/mysql-4.0 sql/item_func.cc: Auto merged sql/slave.cc: Auto merged
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_iocache.c1
-rw-r--r--mysys/mf_iocache2.c10
2 files changed, 9 insertions, 2 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 6095cc23716..872757f77c5 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -823,6 +823,7 @@ int my_b_append(register IO_CACHE *info, const byte *Buffer, uint Count)
}
Count-=length;
Buffer+=length;
+ info->end_of_file+=length;
}
end:
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index a343829d32e..00ebf1e6846 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -27,7 +27,10 @@
my_off_t my_b_append_tell(IO_CACHE* info)
{
- my_off_t res;
+ /* prevent optimizer from putting res in a register when debugging
+ we need this to be able to see the value of res when the assert fails
+ */
+ dbug_volatile my_off_t res;
/* we need to lock the append buffer mutex to keep flush_io_cache()
from messing with the variables that we need in order to provide the
answer to the question.
@@ -35,8 +38,11 @@ my_off_t my_b_append_tell(IO_CACHE* info)
#ifdef THREAD
pthread_mutex_lock(&info->append_buffer_lock);
#endif
+ /* save the value of my_tell in res so we can see it when studying
+ coredump
+ */
DBUG_ASSERT(info->end_of_file - (info->append_read_pos-info->write_buffer)
- == my_tell(info->file,MYF(0)));
+ == (res=my_tell(info->file,MYF(0))));
res = info->end_of_file + (info->write_pos-info->append_read_pos);
#ifdef THREAD
pthread_mutex_unlock(&info->append_buffer_lock);