1) fix bugs reported by Andrea Aime.
2) fix a bug reported by Jan Wieck. psqlodbc is 7.01.0005 now.
This commit is contained in:
parent
48bdf021b6
commit
892d46e7d0
@ -228,15 +228,21 @@ getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k)
|
||||
char
|
||||
searchColInfo(COL_INFO *col_info, FIELD_INFO *fi)
|
||||
{
|
||||
int k;
|
||||
int k, cmp;
|
||||
char *col;
|
||||
|
||||
|
||||
for (k = 0; k < QR_get_num_tuples(col_info->result); k++)
|
||||
{
|
||||
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);
|
||||
|
||||
mylog("PARSE: searchColInfo: \n");
|
||||
@ -393,6 +399,9 @@ parse_statement(StatementClass *stmt)
|
||||
{
|
||||
blevel--;
|
||||
mylog("blevel-- = %d\n", blevel);
|
||||
}
|
||||
if (blevel == 0)
|
||||
{
|
||||
if (delim == ',')
|
||||
{
|
||||
in_func = FALSE;
|
||||
@ -569,6 +578,13 @@ parse_statement(StatementClass *stmt)
|
||||
ti[stmt->ntab]->alias[0] = '\0';
|
||||
|
||||
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);
|
||||
|
||||
if (delim == ',')
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* 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;
|
||||
#define DRIVERNAME "PostgreSQL ODBC"
|
||||
#define DBMS_NAME "PostgreSQL"
|
||||
|
||||
#define POSTGRESDRIVERVERSION "07.01.0004"
|
||||
#define POSTGRESDRIVERVERSION "07.01.0005"
|
||||
|
||||
#ifdef WIN32
|
||||
#define DRIVER_FILE_NAME "PSQLODBC.DLL"
|
||||
|
@ -342,8 +342,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 7,1,0,4
|
||||
PRODUCTVERSION 7,1,0,4
|
||||
FILEVERSION 7,1,0,5
|
||||
PRODUCTVERSION 7,1,0,5
|
||||
FILEFLAGSMASK 0x3L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -365,14 +365,14 @@ BEGIN
|
||||
VALUE "CompanyName", "Insight Distribution Systems\0"
|
||||
#endif
|
||||
VALUE "FileDescription", "PostgreSQL Driver\0"
|
||||
VALUE "FileVersion", " 07.01.0004\0"
|
||||
VALUE "FileVersion", " 07.01.0005\0"
|
||||
VALUE "InternalName", "psqlodbc\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 "OriginalFilename", "psqlodbc.dll\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "Microsoft Open Database Connectivity\0"
|
||||
VALUE "ProductVersion", " 07.01.0004\0"
|
||||
VALUE "ProductVersion", " 07.01.0005\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
|
@ -330,7 +330,7 @@ QR_close(QResultClass *self)
|
||||
QR_Destructor(res);
|
||||
|
||||
/* 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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user