diff options
author | Sergei Golubchik <serg@mysql.com> | 2008-08-06 21:30:05 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mysql.com> | 2008-08-06 21:30:05 +0200 |
commit | 3971e262e99366fa4bc9b454e69cf48daac9be85 (patch) | |
tree | b56353bb1faa6894eddf63228e16dcb2b0621f39 /include/my_pthread.h | |
parent | 7ca3fc4ff0ab53835da9f57af7f630f4c65868b7 (diff) | |
download | mariadb-git-3971e262e99366fa4bc9b454e69cf48daac9be85.tar.gz |
maria: deadlock detection when waiting on unique key (useless until we can rollback)
include/my_pthread.h:
cleanup
include/waiting_threads.h:
header guard
mysys/waiting_threads.c:
bug - kill strategy were not applied to deadlocks of length 1.
cast timeout to ulonglong.
storage/maria/ma_static.c:
declare WT_RESOURCE_TYPE ma_rc_dup_unique
storage/maria/ma_write.c:
deadlock detection when waiting on unique key (useless until we can rollback)
storage/maria/maria_def.h:
deadlock detection when waiting on unique key (useless until we can rollback)
storage/maria/trnman.c:
use deadlock detector.
protect state transitions of a TRN with a mutex.
trnman_trid_to_trn() function.
storage/maria/trnman.h:
trnman_trid_to_trn() function
protect state transitions of a TRN with a mutex
use deadlock detector.
storage/maria/trnman_public.h:
trnman_trid_to_trn()
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 28ce083d744..337b167e548 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -437,9 +437,10 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex); #ifndef set_timespec_time_nsec #define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \ - ulonglong now= (TIME) + (NSEC/100); \ + ulonglong nsec= (NSEC); \ + ulonglong now= (TIME) + (nsec/100); \ (ABSTIME).TV_sec= (now / ULL(10000000)); \ - (ABSTIME).TV_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \ + (ABSTIME).TV_nsec= (now % ULL(10000000) * 100 + (nsec % 100)); \ } while(0) #endif /* !set_timespec_time_nsec */ |