{"action":"created","issue":{"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11727","labels_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11727/labels{/name}","comments_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11727/comments","events_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11727/events","html_url":"https://github.com/phpmyadmin/phpmyadmin/issues/11727","id":120821594,"number":11727,"title":"SQL duplicate entry error trying to INSERT in designer_settings table","user":{"login":"jesucarr","id":28097,"avatar_url":"https://avatars.githubusercontent.com/u/28097?v=3","gravatar_id":"","url":"https://api.github.com/users/jesucarr","html_url":"https://github.com/jesucarr","followers_url":"https://api.github.com/users/jesucarr/followers","following_url":"https://api.github.com/users/jesucarr/following{/other_user}","gists_url":"https://api.github.com/users/jesucarr/gists{/gist_id}","starred_url":"https://api.github.com/users/jesucarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesucarr/subscriptions","organizations_url":"https://api.github.com/users/jesucarr/orgs","repos_url":"https://api.github.com/users/jesucarr/repos","events_url":"https://api.github.com/users/jesucarr/events{/privacy}","received_events_url":"https://api.github.com/users/jesucarr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-07T17:05:29Z","updated_at":"2015-12-18T16:40:33Z","closed_at":null,"body":"I'm getting this error when going to the Designer page:\r\n\r\n`#1062 - Duplicate entry 'mypmacontroluser' for key 'PRIMARY'`\r\n\r\n<img width=\"421\" alt=\"screen_shot_2015-12-07_at_15_11_45\" src=\"https://cloud.githubusercontent.com/assets/28097/11633700/f881ca0c-9d0c-11e5-90a1-9901aa8fa8f9.png\">\r\n\r\n\r\nThe SQL that is trying to execute is:\r\n\r\n    INSERT INTO `phpmyadmin`.`pma__designer_settings` (username, settings_data) VALUES('mypmacontroluser', '{\"relation_lines\":\"true\"}');\r\n\r\n\r\nIn the table settings there is already one row with that username, and the setting {\"snap_to_grid\":\"off\"}\r\n\r\nAs the table has the username as primary key, I guess the query should try to UPDATE and add the new setting value, instead of trying to INSERT. \r\n\r\nWhen I try to add settings to the pma__userconfig table, it works as expected.\r\n\r\nI'm using version 4.5.2 and PHP 5.6.16"},"comment":{"url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/comments/165829747","html_url":"https://github.com/phpmyadmin/phpmyadmin/issues/11727#issuecomment-165829747","issue_url":"https://api.github.com/repos/phpmyadmin/phpmyadmin/issues/11727","id":165829747,"user":{"login":"lem9","id":195509,"avatar_url":"https://avatars.githubusercontent.com/u/195509?v=3","gravatar_id":"","url":"https://api.github.com/users/lem9","html_url":"https://github.com/lem9","followers_url":"https://api.github.com/users/lem9/followers","following_url":"https://api.github.com/users/lem9/following{/other_user}","gists_url":"https://api.github.com/users/lem9/gists{/gist_id}","starred_url":"https://api.github.com/users/lem9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lem9/subscriptions","organizations_url":"https://api.github.com/users/lem9/orgs","repos_url":"https://api.github.com/users/lem9/repos","events_url":"https://api.github.com/users/lem9/events{/privacy}","received_events_url":"https://api.github.com/users/lem9/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T16:40:33Z","updated_at":"2015-12-18T16:40:33Z","body":"@jesucarr The fact that $GLOBALS['dbi'] is empty is a Bad Thing. When I trigger this code by clicking on \"Toggle relation lines\" in the Designer, $GLOBALS['dbi'] is not empty at this point. Please tell us if the error message appears when you click on the Designer menu tab or when you try some action in the Designer (which one?)"}}