Bug #6130 Multi column primary key on same column
Submitted: 16 Oct 2004 17:02 Modified: 18 Oct 2004 11:08
Reporter: Georg Richter Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:all OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[16 Oct 2004 17:02] Georg Richter
Description:
By an accident I typed  PRIMARY KEY (a,a) instead of (a,b) on a MyISAM table - there was no error 
so it took a while until I recognized the problem. 
I don't know if I should call this a bug, but to allow this is complete nonsens! :) 
(InnoDB complains about it, but not MyISAM) 

How to repeat:
5.0.2-alpha-debug-log 
[18:57] root@test> create table t1 (a int not null, b int not null, c varchar(30), primary key (a,a)); 
Query OK, 0 rows affected (0.10 sec) 
 
5.0.2-alpha-debug-log 
[18:58] root@test> alter table t1 engine=InnoDB; 
ERROR 1005 (HY000): Can't create table './test/#sql-20de_16.frm' (errno: 126) 
5.0.2-alpha-debug-log
[18 Oct 2004 11:08] Hartmut Holzgraefe
duplicate, information merged into bug #6126