Bug #28246 Severe failure using MySQL Connector/ODBC 3.51.14 with MS SQL linked server
Submitted: 4 May 2007 15:28 Modified: 23 May 2007 12:19
Reporter: Steve Klein Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51.14 OS:Windows (Server 2003)
Assigned to: CPU Architecture:Any
Tags: linked server intermittent failure

[4 May 2007 15:28] Steve Klein
Description:
We upgraded to this driver from 3.51.11 in order to support DECIMAL types when we upgraded to mySQL 5.x.  We are experiencing intermittent failures accessing through a linked server on MS SQL 2005:

The OLE DB provider "MSDASQL" for linked server "signalz" reported an error. The provider reported an unexpected catastrophic failure.

Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "signalz".

Corresponding message in Event Viewer:

A user request from the session with SPID 57 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.

This also occurs using MS SQL 2000, although the messages are slightly different.

I didn't see a bug report corresponding to this, but there is a forum entry:
http://forums.mysql.com/read.php?37,143432,151541

How to repeat:
1.  Install driver on Server 2003 m/c.

2.  Configure System DSN (default configuration).

3.  Define linked server (e.g. sp_addlinkedserver @server='signalz', @srvproduct='signalz', @provider='MSDASQL', @datasrc='signalz', @location=NULL, @provstr='Driver= {MySQL ODBC 3.51 Driver};DSN=signalz;DATABASE=lastmile_exchange;SERVER=www.signalz.com;UID=;PWD=;PORT=;OPTION=0;STMT=;', @catalog=NULL

4.  Create view which uses linked server to access 5.x DB (for example):

CREATE VIEW vw_countries AS
SELECT name, a2, a3, number, active
FROM OPENQUERY(signalz, 'SELECT  * FROM countries') AS derivedtbl_1

5.  Create a new table by selecting from the view:

SELECT * INTO countries FROM vw_countries

Since this is intermittent, it may not happen the first time or even with a particular view.  For whatever reason, it seemed to happen more often with certain views and generally not with other views (we do this copy procedure with ~ 60 views/tables).

Suggested fix:
Unfortunately, we needed to back out the driver and go back to 3.51.11.  To get around the mySQL 5.x / ODBC 3.51.11 issue with DECIMAL, we are now copying data from our production 5.x DB into a 4.x staging DB and using the 3.51.11 ODBC driver to access to staging DB.
[22 May 2007 16:12] Tonci Grgin
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Explanation: Hi Steve. Please check Bug#28221 and upgrade to MyODBC 3.51.15 as suggested.
[23 May 2007 12:19] Steve Klein
Thanks Tonci.  I agree this is a dupliate and should be closed (I did a search before opening, but did not see it).
[23 May 2007 12:35] Tonci Grgin
Steve, no problem, we all make mistakes.

Thanks for your interest in MySQL.