| Bug #85300 | Result Grid is "Read Only" if SELECT contains a generated column | ||
|---|---|---|---|
| Submitted: | 3 Mar 2017 22:19 | Modified: | 23 May 2018 10:26 |
| Reporter: | Brad Kent | Email Updates: | |
| Status: | Won't fix | Impact on me: | |
| Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
| Version: | 6.3.9 | OS: | MacOS |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | editor, readonly | ||
[3 Mar 2017 22:21]
Brad Kent
and... of course I have a typo in the CREATE TABLE statement: PRIMARY KEY (`editor_test_id`) SHOULD BE PRIMARY KEY (`test_id`)
[6 Mar 2017 9:37]
MySQL Verification Team
Hello Brad Kent, Thank you for the report and test case. Verified as described. Thanks, Umesh
[23 May 2018 10:26]
Marcin Szalowicz
Posted by developer: This is by design. There are some conditions to make result set editable. No generated columns is one of them.

Description: Result grid is READ ONLY if ANY sort of generated column is included in the column list How to repeat: MySQL ver 5.7.10 This table is over-kill, but it's a test table I've got lying around CREATE TABLE `test` ( `test_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `int` int(11) DEFAULT NULL COMMENT 'I am a comment', `decimal` decimal(5,2) DEFAULT NULL, `float` float DEFAULT NULL, `real` double DEFAULT NULL, `double` double(5,2) DEFAULT NULL, `bit` bit(8) DEFAULT NULL, `date` date DEFAULT NULL, `datetime` datetime DEFAULT NULL, `timestamp` timestamp NULL DEFAULT NULL, `time` time DEFAULT NULL, `year` year(4) DEFAULT NULL, `char` char(45) DEFAULT NULL, `varchar` varchar(45) DEFAULT NULL, `binary` binary(8) DEFAULT NULL, `text` text, `blob` blob, `tinyblob` tinyblob, `json` json DEFAULT NULL, `enum` enum('a','b','c') DEFAULT NULL, `set` set('a','b','c') DEFAULT NULL, `geometry` geometry DEFAULT NULL, `point` point DEFAULT NULL, `linestring` linestring DEFAULT NULL, `polygon` polygon DEFAULT NULL, PRIMARY KEY (`editor_test_id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 SELECT * FROM `test`; # Result Grid IS editable SELECT `test_id`, `char` FROM `test`; # Result Grid IS editable SELECT `test_id`, `char`, 'foo' FROM `test` # result grid is READ ONLY SELECT *, 'foo' FROM `test`; # result grid is READ ONLY SELECT *, char_length(`char`) FROM `test`; # result grid is READ ONLY SELECT *, ST_Y(`point`) FROM `test`; # result grid is READ ONLY initially experienced on 6.3.6, upgraded to 6.3.9