Bug #50198 Server adding duplicate row with duplicate WHERE clause condition and Innodb
| Submitted: | 8 Jan 2010 22:55 | Modified: | 17 Feb 2010 8:12 |
|---|---|---|---|
| Reporter: | Patrick Crews | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 5.1 | OS: | Any |
| Assigned to: | Sergei Glukhov | CPU Architecture: | Any |
| Tags: | duplicate row, innodb, regression | ||
[8 Jan 2010 22:55]
Patrick Crews
[17 Feb 2010 8:12]
Sergei Glukhov
can't repeat with latest 5.1-bugteam tree: -- +/*!50400 SET SESSION engine_condition_pushdown = ON */; +DROP TABLE /*! IF EXISTS */ F; +CREATE TABLE `F` ( +`col_int_key` int(11) DEFAULT NULL, +`pk` int(11) NOT NULL AUTO_INCREMENT, +`col_varchar_1024_latin1_key` varchar(1024) DEFAULT NULL, +PRIMARY KEY (`pk`), +KEY `col_int_key` (`col_int_key`), +KEY `col_varchar_1024_latin1_key` (`col_varchar_1024_latin1_key`(767)) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; +INSERT INTO `F` VALUES (NULL,1,'f'); +INSERT INTO `F` VALUES (8,2,'q'); +INSERT INTO `F` VALUES (8,3,'z'); +INSERT INTO `F` VALUES (6,4,'q'); +INSERT INTO `F` VALUES (8,5,'m'); +INSERT INTO `F` VALUES (NULL,6,NULL); +INSERT INTO `F` VALUES (1,7,NULL); +INSERT INTO `F` VALUES (3,8,'p'); +INSERT INTO `F` VALUES (8,9,'u'); +INSERT INTO `F` VALUES (NULL,10,'n'); +SELECT `col_varchar_1024_latin1_key` +FROM F +WHERE `pk` > 3 OR `pk` IN ( 5 , 3 ) ; +col_varchar_1024_latin1_key +z +q +m +NULL +NULL +p +u +n +SELECT `col_varchar_1024_latin1_key` +FROM F +WHERE `pk` > 3 OR `pk` IN ( 5 , 3 ) OR `pk` > 3 ; +col_varchar_1024_latin1_key +z +q +m +NULL +NULL +p +u +n +show create table F; +Table Create Table +F CREATE TABLE `F` ( + `col_int_key` int(11) DEFAULT NULL, + `pk` int(11) NOT NULL AUTO_INCREMENT, + `col_varchar_1024_latin1_key` varchar(1024) DEFAULT NULL, + PRIMARY KEY (`pk`), + KEY `col_int_key` (`col_int_key`), + KEY `col_varchar_1024_latin1_key` (`col_varchar_1024_latin1_key`(767)) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1 --
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 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.