{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/1051","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/1051/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/1051/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/1051/events","html_url":"https://github.com/pingcap/tidb/issues/1051","id":145881901,"number":1051,"title":"Support \" DISABLE KEYS\" in alter table statement","user":{"login":"shenli","id":1192573,"avatar_url":"https://avatars.githubusercontent.com/u/1192573?v=3","gravatar_id":"","url":"https://api.github.com/users/shenli","html_url":"https://github.com/shenli","followers_url":"https://api.github.com/users/shenli/followers","following_url":"https://api.github.com/users/shenli/following{/other_user}","gists_url":"https://api.github.com/users/shenli/gists{/gist_id}","starred_url":"https://api.github.com/users/shenli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shenli/subscriptions","organizations_url":"https://api.github.com/users/shenli/orgs","repos_url":"https://api.github.com/users/shenli/repos","events_url":"https://api.github.com/users/shenli/events{/privacy}","received_events_url":"https://api.github.com/users/shenli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pingcap/tidb/labels/todo","name":"todo","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-05T04:15:31Z","updated_at":"2016-04-05T05:07:57Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\n1.5.3\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\nLinux\r\n\r\n3. What did you do?\r\nRun SQL: /*!40000 ALTER TABLE `app_versions` DISABLE KEYS */\r\n\r\n\r\n\r\n4. What did you expect to see?\r\nRun sucess\r\n\r\n5. What did you see instead?\r\nerror: line 1 column 28 near \"DISABLE\"^[[0m\r\n2016/04/05 12:13:08 conn.go:241: ^[[0;31m[error] dispatch error line 1 column 28 near \"DISABLE\"\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/205645378","html_url":"https://github.com/pingcap/tidb/issues/1051#issuecomment-205645378","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/1051","id":205645378,"user":{"login":"shenli","id":1192573,"avatar_url":"https://avatars.githubusercontent.com/u/1192573?v=3","gravatar_id":"","url":"https://api.github.com/users/shenli","html_url":"https://github.com/shenli","followers_url":"https://api.github.com/users/shenli/followers","following_url":"https://api.github.com/users/shenli/following{/other_user}","gists_url":"https://api.github.com/users/shenli/gists{/gist_id}","starred_url":"https://api.github.com/users/shenli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shenli/subscriptions","organizations_url":"https://api.github.com/users/shenli/orgs","repos_url":"https://api.github.com/users/shenli/repos","events_url":"https://api.github.com/users/shenli/events{/privacy}","received_events_url":"https://api.github.com/users/shenli/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T05:07:57Z","updated_at":"2016-04-05T05:07:57Z","body":"See: http://dev.mysql.com/doc/refman/5.7/en/alter-table.html\r\nFor MyISAM tables, key updating can be controlled explicitly. Use ALTER TABLE ... DISABLE KEYS to tell MySQL to stop updating nonunique indexes. Then use ALTER TABLE ... ENABLE KEYS to re-create missing indexes. MyISAM does this with a special algorithm that is much faster than inserting keys one by one, so disabling keys before performing bulk insert operations should give a considerable speedup. Using ALTER TABLE ... DISABLE KEYS requires the INDEX privilege in addition to the privileges mentioned earlier."}}