Bug #78465 ADO recordset methods AddNew and Delete work - however Update fails
Submitted: 17 Sep 2015 8:12 Modified: 23 Oct 2015 10:57
Reporter: Neill Williams Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Errors Severity:S5 (Performance)
Version:5.6.21-log OS:Windows (Windows7)
Assigned to: Assigned Account CPU Architecture:Any
Tags: ADO, MySQL, VS2008, windows7

[17 Sep 2015 8:12] Neill Williams
Description:
"[MySQL][ODBC 5.3(w) Driver][mysqld-5.6.21-log]Build WHERE -> insert_fields() failed."

Resolved by preceding SELECT query with setting DB context

How to repeat:
Identify a record for update with a SELECT ... WHERE PK='nnn' using fully qualified table names outside the target schema ie : update schema ABC from another DB context eg : DEF

Set ADO recordset field values

Call pRS->Update()

Suggested fix:
Precede the SELECT query with a "USE ABC;" clause.
[17 Sep 2015 8:18] Neill Williams
HRESULT returned by Update method in Error object was -2147352572
[18 Sep 2015 11:41] Chiranjeevi Battula
Hello Neill Williams,

Thank you for the bug report.
I tried to reproduce the issue at my end using Visual Studio 2013 (C#.Net) with  MySQL Connector / ODBC 5.3.4, but not seeing any issues in insert, update and delete.
Could you please list out exact steps you tried out at your end, this would help us to reproduce the issue at our end.

Thanks,
Chiranjeevi.
[18 Sep 2015 16:01] Neill Williams
Code which triggers the error

Attachment: ADOMySQL.cpp (text/plain), 4.09 KiB.

[18 Sep 2015 16:05] Neill Williams
Chiranjeevi,

Attached is the code which triggers the error. I know AddNew successfuly adds a new record. I have not actually tested Delete, however after exhaustive testing, I established it is actually the UpdateFields which causes the error. (It fails on the first PutValue call)

Regards,

Neill.
[23 Sep 2015 9:12] Chiranjeevi Battula
Hello Neill Williams,

Thank you for your feedback.
Could you please provide complete C++ test case working on a simple table(exact create table statements, insert, update, delete, and explain code, etc.) to confirm this issue at our end?

Thanks,
Chiranjeevi.
[23 Sep 2015 10:57] Chiranjeevi Battula
Yes Neill, We need exactly error reporting test case.
[24 Oct 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".