From 5f900fb5322f123fcf63c59ca16b749a6c49bd73 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Jul 2005 20:37:59 +0200 Subject: [PATCH 1/3] Add the definition of "floatget". Necessary to compile 5.0.10 on Windows, no bug report filed. include/config-win.h: Add the definition of "floatget" (as taken from "include/my_config.h", matching the common "floatstore"). Necessary to compile 5.0.10 on Windows, no bug report filed. --- include/config-win.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/config-win.h b/include/config-win.h index 6e0740497b0..4eaf97cd4f5 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -285,6 +285,7 @@ inline double ulonglong2double(ulonglong value) *(((long *) T)+1) = *(((long*) &V)+1); } #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } #define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float)) +#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float)) #define float8get(V,M) doubleget((V),(M)) #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) #define float8store(V,M) doublestore((V),(M)) From 03fb8276d5f66e9b7ce51a0aa9c0215c71c86a04 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Jul 2005 20:56:08 +0200 Subject: [PATCH 2/3] removed DBUG code from ha_federated.cc causing windows compile problems. This is for the release bk tree, same change as 1.1890, which JimW approved. sql/ha_federated.cc: removed DBUG code --- sql/ha_federated.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index 1d7b8cda8e2..80fbfe13d33 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -762,7 +762,6 @@ uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row) (*field)->move_field(-old_ptr); } - DBUG_DUMP("record", record, table->s->reclength); DBUG_RETURN(0); } From 46b0edc444c0dffafbbce8ef5b65f61a0224bef1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Jul 2005 12:01:42 -0700 Subject: [PATCH 3/3] Remove use of non-portable gettimeofday() in thr_lock.c (Bug #12100) mysys/thr_lock.c: Use set_timespec() macro instead of calling gettimeofday() --- mysys/thr_lock.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index b12f8234c26..5b11aa3c6f4 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -388,7 +388,6 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, { struct st_my_thread_var *thread_var= my_thread_var; pthread_cond_t *cond= &thread_var->suspend; - struct timeval now; struct timespec wait_timeout; enum enum_thr_lock_result result= THR_LOCK_ABORTED; my_bool can_deadlock= test(data->owner->info->n_cursors); @@ -406,11 +405,7 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, data->cond= cond; if (can_deadlock) - { - gettimeofday(&now, 0); - wait_timeout.tv_sec= now.tv_sec + table_lock_wait_timeout; - wait_timeout.tv_nsec= now.tv_usec * 1000; - } + set_timespec(wait_timeout, table_lock_wait_timeout); while (!thread_var->abort || in_wait_list) { int rc= can_deadlock ? pthread_cond_timedwait(cond, &data->lock->mutex,