diff options
author | unknown <monty@hundin.mysql.fi> | 2001-12-20 06:14:11 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-12-20 06:14:11 +0200 |
commit | c23e5a830cd9d7fe5a14e6e971fddd32cd0fad69 (patch) | |
tree | 6238391b82cf68076a5dea6dd2e3c8c5c27473cd /mysys/my_pthread.c | |
parent | 7a8ce131289d31e8541e3e4f9085aefd7257b81d (diff) | |
download | mariadb-git-c23e5a830cd9d7fe5a14e6e971fddd32cd0fad69.tar.gz |
Fix insert delated + query cache.
Fix pthread_mutex_trylock on HPUX (needed for query cache).
include/my_pthread.h:
Fixed mutex problem with pthread_mutex_trylock on HPUX.
mysql-test/mysql-test-run.sh:
Wait for .pid file instead of .sock, because .pid is created later.
mysql-test/r/query_cache.result:
Test insert delated + query cache
mysql-test/t/query_cache.test:
Test insert delated + query cache
mysys/my_pthread.c:
Fixed mutex problem with pthread_mutex_trylock on HPUX.
sql/repl_failsafe.cc:
Safety
sql/sql_insert.cc:
Fix insert delated + query cache
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r-- | mysys/my_pthread.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 161e4faaff6..37c18a32451 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -471,6 +471,8 @@ struct hostent *my_gethostbyname_r(const char *name, this has to be added here. *****************************************************************************/ +#ifdef HPUX + int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime) { @@ -483,6 +485,18 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, } +int my_pthread_mutex_trylock(pthread_mutex_t *mutex) +{ + int error=pthread_mutex_trylock(mutex); + if (error == 1) /* Safety if the lib is fixed */ + return 0; /* Mutex was locked */ + if (error == -1) /* Safety if the lib is fixed */ + error=errno; + return error; +} + +#endif + /* Some help functions */ int pthread_no_free(void *not_used __attribute__((unused))) |