Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e61a1a

Browse files
committed
Make connect/test1 independent of localhost IPv6.
Since commit8688987, it has assumed"localhost" resolves to both ::1 and 127.0.0.1. We gain nothing fromthat assumption, and it does not hold in a default installation of RedHat Enterprise Linux 5. Back-patch to 9.3 (all supported versions).
1 parent075ced2 commit9e61a1a

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

‎src/interfaces/ecpg/test/connect/test1.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ exec sql end declare section;
5454
exec sql disconnect;
5555

5656
/* wrong port */
57-
exec sql connect to tcp:postgresql://localhost:20/ecpg2_regression user regress_ecpg_user1 identified by connectpw;
57+
exec sql connect to tcp:postgresql://127.0.0.1:20/ecpg2_regression user regress_ecpg_user1 identified by connectpw;
5858
/* no disconnect necessary */
5959

6060
/* wrong password */

‎src/interfaces/ecpg/test/expected/connect-test1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ main(void)
109109

110110

111111
/* wrong port */
112-
{ECPGconnect(__LINE__,0,"tcp:postgresql://localhost:20/ecpg2_regression" ,"regress_ecpg_user1" ,"connectpw" ,NULL,0); }
112+
{ECPGconnect(__LINE__,0,"tcp:postgresql://127.0.0.1:20/ecpg2_regression" ,"regress_ecpg_user1" ,"connectpw" ,NULL,0); }
113113
#line 57 "test1.pgc"
114114

115115
/* no disconnect necessary */

‎src/interfaces/ecpg/test/expected/connect-test1.stderr

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,10 @@
6363
[NO_PID]: sqlca: code: -402, state: 08001
6464
[NO_PID]: raising sqlcode -220 on line 54: connection "CURRENT" does not exist on line 54
6565
[NO_PID]: sqlca: code: -220, state: 08003
66-
[NO_PID]: ECPGconnect: opening database ecpg2_regression onlocalhost port <REGRESSION_PORT> for user regress_ecpg_user1
66+
[NO_PID]: ECPGconnect: opening database ecpg2_regression on127.0.0.1 port <REGRESSION_PORT> for user regress_ecpg_user1
6767
[NO_PID]: sqlca: code: 0, state: 00000
6868
[NO_PID]: ECPGconnect: could not open database: could not connect to server: Connection refused
69-
Is the server running on host "localhost" (::1) and accepting
70-
TCP/IP connections on port 20?
71-
could not connect to server: Connection refused
72-
Is the server running on host "localhost" (127.0.0.1) and accepting
69+
Is the server running on host "127.0.0.1" and accepting
7370
TCP/IP connections on port 20?
7471

7572
[NO_PID]: sqlca: code: 0, state: 00000

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp