MySQL Forums
Forum List  »  Connector/ODBC

Access violation with BLOB columns
Posted by: Paul Crowley
Date: June 15, 2017 10:05AM

I have an application which uses MFC ADO ODBC and can utilize either MS SQL Server or MySQL as the database engine. It works fine with MS SQL Server.

What is happening with MySQL is an access violation in the processing for SQLSetPos when updating a table row. Specifically, I can see with the 5.3.8 ODBC Connector driver that my_realloc is being called with a buffer address of 1. This results in an attempt to access location 0xffffffe9.

Something different happens with the ODBC Connector 5.2.6, but it still results in an access violation. I am going to try going back further in archived versions of the ODBC Connector, but I am not entirely hopeful here.

The table in question has two columns defined as mediumblob and one of them is clearly the culprit here. The new allocation length being supplied to my_realloc is the length of the data in the first mediumblob as a result of the update.

I have tried bypassing this specific update and the result is simply that a later update fails for the same table. I suspect there is something questionable that I am doing in the application, but the fact that it works fine with SQL Server indicates to me that whatever is causing this problem isn't all that strange.

There is a lot of code involved with this in the application. I am probably going to try to reduce this down to a simple case to reproduce the failure that can be posted.

Options: ReplyQuote

Written By
Access violation with BLOB columns
June 15, 2017 10:05AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.