Bug #99549 Results grid for view appears read only even when primary key is included
Submitted: 13 May 2020 11:14 Modified: 13 May 2020 11:33
Reporter: Rupert Roker Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.20 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[13 May 2020 11:14] Rupert Roker
Description:
Using MySQL Workbench to connect to an Aurora RDS the results grid appears read only when selecting data from views. The read only indicator has a mouse over message indicating "the table has no unique row identifier (Primary Key or Nut Null unique index). The view from which data is being selected includes the primary key of the underlying table. Insert and update statements can be run directly and Heidi SQL can edit the results grid on this view. (I.e. this is not a problem caused by the view). 

How to repeat:
Create table: 
CREATE TABLE `tbl_test` (
  `pk_test` int(11) NOT NULL,
  `some_column` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`pk_test`),
  UNIQUE KEY `pk_test_UNIQUE` (`pk_test`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Create view (noting fields modified for privacy: 
CREATE ALGORITHM=UNDEFINED DEFINER=`*******YOUR USERNAME******`@`%` SQL SECURITY DEFINER VIEW `charity_lawfirm`.`wobble` AS select `***YOUR SCHEMA***`.`tbl_test`.`pk_test` AS `pk_test`,`***YOUR SCHEMA***`.`tbl_test`.`some_column` AS `some_column` from `***YOUR SCHEMA***`.`tbl_test`;

select rows from view
SELECT * FROM charity_lawfirm.wobble;

See "read only" in the results grid. 

But the view can be written to for example with 

insert into wobble values (5, 11);

Suggested fix:
The read only error status is appearing in error, I'd suggest modifying the code which triggers the locking of the results grid.
[13 May 2020 11:21] MySQL Verification Team
Hello Rupert Roker,

Thank you for the report.
Imho this is duplicate of Bug #99026, please see Bug #99026

regards,
Umesh
[13 May 2020 11:33] Rupert Roker
Yep, thanks, clearly a duplicate, my bad for not finding that one when searching before submitting. (And thanks for flagging this so quickly). 

Is there a fix planned of a work around for this?