mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Small bug fixes + code for DELETE QUICK
Docs/manual.texi: Change log + bug fixes from the mailing list configure.in: added mlockall include/config-win.h: Fix to use SAFE_MUTEX include/ft_global.h: Free memory include/my_pthread.h: Fix for SAFE_MUTEX on windows myisam/Makefile.am: Fix modes myisam/ft_static.c: Fix language problem with fulltext myisam/ft_stopwords.c: Free memory at end myisam/mi_create.c: Fix language problem with fulltext myisam/mi_delete.c: Added optimization to not join blocks when using delete with QUICK myisam/mi_panic.c: Added freeing of memorty myisam/mi_test2.c: Added quick mode myisam/myisamchk.c: Fixed help text myisam/myisamdef.h: Added optimization to not join blocks when using delete with QUICK mysys/mf_format.c: Don't change case for extension mysys/my_wincond.c: Fix for safe mutex mysys/thr_mutex.c: Fix for safe mutex sql-bench/test-insert.sh: Split delete test to get more information about the times sql/ChangeLog: Changelog sql/ha_myisam.cc: Better OPTIMIZE handling sql/log.cc: Cleanup sql/mysql_priv.h: Fix for safe mutex sql/mysqld.cc: Added define for --one-thread option sql/sql_class.h: Fixed lock_time in slow_log sql/sql_delete.cc: Fix for safe mutex sql/sql_parse.cc: Fix processlist message for new process sql/sql_table.cc: Fix windows problem med CREATE INDEX sql/sql_yacc.yy: Fix for safe mutex sql/table.cc: Made code simpler strings/bmove512.c: Small speed fix support-files/mysql.server.sh: Fixed awk usage
This commit is contained in:
@ -107,12 +107,17 @@ int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line)
|
||||
abort();
|
||||
}
|
||||
mp->count--;
|
||||
#ifdef __WIN__
|
||||
pthread_mutex_unlock(&mp->mutex);
|
||||
error=0;
|
||||
#else
|
||||
error=pthread_mutex_unlock(&mp->mutex);
|
||||
if (error)
|
||||
{
|
||||
fprintf(stderr,"safe_mutex: Got error: %d when trying to unlock mutex at %s, line %d\n", error, file, line);
|
||||
abort();
|
||||
}
|
||||
#endif /* __WIN__ */
|
||||
pthread_mutex_unlock(&mp->global);
|
||||
return error;
|
||||
}
|
||||
@ -201,14 +206,23 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
|
||||
|
||||
int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line)
|
||||
{
|
||||
int error;
|
||||
if (mp->count != 0)
|
||||
{
|
||||
fprintf(stderr,"safe_mutex: Trying to destroy a mutex that was locked at %s, line %d at %s, line %d\n",
|
||||
mp->file,mp->line, file, line);
|
||||
abort();
|
||||
}
|
||||
#ifdef __WIN__
|
||||
error=0;
|
||||
pthread_mutex_destroy(&mp->global);
|
||||
return pthread_mutex_destroy(&mp->mutex);
|
||||
pthread_mutex_destroy(&mp->mutex);
|
||||
#else
|
||||
if (pthread_mutex_destroy(&mp->global) ||
|
||||
pthread_mutex_destroy(&mp->mutex))
|
||||
error=1;
|
||||
#endif
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif /* THREAD && SAFE_MUTEX */
|
||||
|
Reference in New Issue
Block a user