Comment 5 for bug 1111611

Revision history for this message
pwaring (launchpad-pwaring) wrote :

I can confirm this bug occurs for me in 12.04 with the following mysql version:

mysql Ver 14.14 Distrib 5.5.29, for debian-linux-gnu (x86_64) using readline 6.2

I did a bit of Googling and found this bug, which might be related:

http://bugs.mysql.com/bug.php?id=65053

The final comment suggests there may be a problem with composite indexes - i.e. those consisting of more than one column. I took out both of the indexes and created the table again, using the following SQL:

CREATE TABLE `testtab` (
  `foo` int(11) NOT NULL AUTO_INCREMENT,
  `bar` char(3) NOT NULL,
  PRIMARY KEY (`foo`)
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=latin1;

Re-running the SELECT queries, I now get 111 returned. I tried creating the table again, this time just deleting the idx_listfieldmashup index (i.e. the composite one) and again got the results I expected.

I'm not sure why the composite index would cause this problem, but I hope it's a good pointer for where to look further.