Bug #46544 "unique row not found" EXPLAIN output not documented
Submitted: 4 Aug 2009 13:49 Modified: 22 Mar 2010 15:46
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.4 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[4 Aug 2009 13:49] Philip Stoev
Description:
EXPLAIN can show the following in the "extra" column

unique row not found

but this is not documented in the manual

How to repeat:
CREATE TABLE `BB` (
  `pk` int(11) NOT NULL AUTO_INCREMENT,
  `int_key` int(11) DEFAULT NULL,
  PRIMARY KEY (`pk`),
  KEY `int_key` (`int_key`),
  KEY `varchar_key` (`int_key`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1;
INSERT INTO `BB` VALUES (5,NULL),(6,NULL),(22,NULL),(23,NULL),(24,NULL),(27,NULL),(28,NULL),(25,0),(11,9);

CREATE TABLE `DD` (
  `pk` int(11) NOT NULL AUTO_INCREMENT,
  `int_key` int(11) DEFAULT NULL,
  PRIMARY KEY (`pk`),
  KEY `int_key` (`int_key`),
  KEY `varchar_key` (`int_key`)
) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=latin1;
INSERT INTO `DD` VALUES (18,NULL),(30,NULL),(34,NULL),(46,NULL),(55,NULL),(58,NULL),(59,NULL),(63,NULL),(73,NULL),(76,NULL),(89,NULL),(90,NULL),(97,NULL),(105,NULL),(110,NULL),(111,NULL),(112,NULL),(114,NULL),(123,NULL),(124,NULL),(125,NULL),(126,NULL),(127,NULL),(130,NULL),(131,NULL),(133,NULL),(134,NULL),(135,NULL),(136,NULL),(80,1),(26,2),(50,2),(43,3),(83,3),(92,3),(95,3),(96,3),(44,4),(51,4),(54,4),(57,4),(67,4),(68,4),(94,4),(99,4),(109,4),(27,5),(35,5),(38,5),(41,5),(42,5),(49,5),(56,5),(64,5),(66,5),(82,5),(86,5),(88,5),(108,5),(47,6),(52,6),(98,6),(107,6),(20,7),(24,7),(32,7),(39,7),(40,7),(61,7),(69,7),(81,7),(84,7),(87,7),(137,7),(70,8),(77,8),(91,8),(101,8),(103,8),(23,9),(25,9),(28,9),(29,9),(31,9),(33,9),(36,9),(37,9),(48,9),(62,9),(72,9),(74,9),(75,9),(93,9),(106,9),(19,42),(100,58),(104,78),(102,80),(45,135),(53,169),(65,198);

EXPLAIN SELECT X . `int_key`
FROM `DD` AS X LEFT JOIN `BB` AS Y USING ( `pk` )
WHERE X . `pk` = 125
LIMIT 8 ;
[22 Mar 2010 15:46] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Updated http://dev.mysql.com/doc/refman/5.1/en/using-explain.html