{"action":"created","issue":{"url":"https://api.github.com/repos/sequelpro/sequelpro/issues/2113","labels_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/2113/labels{/name}","comments_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/2113/comments","events_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/2113/events","html_url":"https://github.com/sequelpro/sequelpro/issues/2113","id":76363935,"number":2113,"title":"invalid updates in query results","user":{"login":"jdwuzhere","id":394487,"avatar_url":"https://avatars.githubusercontent.com/u/394487?v=3","gravatar_id":"","url":"https://api.github.com/users/jdwuzhere","html_url":"https://github.com/jdwuzhere","followers_url":"https://api.github.com/users/jdwuzhere/followers","following_url":"https://api.github.com/users/jdwuzhere/following{/other_user}","gists_url":"https://api.github.com/users/jdwuzhere/gists{/gist_id}","starred_url":"https://api.github.com/users/jdwuzhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdwuzhere/subscriptions","organizations_url":"https://api.github.com/users/jdwuzhere/orgs","repos_url":"https://api.github.com/users/jdwuzhere/repos","events_url":"https://api.github.com/users/jdwuzhere/events{/privacy}","received_events_url":"https://api.github.com/users/jdwuzhere/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-14T13:43:07Z","updated_at":"2015-05-14T14:19:22Z","closed_at":null,"body":"This was _horrible_. Ran in nightly 4454.\r\n\r\n```sql\r\nCREATE TABLE `tttz` (\r\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\r\n  `user` char(10) NOT NULL DEFAULT '',\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM\r\n\r\nINSERT INTO `tttz` (`id`, `user`) VALUES (NULL, 'aaaa');\r\nINSERT INTO `tttz` (`id`, `user`) VALUES (NULL, 'cccc');\r\nINSERT INTO `tttz` (`id`, `user`) VALUES (NULL, 'bbbb');\r\nINSERT INTO `tttz` (`id`, `user`) VALUES (NULL, 'bbbb');\r\nINSERT INTO `tttz` (`id`, `user`) VALUES (NULL, 'aaaa');\r\n```\r\nNow let's go to the query tab and run the following \r\n\r\nselect * from tttz order by id\r\n\r\n1\taaaa\r\n2\tcccc\r\n3\tbbbb\r\n4\tbbbb\r\n5\taaaa\r\n\r\nOK, result is obvious. Now select second row (id=2) in results part and double click (to edit) “cccc”. Somewhere in another MySQL connection issue\r\n\r\ndelete from tttz where id='2'\r\n\r\nCAREFULLY (not to lose editing focus from “cccc”) return to the Sequel Pro query window and hit Cmd-R to execute the same “select * from tttz order by id”.\r\n\r\nThe result of refreshed query window will be\r\n\r\n1\taaaa\r\n3\tcccc <=====\r\n4\tbbbb\r\n5\taaaa\r\n\r\nNow id=2 is gone as expected BUT WTF? id=3 now has user=‘cccc’! Behind the scenes the Sequel Pro issued\r\n\r\nselect * from tttz order by id; <==== our query\r\nSHOW COLUMNS FROM `test`.`tttz`;\r\nSELECT COUNT(1) FROM `test`.`tttz` WHERE (`id`='3');\r\nUPDATE `test`.`tttz` SET `test`.`tttz`.`user` = 'cccc' WHERE (`id`='3') LIMIT 1;\r\n\r\nWHY?!"},"comment":{"url":"https://api.github.com/repos/sequelpro/sequelpro/issues/comments/102049164","html_url":"https://github.com/sequelpro/sequelpro/issues/2113#issuecomment-102049164","issue_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/2113","id":102049164,"user":{"login":"dmoagx","id":5793864,"avatar_url":"https://avatars.githubusercontent.com/u/5793864?v=3","gravatar_id":"","url":"https://api.github.com/users/dmoagx","html_url":"https://github.com/dmoagx","followers_url":"https://api.github.com/users/dmoagx/followers","following_url":"https://api.github.com/users/dmoagx/following{/other_user}","gists_url":"https://api.github.com/users/dmoagx/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoagx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoagx/subscriptions","organizations_url":"https://api.github.com/users/dmoagx/orgs","repos_url":"https://api.github.com/users/dmoagx/repos","events_url":"https://api.github.com/users/dmoagx/events{/privacy}","received_events_url":"https://api.github.com/users/dmoagx/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T14:19:22Z","updated_at":"2015-05-14T14:19:22Z","body":"Issue reproducible in 1.0.2 and nightly 4454."}}