diff options
author | Sergei Golubchik <serg@mysql.com> | 2008-09-01 21:43:11 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mysql.com> | 2008-09-01 21:43:11 +0200 |
commit | 27dadbd89577e8ff80c926cfb3fbd36cf0fb48a4 (patch) | |
tree | 58664cd91e50a30abd69134062c4a7c130146cdd /include/waiting_threads.h | |
parent | 533deb0ac4ecb9ca802034459120ce725006e4f1 (diff) | |
download | mariadb-git-27dadbd89577e8ff80c926cfb3fbd36cf0fb48a4.tar.gz |
wt: don't support a key as a union { ulonglong, void* }. Although convenient,
it forces the user to bzero a key before setting it as a pointer, otherwise
it'll have random content on architectures where
sizeof(void*) < sizeof(ulonglong).
Declaring a key as ulonglong only (not a union) makes this user mistake
impossible.
include/waiting_threads.h:
WT_RESOURCE_ID::value is an ulonglong, not a union
mysys/waiting_threads.c:
WT_RESOURCE_ID::value is an ulonglong, not a union
storage/maria/ma_write.c:
WT_RESOURCE_ID::value is an ulonglong, not a union
storage/maria/trnman.c:
WT_RESOURCE_ID::value is an ulonglong, not a union
unittest/mysys/waiting_threads-t.c:
WT_RESOURCE_ID::value is an ulonglong, not a union
Diffstat (limited to 'include/waiting_threads.h')
-rw-r--r-- | include/waiting_threads.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/waiting_threads.h b/include/waiting_threads.h index c2aecdc760d..0df17a47c61 100644 --- a/include/waiting_threads.h +++ b/include/waiting_threads.h @@ -32,10 +32,7 @@ typedef struct st_wt_resource_type { struct st_wt_resource_id { WT_RESOURCE_TYPE *type; - union { - void *ptr; - ulonglong num; - } value; + ulonglong value; }; #define WT_WAIT_STATS 24 |