Bug #64117 MySQL workbench can't do select * from table if table has no primary index
Submitted: 23 Jan 2012 22:24 Modified: 24 Jan 2012 2:17
Reporter: Vitaliy - Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:MySQL Workbench CE 5.2.37 8576 OS:Linux (OpenSuSE 12.1 x86-64)
Assigned to: CPU Architecture:Any

[23 Jan 2012 22:24] Vitaliy -
Description:
select * from table; where "table" has no primary key displays no data. Logs show this:

3	15:21:52	create table testTable(    fieldId int(10) not null,    fieldName varchar(255) not null,    unique key (fieldId),    unique key (fieldName)  )	0 row(s) affected
3	15:22:01	insert into testTable values (1, 'foo'), (2, 'bar')	2 row(s) affected Records: 2  Duplicates: 0  Warnings: 0
0	15:22:04	select * from testTable LIMIT 0, 1000	Error: `DB`.`testTable`: table data is not editable because there is no primary key defined for the table

How to repeat:
create table testTable(
  fieldId int(10) not null,
  fieldName varchar(255) not null,
  unique key (fieldId),
  unique key (fieldName)
);
insert into testTable values (1, 'foo'), (2, 'bar');
select * from testTable;
[24 Jan 2012 2:17] Alfredo Kojima
duplicate of bug #63867