Bug #56804 Errors would not be reported in bulk upload
Submitted: 15 Sep 2010 19:14 Modified: 28 Sep 2010 14:26
Reporter: John Water Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.1.7 OS:Windows (Win XP)
Assigned to: Lawrenty Novitsky CPU Architecture:Any

[15 Sep 2010 19:14] John Water
Description:
In bulk upload mode, SQLExecute would return SQL_SUCCESS, even when the upload data contains errors, such as primary duplication, foreign key violation, etc. 

A repro is attached.  If you run the repro against a database from all the other vendors, such as Oracle, Microsoft SQL Server, Sybase ASE, DB2, Sybase SQL Anywhere, SQLExecute will return SQL_ERROR or SQL_SUCCESS_WITH_INFO.

How to repeat:
Here are the steps to run the repro:
1) Detach the zip file and unzip it;
The zip file contains two files, odbcbug.exe (executable for running on Windows x86) and odbcbug.c (the source code used to build odbcbug.exe).
2) Issue the following command line:
  odbcbug "dsn=...;uid=...;pwd=..."
you'll see SQLExecute returns 0
[16 Sep 2010 15:18] Lawrenty Novitsky
"If an error occurred, the driver sets the corresponding value in the parameter status array to SQL_PARAM_ERROR and returns SQL_SUCCESS_WITH_INFO." And looks like we don't do that
[19 Sep 2010 19:01] Lawrenty Novitsky
Pushed to the trunk as rev#930
[19 Sep 2010 19:02] Lawrenty Novitsky
the patch

Attachment: bug56804.patch (application/octet-stream, text), 7.25 KiB.

[20 Sep 2010 13:14] Lawrenty Novitsky
if things go well, it will be released in the next(5.1.8?) release
[28 Sep 2010 14:26] Tony Bedford
An entry has been added to the 5.1.8 changelog:

In bulk upload mode, SQLExecute would return SQL_SUCCESS, even when the uploaded data contained errors, such as primary key duplication, and foreign key violation.