Skip site navigation (1) Skip section navigation (2)

BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation

From: "Michael Wolff" <mwolff(at)cosa(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation
Date: 2006-03-17 08:36:23
Message-ID: 200603170836.k2H8aNeG000447@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2330
Logged by:          Michael Wolff
Email address:      mwolff(at)cosa(dot)de
PostgreSQL version: 8.1.2 & 8.1.3
Operating system:   Linux
Description:        ECPGlib: Wrong error code in case of a duplicate key
violation
Details: 

I figured out an error in the file src/interfaces/ecpg/ecpglib/error.c CVS
version 1.11 in line 189:

The if statement has been preceeded by an else.


original code:
if (strncmp(sqlca->sqlstate, "21000", sizeof(sqlca->sqlstate)) == 0)

fixed code:
else if (strncmp(sqlca->sqlstate, "21000", sizeof(sqlca->sqlstate)) == 0)


Regards,
Michael

Responses

pgsql-bugs by date

Next:From: Vinod BapureDate: 2006-03-17 11:12:30
Subject: BUG #2331: Segmentation fault in SQLExec
Previous:From: Vinod BapureDate: 2006-03-17 08:07:43
Subject: BUG #2329: Sigmentation fault in SQLExec

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group