Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated to
the main repository and within 24 hours after the push to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2002-01-31 11:02:11-07:00, sasha@stripped
temporary commit to pull Monty's changes
include/my_global.h
1.15 02/01/31 11:02:11 sasha@stripped +10 -0
added dbug_volatile
mysys/mf_iocache2.c
1.18 02/01/31 11:02:11 sasha@stripped +8 -2
some debugging code to investigate failed assert in my_b_append_tell()
sql/item_func.cc
1.59 02/01/31 11:02:11 sasha@stripped +3 -0
fixed logging bug in DO RELEASE_LOCK()
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sasha
# Host: mysql.sashanet.com
# Root: /reiser-data/mysql-4.0
--- 1.58/sql/item_func.cc Sat Jan 19 19:22:43 2002
+++ 1.59/sql/item_func.cc Thu Jan 31 11:02:11 2002
@@ -1418,16 +1418,19 @@
if (mysql_bin_log.is_open())
{
THD *thd = current_thd;
+ uint save_query_length;
char buf[256];
String tmp(buf,sizeof(buf));
tmp.length(0);
tmp.append("DO RELEASE_LOCK(\"");
tmp.append(ull->key,ull->key_length);
tmp.append("\")");
+ save_query_length=thd->query_length;
thd->query_length=tmp.length();
Query_log_event qev(thd,tmp.ptr());
qev.error_code=0; // this query is always safe to run on slave
mysql_bin_log.write(&qev);
+ thd->query_length=save_query_length;
}
if (--ull->count)
pthread_cond_signal(&ull->cond);
--- 1.17/mysys/mf_iocache2.c Sat Jan 26 22:26:22 2002
+++ 1.18/mysys/mf_iocache2.c Thu Jan 31 11:02:11 2002
@@ -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 @@
#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);
--- 1.14/include/my_global.h Tue Jan 29 09:32:14 2002
+++ 1.15/include/my_global.h Thu Jan 31 11:02:11 2002
@@ -51,6 +51,16 @@
#endif
#endif /* _WIN32... */
+/* sometimes we want to make sure that the variable is not put into
+ a register in debugging mode so we can see its value in the core
+*/
+
+#ifndef DBUG_OFF
+#define dbug_volatile volatile
+#else
+#define dbug_volatile
+#endif
+
/*
The macros below are borrowed from include/linux/compiler.h in the
Linux kernel. Use them to indicate the likelyhood of the truthfulness
| Thread |
|---|
| • bk commit into 4.0 tree | sasha | 31 Jan |