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

Commitb210b16

Browse files
author
Hiroshi Inoue
committed
Prevent an infinite loop of error reporting.
1 parentf2d70d3 commitb210b16

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

‎src/interfaces/odbc/connection.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ CC_connect(ConnectionClass *self, char do_password)
610610
intareq=-1;
611611
intberesp;
612612
staticcharmsgbuffer[ERROR_MSG_LENGTH];
613-
charsalt[5];
613+
charsalt[5],notice[512];
614614
staticchar*func="CC_connect";
615615

616616
#ifdefMULTIBYTE
@@ -893,6 +893,9 @@ CC_connect(ConnectionClass *self, char do_password)
893893
case'Z':/* Backend is ready for new query (6.4) */
894894
ReadyForQuery= TRUE;
895895
break;
896+
case'N':/* Notices may come */
897+
while (SOCK_get_string(sock,notice,sizeof(notice)-1)) ;
898+
break;
896899
default:
897900
self->errormsg="Unexpected protocol character during authentication";
898901
self->errornumber=CONN_INVALID_AUTHENTICATION;

‎src/interfaces/odbc/descriptor.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Comments:See "notice.txt" for copyright and license information.
77
*
8-
* $Id: descriptor.h,v 1.3 2002/04/02 10:50:44 inoue Exp $
8+
* $Id: descriptor.h,v 1.4 2002/04/10 08:18:54 inoue Exp $
99
*
1010
*/
1111

@@ -17,7 +17,7 @@
1717
typedefstruct
1818
{
1919
COL_INFO*col_info;/* cached SQLColumns info for this table */
20-
charschema[MAX_TABLE_LEN+1];
20+
charschema[MAX_SCHEMA_LEN+1];
2121
charname[MAX_TABLE_LEN+1];
2222
charalias[MAX_TABLE_LEN+1];
2323
}TABLE_INFO;

‎src/interfaces/odbc/info.c‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ PGAPI_GetInfo(
342342
caseSQL_MAX_OWNER_NAME_LEN:/* ODBC 1.0 */
343343
len=2;
344344
value=0;
345+
if (conn->schema_support)
346+
value=MAX_SCHEMA_LEN;
345347
break;
346348

347349
caseSQL_MAX_PROCEDURE_NAME_LEN:/* ODBC 1.0 */
@@ -484,12 +486,21 @@ PGAPI_GetInfo(
484486
break;
485487

486488
caseSQL_OWNER_TERM:/* ODBC 1.0 */
487-
p="owner";
489+
if (conn->schema_support)
490+
p="schema";
491+
else
492+
p="owner";
488493
break;
489494

490495
caseSQL_OWNER_USAGE:/* ODBC 2.0 */
491496
len=4;
492497
value=0;
498+
if (conn->schema_support)
499+
value=SQL_OU_DML_STATEMENTS
500+
|SQL_OU_TABLE_DEFINITION
501+
|SQL_OU_INDEX_DEFINITION
502+
|SQL_OU_PRIVILEGE_DEFINITION
503+
;
493504
break;
494505

495506
caseSQL_POS_OPERATIONS:/* ODBC 2.0 */

‎src/interfaces/odbc/psqlodbc.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Comments:See "notice.txt" for copyright and license information.
77
*
8-
* $Id: psqlodbc.h,v 1.63 2002/04/02 10:50:49 inoue Exp $
8+
* $Id: psqlodbc.h,v 1.64 2002/04/10 08:18:53 inoue Exp $
99
*
1010
*/
1111

@@ -124,6 +124,7 @@ typedef UInt4 Oid;
124124
#defineBYTELEN8
125125
#defineVARHDRSZsizeof(Int4)
126126

127+
#defineMAX_SCHEMA_LEN32
127128
#defineMAX_TABLE_LEN32
128129
#defineMAX_COLUMN_LEN32
129130
#defineMAX_CURSOR_LEN32

‎src/interfaces/odbc/statement.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ SC_Constructor(void)
301301
rv->inaccurate_result= FALSE;
302302
rv->miscinfo=0;
303303
rv->updatable= FALSE;
304+
rv->error_recsize=-1;
304305
}
305306
returnrv;
306307
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp