Bug #24876 Access becomes very slow when using a full medium text field with MyODBC 5
Submitted: 7 Dec 2006 8:17 Modified: 10 Jul 2007 7:46
Reporter: Eric MaLossi
Status: Closed
Category:Connector/ODBC Severity:S1 (Critical)
Version:5.00.09 OS:Microsoft Windows (win XP sp 2/Access 2003)
Assigned to: Jess Balint Target Version:

[7 Dec 2006 8:17] Eric MaLossi
Description:
The attached file is a mysqldump file of a small table like so:
Create Table: CREATE TABLE `testtable`
  `c1` int(11) NOT NULL auto_increment,
  `c2` mediumtext,
  PRIMARY KEY  (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.28 sec)

The table contains a single record with 16776960 bytes in the medium text field. Using the
MyODBC 3.51 drivers it is possible to link to the table in Access, and create and open a
form based on the table.  However if this is attempted using the 5.0 drivers Access will
stop responding.  If much smaller data is used in this field then it works fine, but at
some critical point memory starts leaking.

How to repeat:
1. Extrace the attached 7-zip file
2. Source the file into a mysql database
3. Link to the table (testtable) in Access
4. Create a form based on the linked table
5. Open the form
[7 Dec 2006 23:02] Eric MaLossi
This same thing is happening with the larger text data types.  After further
experimentation it appears that it's crashing because it's taking a long time to complete
the query and I interrupted Access before it completed.  However this test is taking
considerably longer to complete than it does under 3.51 where the table opens in about one
second.
[8 Dec 2006 0:35] Eric MaLossi
sql dump of test table

Attachment: testtable.7z (application/octet-stream, text), 15.14 KiB.

[8 Dec 2006 1:38] Jess Balint
Committed in rev 712.

Access is not crashing, it's simply doing waaayyyy too much work. I've fixed the way
partial-retrieval of strings is handled internally. It should complete in a "tolerable"
amount of time now.
[22 Dec 2006 0:15] Eric MaLossi
I've tested this patch and as Jess states, the behavior is certainly better than it was,
in that the operation will complete and Access doesn't stop responding.  However a report
which pointed to a medium/large text field that would open in roughly one second using the
3.51 driver is taking 15-20 seconds with 5.0 driver.
[16 Apr 2007 18:37] Jess Balint
Fixed significantly, and pending release in 5.00.12.