8000 Update WIN32 branch from CVS HEAD. · codeimmortal/postgres@6435fc0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6435fc0

Browse files
committed
Update WIN32 branch from CVS HEAD.
1 parent c40ed51 commit 6435fc0

File tree

10 files changed

+13
-58
lines changed

10 files changed

+13
-58
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2373,7 +2373,7 @@ echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
23732373
# We already have this in Makefile.win32, but configure needs it too
23742374
if test "$PORTNAME" = "win32"
23752375
then
2376-
CPPFLAGS="$CPPFLAGS -Isrc/include/port/win32"
2376+
CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
23772377
fi
23782378

23792379
# Check if the compiler still works with the template settings

configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.280.2.1 2003/09/07 04:36:38 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.280.2.2 2003/09/07 21:44:29 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -241,7 +241,7 @@ AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
241241
# We already have this in Makefile.win32, but configure needs it too
242242
if test "$PORTNAME" = "win32"
243243
then
244-
CPPFLAGS="$CPPFLAGS -Isrc/include/port/win32"
244+
CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
245245
fi
246246

247247
# Check if the compiler still works with the template settings

contrib/chkpass/chkpass.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* darcy@druid.net
55
* http://www.druid.net/darcy/
66
*
7-
* $Id: chkpass.c,v 1.10 2003/07/24 17:52:12 tgl Exp $
7+
* $Id: chkpass.c,v 1.10.2.1 2003/09/07 21:44:30 momjian Exp $
88
* best viewed with tabs set to 4
99
*/
1010

@@ -69,7 +69,6 @@ chkpass_in(PG_FUNCTION_ARGS)
6969
char *str = PG_GETARG_CSTRING(0);
7070
chkpass *result;
7171
char mysalt[4];
72-
static bool random_initialized = false;
7372
static char salt_chars[] =
7473
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
7574

@@ -93,12 +92,6 @@ chkpass_in(PG_FUNCTION_ARGS)
9392

9493
result = (chkpass *) palloc(sizeof(chkpass));
9594

96-
if (!random_initialized)
97-
{
98-
srandom((unsigned int) time(NULL));
99-
random_initialized = true;
100-
}
101-
10295
mysalt[0] = salt_chars[random() & 0x3f];
10396
mysalt[1] = salt_chars[random() & 0x3f];
10497
mysalt[2] = 0; /* technically the terminator is not

doc/src/sgml/runtime.sgml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.199.2.1 2003/09/07 04:36:43 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.199.2.2 2003/09/07 21:44:30 momjian Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -1438,7 +1438,6 @@ SET ENABLE_SEQSCAN TO OFF;
14381438
<term><varname>GEQO_EFFORT</varname> (<type>integer</type>)</term>
14391439
<term><varname>GEQO_GENERATIONS</varname> (<type>integer</type>)</term>
14401440
<term><varname>GEQO_POOL_SIZE</varname> (<type>integer</type>)</term>
1441-
<term><varname>GEQO_RANDOM_SEED</varname> (<type>integer</type>)</term>
14421441
<term><varname>GEQO_SELECTION_BIAS</varname> (<type>floating point</type>)</term>
14431442
<listitem>
14441443
<para>
@@ -1455,9 +1454,7 @@ SET ENABLE_SEQSCAN TO OFF;
14551454
is roughly proportional to the sum of pool size and generations.
14561455
The selection bias is the selective pressure within the
14571456
population. Values can be from 1.50 to 2.00; the latter is the
1458-
default. The random seed can be set to get reproducible results
1459-
from the algorithm. If it is set to -1 then the algorithm
1460-
behaves non-deterministically.
1457+
default.
14611458
</para>
14621459
</listitem>
14631460
</varlistentry>

src/backend/optimizer/geqo/geqo_main.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/geqo_main.c,v 1.39 2003/08/12 18:23:20 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/geqo_main.c,v 1.39.2.1 2003/09/07 21:44:30 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -41,7 +41,6 @@ int Geqo_pool_size;
4141
int Geqo_effort;
4242
int Geqo_generations;
4343
double Geqo_selection_bias;
44-
int Geqo_random_seed;
4544

4645

4746
static int gimme_pool_size(int nr_rel);
@@ -96,13 +95,6 @@ geqo(Query *root, int number_of_rels, List *initial_rels)
9695
number_generations = gimme_number_generations(pool_size, Geqo_effort);
9796
status_interval = 10;
9897

99-
/* seed random number generator */
100-
/* XXX why is this done every time around? */
101-
if (Geqo_random_seed >= 0)
102-
srandom((unsigned int) Geqo_random_seed);
103-
else
104-
srandom((unsigned int) time(NULL));
105-
10698
/* allocate genetic pool memory */
10799
pool = alloc_pool(pool_size, number_of_rels);
108100

