Bug #42335 ODBC/Connector
Submitted: 26 Jan 2009 1:57 Modified: 27 Feb 2009 22:24
Reporter: Bernd Wuebben Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.1 OS:Windows (Vista)
Assigned to: CPU Architecture:Any
Tags: 5.1, CBulkSet, CRecordset::useMultiRowFetch, ODBC

[26 Jan 2009 1:57] Bernd Wuebben
Description:
What used to work fine under 3.51 crashes under 5.1:

OpenDataBase(dsn);
CBulkSet recset(&database);
recset.SetRowsetSize(100);
recset.Open(CRecordset::snapshot, SqlString,CRecordset::readOnly | CRecordset::useMultiRowFetch);

The query could be anything, but here is a specific one

SqlString = "SELECT * FROM cpiyoy WHERE Date <= '2099-12-31' AND   Date >= '1901-01-01' ORDER BY Date ASC";

-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version	5.1.30-community

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

--
-- Create schema fll
--

CREATE DATABASE IF NOT EXISTS fll;
USE fll;

--
-- Definition of table `cpiyoy`
--

DROP TABLE IF EXISTS `cpiyoy`;
CREATE TABLE `cpiyoy` (
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `CPI` double DEFAULT NULL,
  PRIMARY KEY (`Date`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpiyoy`
--

/*!40000 ALTER TABLE `cpiyoy` DISABLE KEYS */;
INSERT INTO `cpiyoy` (`Date`,`CPI`) VALUES 
 ('1990-11-27',5.4),
 ('1990-11-28',5.4),
 ('1990-11-29',5.4),
 ('1990-11-30',5.3),
 ('1990-12-03',5.3),
 ('1990-12-04',5.3),
 ('1990-12-05',5.3),
 ('2004-08-25',1.8);
/*!40000 ALTER TABLE `cpiyoy` ENABLE KEYS */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

How to repeat:
Please read above message.

Suggested fix:
Have no suggestions.
[26 Jan 2009 8:05] Tonci Grgin
Hi Bernd and thanks for your report.

I do need some additional info from you:
  o Which version of c/ODBC 3.51 works?
  o Which version of c/ODBC 5.1 does not work?
  o What are the options used in "dsn"? Are they the same for both connectors?
Please attach both ODBC traces (as small as possible, ODBC generates lot's of trace).
[27 Feb 2009 0: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".
[27 Feb 2009 0:51] Bernd Wuebben
Hi, 

[26 Jan 9:05] Tonci Grgin

Hi Bernd and thanks for your report.

I do need some additional info from you:
  o Which version of c/ODBC 3.51 works?
  o Which version of c/ODBC 5.1 does not work?
  o What are the options used in "dsn"? Are they the same for both connectors?
Please attach both ODBC traces (as small as possible, ODBC generates lot's of trace).

Answers:
o Any version of 3.51 that I have ever downloaded including but not limited to 3.51.23 and whatever version of 3.51 was on your website on January 25th work.

o The version I downloaded on january 25th from the mysql.org website (or its mirrors).

o I have changed no options and set no flags. Everything is the default with the obious exception of machine name "localhost", data source name and database.
And yes, to the best of my knowledge they are thus the same. 

Lastly I do not know how to generate ODBC traces. But I dont' understand why you don't code a minimal project with the database and virtually complete code snipped I submitted. If you don't see the bug in the latest version then I will test the latest version your odbc driver and see whether its fixed for me as well. Thank you so much for your help.

Best,
Bernd
[27 Feb 2009 8:16] Tonci Grgin
Bernd.

There are a lot of gaps in your report I might try to fill in to the best of my knowledge but that is not what BugsDB is for nor am I required to write tests for each report. If I was to do so, nothing would ever get done. So I'll provide sanity check and debugging for you compact but complete test cases. Mind you, you are not paying for what I do, Sun is. So, generally speaking, reporters should do us a courtesy of filing as detailed as possible bug reports allowing us to resolve problems and move quickly onwards.

Now:
 - Lastly I do not know how to generate ODBC traces.

This is a primary step in ODBC troubleshooting, described both in manual and in BugsDB (numerous times). Here it is again. Go to Start/Settings/Control Panel/Administrative Tools/Data Sources (ODBC)/Tracing tab/Start tracing... Be sure to put trace file in some reachable place. There is also a matter of x64 vs. 32bit DataSources (ODBC) CP item. Be sure to read the manual or some of my posts in BugsDB if you have Win x64.

- But I dont' understand why you don't code a minimal project with the database and virtually complete code snipped I submitted.

See above. If I'm to code test case for each problem reported it would take ages and many many of other users would be left short-handed. This would just be unfair. Also, when I have complete test case that fails on your box I can do sanity check and/or be able to quickly provide you with workaround helping you to move on. The failing and working test cases differ, sometimes, in just one line or a connect option.
Finally, I might just do as you asked after I finish with all the reports with complete test cases and decide that there might be a problem worth looking into in your report. That takes time.

So please help me do my job of helping as much people as possible by providing me with everything you might think of in regards of repeating your problem.

Regards
[27 Feb 2009 8:24] Tonci Grgin
Although much info is missing Jess will take a look.
[27 Feb 2009 18:21] Bernd Wuebben
ODBC Trace

Attachment: SQL.zip (application/x-zip-compressed, text), 2.76 KiB.

[27 Feb 2009 18:25] Bernd Wuebben
Successful 3.51 trace

Attachment: SQL Sucessful.zip (application/x-zip-compressed, text), 11.65 KiB.

[27 Feb 2009 18:26] Bernd Wuebben
just posted a success ful run (3.51 connector) and unsucessful run (5.1 connector) SQL.zip and SQLunsucessful.zip
[27 Feb 2009 21:08] Jess Balint
what is this CBulkSet class?
[27 Feb 2009 21:16] Jess Balint
Duplicate of bug#41942
[27 Feb 2009 22:24] Bernd Wuebben
So I understand that since 41942 was marked as closed you fixed the issue and I should see a fix in a future update of the ODBC driver.
Thank you so much. You guys are doing great work!

Best,
Bernd
[28 Feb 2009 3:59] Jess Balint
Bernd,
Thanks for the bug report. The 5.1.6 release has been delayed, but we're working on getting it out as soon as possible.