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

Commitd66a44a

Browse files
committed
Reversed out libpq protocol patch for Tom Lane.
1 parent8930699 commitd66a44a

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

‎src/interfaces/ecpg/preproc/preproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11220,7 +11220,7 @@ case 468:
1122011220
case 469:
1122111221
#line 2621 "preproc.y"
1122211222
{
11223-
yyval.str = yyvsp[0].str
11223+
yyval.str = yyvsp[0].str;
1122411224
;
1122511225
break;}
1122611226
case 470:

‎src/interfaces/libpq/fe-exec.c

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.76 1999/03/1416:46:21 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.77 1999/03/1418:12:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -467,7 +467,6 @@ static void
467467
parseInput(PGconn*conn)
468468
{
469469
charid;
470-
staticintpendingT=0;
471470

472471
/*
473472
* Loop to parse successive complete messages available in the buffer.
@@ -536,16 +535,7 @@ parseInput(PGconn *conn)
536535
PGRES_COMMAND_OK);
537536
if (pqGets(conn->result->cmdStatus,CMDSTATUS_LEN,conn))
538537
return;
539-
if (pendingT) {
540-
/* Check the returned message */
541-
/* if it's a SELECT or FETCH in a pendingT case, */
542-
/* then it probably means no rows returned. */
543-
/* We clear pendingT in that case. */
544-
if ((strncmp(conn->result->cmdStatus,"SELECT",6)==0)||
545-
(strncmp(conn->result->cmdStatus,"FETCH",5)==0))
546-
pendingT=0;
547-
}
548-
if (!pendingT)conn->asyncStatus=PGASYNC_READY;
538+
conn->asyncStatus=PGASYNC_READY;
549539
break;
550540
case'E':/* error return */
551541
if (pqGets(conn->errorMessage,ERROR_MSG_LENGTH,conn))
@@ -555,11 +545,10 @@ parseInput(PGconn *conn)
555545
/* and build an error result holding the error message */
556546
conn->result=PQmakeEmptyPGresult(conn,
557547
PGRES_FATAL_ERROR);
558-
if (!pendingT)conn->asyncStatus=PGASYNC_READY;
548+
conn->asyncStatus=PGASYNC_READY;
559549
break;
560550
case'Z':/* backend is ready for new query */
561551
conn->asyncStatus=PGASYNC_IDLE;
562-
pendingT=0;
563552
break;
564553
case'I':/* empty query */
565554
/* read and throw away the closing '\0' */
@@ -574,7 +563,7 @@ parseInput(PGconn *conn)
574563
if (conn->result==NULL)
575564
conn->result=PQmakeEmptyPGresult(conn,
576565
PGRES_EMPTY_QUERY);
577-
if (!pendingT)conn->asyncStatus=PGASYNC_READY;
566+
conn->asyncStatus=PGASYNC_READY;
578567
break;
579568
case'K':/* secret key data from the backend */
580569

@@ -595,15 +584,11 @@ parseInput(PGconn *conn)
595584
break;
596585
case'T':/* row descriptions (start of query
597586
* results) */
598-
if (pendingT) {
599-
DONOTICE(conn,"Got second 'T' message!\n");
600-
}
601587
if (conn->result==NULL)
602588
{
603589
/* First 'T' in a query sequence */
604590
if (getRowDescriptions(conn))
605591
return;
606-
pendingT=1;
607592
}
608593
else
609594
{
@@ -615,13 +600,11 @@ parseInput(PGconn *conn)
615600
* We stop parsing until the application accepts
616601
* the current result.
617602
*/
618-
pendingT=0;
619603
conn->asyncStatus=PGASYNC_READY;
620604
return;
621605
}
622606
break;
623607
case'D':/* ASCII data tuple */
624-
pendingT=0;
625608
if (conn->result!=NULL)
626609
{
627610
/* Read another tuple of a normal query response */
@@ -639,7 +622,6 @@ parseInput(PGconn *conn)
639622
}
640623
break;
641624
case'B':/* Binary data tuple */
642-
pendingT=0;
643625
if (conn->result!=NULL)
644626
{
645627
/* Read another tuple of a normal query response */
@@ -657,15 +639,12 @@ parseInput(PGconn *conn)
657639
}
658640
break;
659641
case'G':/* Start Copy In */
660-
pendingT=0;
661642
conn->asyncStatus=PGASYNC_COPY_IN;
662643
break;
663644
case'H':/* Start Copy Out */
664-
pendingT=0;
665645
conn->asyncStatus=PGASYNC_COPY_OUT;
666646
break;
667647
default:
668-
pendingT=0;
669648
sprintf(conn->errorMessage,
670649
"unknown protocol character '%c' read from backend. "
671650
"(The protocol character is the first character the "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp