Bug #11035 An incompatibility between MyODBC 3.51 and MySQL 5

Submitted: 2 Jun 2005 13:26 Modified: 12 Dec 2005 13:31
Reporter: Bogdan Degtyariov Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version: OS:Windows (Win XP Pro Sp1)
Assigned to: Bogdan Degtyariov CPU Architecture:Any

[2 Jun 2005 13:26] Bogdan Degtyariov
Description:
DECIMAL fields in temporary tables cause an error in MS ADODB cursors when use MyODBC 3.51 with MySQL Server 5.

How to repeat:
- Create a temporary table with DECIMAL field
- Insert some data in the table
- Try to get inserted data using ADODB.Recordset (using client cursors)

Following error message will be displayed:

Microsoft Cursor Engine (0x80040E21) Multiple-step operation generated errors
Check each status value.

Suggested fix:
MySQL 5 has new data type MYSQL_TYPE_NEWDECIMAL == 246 that is not taken into account in unireg_to_sql_datatype() function (utility.c: line 362). This problem can be avoided if associate NEWDECIMAL with DECIMAL:
(line 375)

  switch(field->type) {
  case 246: // we don't use a macro because don't have MySQL 5 includes
  case FIELD_TYPE_DECIMAL:
[9 Jun 2005 18:50] Bogdan Degtyariov
Added new data type MYSQL_TYPE_NEWDECIMAL. (Changeset@1.476)

This example works well with the  MySQL 5.0.4, but if the similar problems will appear it is strongly recommended to use MySQL 5.0.6.
[12 Dec 2005 13:31] Bogdan Degtyariov
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Additional info:

Release 3.51.12 of MySQL Connector/ODBC contains a fix for this bug

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.046 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.