Bug #4084 #1104 when selecting via IN from compound PK
Submitted: 9 Jun 2004 21:23 Modified: 9 Jun 2004 22:20
Reporter: [ name withheld ] Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:MySQL 4.0.16-standard-log OS:unknown
Assigned to: Dean Ellis CPU Architecture:Any

[9 Jun 2004 21:23] [ name withheld ]
Description:
I have a table with an compound Primary Key (id & fk). when select rows via id via IN() that are not existing in the table i get an #1104 error.

How to repeat:
CREATE TABLE `test` (
  `id` int(10) unsigned NOT NULL default '0',
  `fk` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`,`fk`)
) TYPE=MyISAM;

INSERT INTO `test` VALUES (1, 1);
INSERT INTO `test` VALUES (2, 1);
    
SELECT id FROM `test` WHERE id IN ( 3,4,5 ) 

::: #1104 - The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok
[9 Jun 2004 22:20] Dean Ellis
I cannot repeat this with a current release; please try on our current 4.0 binary and let us know if you are able to repeat this behavior.