git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f896b5e)
Fix statement_timeout on Win32 so that it properly treats micro-seconds
Wed, 9 Aug 2006 17:47:03 +0000 (17:47 +0000)
Wed, 9 Aug 2006 17:47:03 +0000 (17:47 +0000)
as micro-seconds, rather than as 100 microseconds, as it does now. This
actually fixes all setitimer calls on Win32, but statement_timeout is
the most visible fix.

Backpatch to 8.1.X. 8.0 works as documented.


diff --git a/src/backend/port/win32/timer.c b/src/backend/port/win32/timer.c
index 1531007d9e08475377545af97349378d7e55e5f9..0a38f00858e3e72729984f93a7cf7979ceafa46c 100644 (file)
--- a/src/backend/port/win32/timer.c
+++ b/src/backend/port/win32/timer.c
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.9 2006年08月09日 17:33:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.10 2006年08月09日 17:47:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,7 +56,8 @@ pg_timer_thread(LPVOID param)
timerCommArea.value.it_value.tv_usec == 0)
waittime = INFINITE; /* Cancel the interrupt */
else
- waittime = timerCommArea.value.it_value.tv_usec / 10 + timerCommArea.value.it_value.tv_sec * 1000;
+ /* WaitForSingleObjectEx() uses milliseconds */
+ waittime = timerCommArea.value.it_value.tv_usec / 1000 + timerCommArea.value.it_value.tv_sec * 1000;
ResetEvent(timerCommArea.event);
LeaveCriticalSection(&timerCommArea.crit_sec);
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /