pgpool2.git / summary / log / commit / refs
commit 0036c99f492436175bd47c3c3c86bb66ed0aa397
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Wed Sep 11 14:21:51 2013 +0000
Fix incorrect time stamp rewriting in replication mode for certain time zones.
Time stamp rewriting calls "SELECT now()" to get current
time. Unfortunately the buffer for the current time is too small for
certain time zones such as "02:30". Note that non-30-minutes-time-zone
such as "0900" does not reveal the problem. This explains why we
haven't the bug report until today. Bug reported in [pgpool-general:
2113] and fix provided by Sean Hogan.
src/rewrite/pool_timestamp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/rewrite/pool_timestamp.c b/src/rewrite/pool_timestamp.c
index 6d68a8842..14346f264 100644
--- a/src/rewrite/pool_timestamp.c
+++ b/src/rewrite/pool_timestamp.c
@@ -5,7 +5,7 @@
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2011 PgPool Global Development Group
+ * Copyright (c) 2003-2013 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -312,7 +312,7 @@ get_current_timestamp(POOL_CONNECTION_POOL *backend)
{
POOL_SELECT_RESULT *res;
POOL_STATUS status;
- static char timestamp[32];
+ static char timestamp[64];
status = do_query(MASTER(backend), "SELECT now()", &res, MAJOR(backend));
if (status != POOL_CONTINUE)
[parent: 62ffd98f8437]