src/backend/postmaster/pgstat.c

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Copyright (c) 2001-2003, PostgreSQL Global Development Group
1515
*
16-
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.43 2003/08/12 16:21:18 tgl Exp $
16+
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.43.2.1 2003/09/07 21:44:30 momjian Exp $
1717
* ----------
1818
*/
1919
#include "postgres.h"
@@ -1591,8 +1591,6 @@ pgstat_recvbuffer(void)
15911591
int msg_send = 0; /* next send index in buffer */
15921592
int msg_recv = 0; /* next receive index */
15931593
int msg_have = 0; /* number of bytes stored */
1594-
struct sockaddr_storage fromaddr;
1595-
int fromlen;
15961594
bool overflow = false;
15971595

15981596
/*
@@ -1702,10 +1700,8 @@ pgstat_recvbuffer(void)
17021700
*/
17031701
if (FD_ISSET(pgStatSock, &rfds))
17041702
{
1705-
fromlen = sizeof(fromaddr);
1706-
len = recvfrom(pgStatSock, (char *) &input_buffer,
1707-
sizeof(PgStat_Msg), 0,
1708-
(struct sockaddr *) &fromaddr, &fromlen);
1703+
len = recv(pgStatSock, (char *) &input_buffer,
1704+
sizeof(PgStat_Msg), 0);
17091705
if (len < 0)
17101706
{
17111707
ereport(LOG,
@@ -1726,16 +1722,6 @@ pgstat_recvbuffer(void)
17261722
if (input_buffer.msg_hdr.m_size != len)
17271723
continue;
17281724

1729-
/*
1730-
* The source address of the packet must be our own socket.
1731-
* This ensures that only real hackers or our own backends
1732-
* tell us something. (This should be redundant with a
1733-
* kernel-level check due to having used connect(), but let's
1734-
* do it anyway.)
1735-
*/
1736-
if (memcmp(&fromaddr, &pgStatAddr, fromlen))
1737-
continue;
1738-
17391725
/*
17401726
* O.K. - we accept this message. Copy it to the circular
17411727
* msgbuffer.

src/backend/utils/misc/guc.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.149.2.1 2003/09/07 04:36:59 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.149.2.2 2003/09/07 21:44:30 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -898,15 +898,6 @@ static struct config_int ConfigureNamesInt[] =
898898
&Geqo_generations,
899899
0, 0, INT_MAX, NULL, NULL
900900
},
901-
{
902-
{"geqo_random_seed", PGC_USERSET, QUERY_TUNING_GEQO,
903-
gettext_noop("Can be set to get reproducible results from the algorithm"),
904-
gettext_noop("If it is set to -1 then the algorithm behaves "
905-
"non-deterministically")
906-
},
907-
&Geqo_random_seed,
908-
-1, INT_MIN, INT_MAX, NULL, NULL
909-
},
910901

911902
{
912903
{"deadlock_timeout", PGC_SIGHUP, LOCK_MANAGEMENT,

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
#geqo_generations = 0
122122
#geqo_pool_size = 0 # default based on tables in statement,
123123
# range 128-1024
124-
#geqo_random_seed = -1 # -1 = use variable seed
125124
#geqo_selection_bias = 2.0 # range 1.5-2.0
126125

127126
# - Other Planner Options -

src/bin/psql/tab-complete.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.84 2003/08/04 23:59:40 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.84.2.1 2003/09/07 21:44:31 momjian Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -534,7 +534,6 @@ psql_completion(char *text, int start, int end)
534534
"geqo_effort",
535535
"geqo_generations",
536536
"geqo_pool_size",
537-
"geqo_random_seed",
538537
"geqo_selection_bias",
539538
"geqo_threshold",
540539
"join_collapse_limit",

src/include/optimizer/geqo.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: geqo.h,v 1.31 2003/08/04 02:40:13 momjian Exp $
9+
* $Id: geqo.h,v 1.31.2.1 2003/09/07 21:44:31 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -64,8 +64,6 @@ extern double Geqo_selection_bias;
6464
#define MIN_GEQO_SELECTION_BIAS 1.5
6565
#define MAX_GEQO_SELECTION_BIAS 2.0
6666

67-
extern int Geqo_random_seed; /* or negative to use current time */
68-
6967

7068
/* routines in geqo_main.c */
7169
extern RelOptInfo *geqo(Query *root, int number_of_rels, List *initial_rels);

0 commit comments

Comments
 (0)
0