summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2007-12-12 23:57:28 +0200
committerunknown <monty@mysql.com/nosik.monty.fi>2007-12-12 23:57:28 +0200
commit8224c76fbd1570d0afac76ee25e120bc5544cd7d (patch)
treea4278d77413f10947b812f5d83065496aa65b7ac /dbug
parente8b0bb4769504c04f444c31f99d5a3d565ef9b39 (diff)
downloadmariadb-git-8224c76fbd1570d0afac76ee25e120bc5544cd7d.tar.gz
Removed MARIA_BASE min_row_length (duplicate of min_block_length)
Cleanup of recent code changes in dbug and my_thr_init Added name for each safe_mutex (for better DBUG and error reporting) Fixed that sort_info.max_records is calculated correctly. This fixed a bug in maria_chk Removed duplicate printing of mutex address in dbug log dbug/dbug.c: Cleanup of recent code changes include/my_pthread.h: Added name for each safe_mutex (for better DBUG and error reporting) mysys/my_thr_init.c: Cleanup of recent code changes mysys/thr_mutex.c: Added name for each safe_mutex (for better DBUG and error reporting) mysys/wqueue.c: Removed some mutex printing (as it's done now when we take mutex) storage/maria/Makefile.am: Fixed that 'make tags' works with xemacs storage/maria/ma_blockrec.c: base.min_row_length -> base.min_block_length (As they where basicly the same variable) storage/maria/ma_check.c: Moved more common stuff to initialize_variables_for_repair Fixed that sort_info.max_records is calculated correctly. This fixed a bug in maria_chk storage/maria/ma_create.c: More comments Fixed that min_pack_length is calculated more correctly Removed duplicate variable base.min_row_length storage/maria/ma_loghandler.c: Removed duplicate printing of mutex address storage/maria/ma_open.c: Removed base.min_row_length storage/maria/ma_packrec.c: Removed not anymore needed code (One should not change any .base variables as this will affect repair with unpack) storage/maria/maria_def.h: Removed base.min_row_length
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index a835dab5060..7bb7396ad5b 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -330,8 +330,7 @@ static pthread_mutex_t THR_LOCK_dbug;
static CODE_STATE *code_state(void)
{
- CODE_STATE *cs=0;
- my_bool error;
+ CODE_STATE *cs, **cs_ptr;
if (!init_done)
{
@@ -342,7 +341,9 @@ static CODE_STATE *code_state(void)
init_done=TRUE;
}
- if (!(cs= (CODE_STATE*) my_thread_var_get_dbug(&error)) && !error)
+ if (!(cs_ptr= (CODE_STATE**) my_thread_var_dbug()))
+ return 0; /* Thread not initialised */
+ if (!(cs= *cs_ptr))
{
cs=(CODE_STATE*) DbugMalloc(sizeof(*cs));
bzero((uchar*) cs,sizeof(*cs));
@@ -350,7 +351,7 @@ static CODE_STATE *code_state(void)
cs->func="?func";
cs->file="?file";
cs->stack=&init_settings;
- my_thread_var_set_dbug((void*) cs);
+ *cs_ptr= cs;
}
return cs;
}