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

Commit892d46e

Browse files
author
Hiroshi Inoue
committed
1) fix bugs reported by Andrea Aime.
2) fix a bug reported by Jan Wieck.psqlodbc is 7.01.0005 now.
1 parent48bdf02 commit892d46e

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

‎src/interfaces/odbc/parse.c

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,21 @@ getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k)
228228
char
229229
searchColInfo(COL_INFO*col_info,FIELD_INFO*fi)
230230
{
231-
intk;
232-
char*col;
231+
intk,cmp;
232+
char*col;
233233

234234

235235
for (k=0;k<QR_get_num_tuples(col_info->result);k++)
236236
{
237237
col=QR_get_value_manual(col_info->result,k,3);
238-
if (!strcmp(col,fi->name))
238+
if (fi->dquote)
239+
cmp=strcmp(col,fi->name);
240+
else
241+
cmp=stricmp(col,fi->name);
242+
if (!cmp)
239243
{
244+
if (!fi->dquote)
245+
strcpy(fi->name,col);
240246
getColInfo(col_info,fi,k);
241247

242248
mylog("PARSE: searchColInfo: \n");
@@ -393,6 +399,9 @@ parse_statement(StatementClass *stmt)
393399
{
394400
blevel--;
395401
mylog("blevel-- = %d\n",blevel);
402+
}
403+
if (blevel==0)
404+
{
396405
if (delim==',')
397406
{
398407
in_func= FALSE;
@@ -569,6 +578,13 @@ parse_statement(StatementClass *stmt)
569578
ti[stmt->ntab]->alias[0]='\0';
570579

571580
strcpy(ti[stmt->ntab]->name,token);
581+
if (!dquote)
582+
{
583+
char*ptr;
584+
/* lower case table name */
585+
for (ptr=ti[stmt->ntab]->name;*ptr;ptr++)
586+
*ptr=tolower((unsignedchar)*ptr);
587+
}
572588
mylog("got table = '%s'\n",ti[stmt->ntab]->name);
573589

574590
if (delim==',')

‎src/interfaces/odbc/psqlodbc.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: psqlodbc.h,v 1.41 2001/03/27 04:00:54 momjian Exp $
8+
* $Id: psqlodbc.h,v 1.42 2001/05/0100:47:06 inoue Exp $
99
*
1010
*/
1111

@@ -42,7 +42,7 @@ typedef UInt4 Oid;
4242
#defineDRIVERNAME"PostgreSQL ODBC"
4343
#defineDBMS_NAME"PostgreSQL"
4444

45-
#definePOSTGRESDRIVERVERSION"07.01.0004"
45+
#definePOSTGRESDRIVERVERSION"07.01.0005"
4646

4747
#ifdefWIN32
4848
#defineDRIVER_FILE_NAME"PSQLODBC.DLL"

‎src/interfaces/odbc/psqlodbc.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ END
342342
//
343343

344344
VS_VERSION_INFO VERSIONINFO
345-
FILEVERSION 7,1,0,4
346-
PRODUCTVERSION 7,1,0,4
345+
FILEVERSION 7,1,0,5
346+
PRODUCTVERSION 7,1,0,5
347347
FILEFLAGSMASK 0x3L
348348
#ifdef _DEBUG
349349
FILEFLAGS 0x1L
@@ -365,14 +365,14 @@ BEGIN
365365
VALUE "CompanyName", "Insight Distribution Systems\0"
366366
#endif
367367
VALUE "FileDescription", "PostgreSQL Driver\0"
368-
VALUE "FileVersion", " 07.01.0004\0"
368+
VALUE "FileVersion", " 07.01.0005\0"
369369
VALUE "InternalName", "psqlodbc\0"
370370
VALUE "LegalCopyright", "\0"
371371
VALUE "LegalTrademarks", "ODBC(TM) is a trademark of Microsoft Corporation. Microsoft� is a registered trademark of Microsoft Corporation. Windows(TM) is a trademark of Microsoft Corporation.\0"
372372
VALUE "OriginalFilename", "psqlodbc.dll\0"
373373
VALUE "PrivateBuild", "\0"
374374
VALUE "ProductName", "Microsoft Open Database Connectivity\0"
375-
VALUE "ProductVersion", " 07.01.0004\0"
375+
VALUE "ProductVersion", " 07.01.0005\0"
376376
VALUE "SpecialBuild", "\0"
377377
END
378378
END

‎src/interfaces/odbc/qresult.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ QR_close(QResultClass *self)
330330
QR_Destructor(res);
331331

332332
/* End the transaction if there are no cursors left on this conn */
333-
if (CC_cursor_count(self->conn)==0)
333+
if (CC_is_in_autocommit(self->conn)&&CC_cursor_count(self->conn)==0)
334334
{
335335
mylog("QResult: END transaction on conn=%u\n",self->conn);
336336

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp