{"action":"closed","issue":{"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11909","repository_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin","labels_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11909/labels{/name}","comments_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11909/comments","events_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11909/events","html_url":"https://github.com/phpmyadmin/phpmyadmin/issues/11909","id":130542137,"number":11909,"title":"can't insert row into table that contains generated column","user":{"login":"msteiglitz","id":17016755,"avatar_url":"https://avatars.githubusercontent.com/u/17016755?v=3","gravatar_id":"","url":"https://api.github.com/users/msteiglitz","html_url":"https://github.com/msteiglitz","followers_url":"https://api.github.com/users/msteiglitz/followers","following_url":"https://api.github.com/users/msteiglitz/following{/other_user}","gists_url":"https://api.github.com/users/msteiglitz/gists{/gist_id}","starred_url":"https://api.github.com/users/msteiglitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msteiglitz/subscriptions","organizations_url":"https://api.github.com/users/msteiglitz/orgs","repos_url":"https://api.github.com/users/msteiglitz/repos","events_url":"https://api.github.com/users/msteiglitz/events{/privacy}","received_events_url":"https://api.github.com/users/msteiglitz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"madhuracj","id":1410004,"avatar_url":"https://avatars.githubusercontent.com/u/1410004?v=3","gravatar_id":"","url":"https://api.github.com/users/madhuracj","html_url":"https://github.com/madhuracj","followers_url":"https://api.github.com/users/madhuracj/followers","following_url":"https://api.github.com/users/madhuracj/following{/other_user}","gists_url":"https://api.github.com/users/madhuracj/gists{/gist_id}","starred_url":"https://api.github.com/users/madhuracj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhuracj/subscriptions","organizations_url":"https://api.github.com/users/madhuracj/orgs","repos_url":"https://api.github.com/users/madhuracj/repos","events_url":"https://api.github.com/users/madhuracj/events{/privacy}","received_events_url":"https://api.github.com/users/madhuracj/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-02-02T01:43:29Z","updated_at":"2016-02-11T10:13:41Z","closed_at":"2016-02-11T10:13:41Z","body":"phpMyAdmin 4.5.4.1, MySQL 5.7.10\r\n\r\nWhen I try to insert a row into a table that contains a generated column, I receive an error, for example (this is the SQL code generated by phpMyAdmin):\r\n\r\nError\r\nSQL query:\r\nINSERT INTO `test` (`id`, `id1`) VALUES ('', '1')\r\nMySQL said:\r\n#3105 - The value specified for generated column 'id' in table 'test' is not allowed.\r\n\r\nHere is a simple table that can be used to illustrate the problem:\r\n\r\nCREATE TABLE `test` (\r\n `id` int(11) GENERATED ALWAYS AS ((`id1` * 2)) STORED NOT NULL,\r\n `id1` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\r\n\r\nIt seems that the problem is that phpMyAdmin produces an INSERT statement that includes the generated columns, and that the fix would be to omit generated columns from the INSERT statement.\r\n"}}