Commit 892d46e7 authored by Hiroshi Inoue's avatar Hiroshi Inoue

1) fix bugs reported by Andrea Aime.

2) fix a bug reported by Jan Wieck.
psqlodbc is 7.01.0005 now.
parent 48bdf021
...@@ -228,15 +228,21 @@ getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k) ...@@ -228,15 +228,21 @@ getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k)
char char
searchColInfo(COL_INFO *col_info, FIELD_INFO *fi) searchColInfo(COL_INFO *col_info, FIELD_INFO *fi)
{ {
int k; int k, cmp;
char *col; char *col;
for (k = 0; k < QR_get_num_tuples(col_info->result); k++) for (k = 0; k < QR_get_num_tuples(col_info->result); k++)
{ {
col = QR_get_value_manual(col_info->result, k, 3); col = QR_get_value_manual(col_info->result, k, 3);
if (!strcmp(col, fi->name)) if (fi->dquote)
cmp = strcmp(col, fi->name);
else
cmp = stricmp(col, fi->name);
if (!cmp)
{ {
if (!fi->dquote)
strcpy(fi->name, col);
getColInfo(col_info, fi, k); getColInfo(col_info, fi, k);
mylog("PARSE: searchColInfo: \n"); mylog("PARSE: searchColInfo: \n");
...@@ -393,6 +399,9 @@ parse_statement(StatementClass *stmt) ...@@ -393,6 +399,9 @@ parse_statement(StatementClass *stmt)
{ {
blevel--; blevel--;
mylog("blevel-- = %d\n", blevel); mylog("blevel-- = %d\n", blevel);
}
if (blevel == 0)
{
if (delim == ',') if (delim == ',')
{ {
in_func = FALSE; in_func = FALSE;
...@@ -569,6 +578,13 @@ parse_statement(StatementClass *stmt) ...@@ -569,6 +578,13 @@ parse_statement(StatementClass *stmt)
ti[stmt->ntab]->alias[0] = '\0'; ti[stmt->ntab]->alias[0] = '\0';
strcpy(ti[stmt->ntab]->name, token); strcpy(ti[stmt->ntab]->name, token);
if (!dquote)
{
char *ptr;
/* lower case table name */
for (ptr = ti[stmt->ntab]->name; *ptr; ptr++)
*ptr = tolower((unsigned char) *ptr);
}
mylog("got table = '%s'\n", ti[stmt->ntab]->name); mylog("got table = '%s'\n", ti[stmt->ntab]->name);
if (delim == ',') if (delim == ',')
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Comments: See "notice.txt" for copyright and license information. * Comments: See "notice.txt" for copyright and license information.
* *
* $Id: psqlodbc.h,v 1.41 2001/03/27 04:00:54 momjian Exp $ * $Id: psqlodbc.h,v 1.42 2001/05/01 00:47:06 inoue Exp $
* *
*/ */
...@@ -42,7 +42,7 @@ typedef UInt4 Oid; ...@@ -42,7 +42,7 @@ typedef UInt4 Oid;
#define DRIVERNAME "PostgreSQL ODBC" #define DRIVERNAME "PostgreSQL ODBC"
#define DBMS_NAME "PostgreSQL" #define DBMS_NAME "PostgreSQL"
#define POSTGRESDRIVERVERSION "07.01.0004" #define POSTGRESDRIVERVERSION "07.01.0005"
#ifdef WIN32 #ifdef WIN32
#define DRIVER_FILE_NAME "PSQLODBC.DLL" #define DRIVER_FILE_NAME "PSQLODBC.DLL"
......
...@@ -342,8 +342,8 @@ END ...@@ -342,8 +342,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 7,1,0,4 FILEVERSION 7,1,0,5
PRODUCTVERSION 7,1,0,4 PRODUCTVERSION 7,1,0,5
FILEFLAGSMASK 0x3L FILEFLAGSMASK 0x3L
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
...@@ -365,14 +365,14 @@ BEGIN ...@@ -365,14 +365,14 @@ BEGIN
VALUE "CompanyName", "Insight Distribution Systems\0" VALUE "CompanyName", "Insight Distribution Systems\0"
#endif #endif
VALUE "FileDescription", "PostgreSQL Driver\0" VALUE "FileDescription", "PostgreSQL Driver\0"
VALUE "FileVersion", " 07.01.0004\0" VALUE "FileVersion", " 07.01.0005\0"
VALUE "InternalName", "psqlodbc\0" VALUE "InternalName", "psqlodbc\0"
VALUE "LegalCopyright", "\0" VALUE "LegalCopyright", "\0"
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" 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"
VALUE "OriginalFilename", "psqlodbc.dll\0" VALUE "OriginalFilename", "psqlodbc.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Microsoft Open Database Connectivity\0" VALUE "ProductName", "Microsoft Open Database Connectivity\0"
VALUE "ProductVersion", " 07.01.0004\0" VALUE "ProductVersion", " 07.01.0005\0"
VALUE "SpecialBuild", "\0" VALUE "SpecialBuild", "\0"
END END
END END
......
...@@ -330,7 +330,7 @@ QR_close(QResultClass *self) ...@@ -330,7 +330,7 @@ QR_close(QResultClass *self)
QR_Destructor(res); QR_Destructor(res);
/* End the transaction if there are no cursors left on this conn */ /* End the transaction if there are no cursors left on this conn */
if (CC_cursor_count(self->conn) == 0) if (CC_is_in_autocommit(self->conn) && CC_cursor_count(self->conn) == 0)
{ {
mylog("QResult: END transaction on conn=%u\n", self->conn); mylog("QResult: END transaction on conn=%u\n", self->conn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment