{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/7306","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/7306/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/7306/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/7306/events","html_url":"https://github.com/pingcap/tidb/pull/7306","id":348285571,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NjcwMzE1","number":7306,"title":"ddl:support drop index for the partitioned table.","user":{"login":"ciscoxll","id":20379978,"node_id":"MDQ6VXNlcjIwMzc5OTc4","avatar_url":"https://avatars0.githubusercontent.com/u/20379978?v=4","gravatar_id":"","url":"https://api.github.com/users/ciscoxll","html_url":"https://github.com/ciscoxll","followers_url":"https://api.github.com/users/ciscoxll/followers","following_url":"https://api.github.com/users/ciscoxll/following{/other_user}","gists_url":"https://api.github.com/users/ciscoxll/gists{/gist_id}","starred_url":"https://api.github.com/users/ciscoxll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciscoxll/subscriptions","organizations_url":"https://api.github.com/users/ciscoxll/orgs","repos_url":"https://api.github.com/users/ciscoxll/repos","events_url":"https://api.github.com/users/ciscoxll/events{/privacy}","received_events_url":"https://api.github.com/users/ciscoxll/received_events","type":"User","site_admin":false},"labels":[{"id":745133021,"node_id":"MDU6TGFiZWw3NDUxMzMwMjE=","url":"https://api.github.com/repos/pingcap/tidb/labels/component/DDL-need-LGT3","name":"component/DDL-need-LGT3","color":"00bff4","default":false},{"id":564574080,"node_id":"MDU6TGFiZWw1NjQ1NzQwODA=","url":"https://api.github.com/repos/pingcap/tidb/labels/status/LGT1","name":"status/LGT1","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-07T11:45:31Z","updated_at":"2018-08-13T03:49:14Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/7306","html_url":"https://github.com/pingcap/tidb/pull/7306","diff_url":"https://github.com/pingcap/tidb/pull/7306.diff","patch_url":"https://github.com/pingcap/tidb/pull/7306.patch"},"body":"## What have you changed? (mandatory)\r\nsupport drop index for the partitioned table\r\n* We first need to get all the partition IDs and then we need to delete the index in each partition.\r\n* Fix issue #7222 \r\n\r\nTake this as an example:\r\n```sql\r\nmysql> set @@tidb_enable_table_partition = 1;\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nmysql> create table tr(\r\n    ->         id int, name varchar(50),\r\n    ->         purchased date\r\n    ->     )\r\n    ->     partition by range( year(purchased) ) (\r\n    ->         partition p0 values less than (1990),\r\n    ->         partition p1 values less than (1995),\r\n    ->         partition p2 values less than (2000),\r\n    ->         partition p3 values less than (2005),\r\n    ->         partition p4 values less than (2010),\r\n    ->         partition p5 values less than (2015)\r\n    ->        );\r\nQuery OK, 0 rows affected (0.01 sec)\r\n\r\nmysql>  INSERT INTO tr VALUES\r\n    ->     (1, 'desk organiser', '2003-10-15'),\r\n    ->     (2, 'alarm clock', '1997-11-05'),\r\n    ->     (3, 'chair', '2009-03-10'),\r\n    ->     (4, 'bookcase', '1989-01-10'),\r\n    ->     (5, 'exercise bike', '2014-05-09'),\r\n    ->     (6, 'sofa', '1987-06-05'),\r\n    ->     (7, 'espresso maker', '2011-11-22'),\r\n    ->     (8, 'aquarium', '1992-08-04'),\r\n    ->     (9, 'study desk', '2006-09-16'),\r\n    ->     (10, 'lava lamp', '1998-12-25');\r\nQuery OK, 10 rows affected (0.10 sec)\r\n\r\nmysql> create index idx1 on tr (purchased);\r\nQuery OK, 0 rows affected (0.04 sec)\r\n\r\nmysql> select count(purchased) from tr use index(idx1);\r\n+------------------+\r\n| count(purchased) |\r\n+------------------+\r\n|               10 |\r\n+------------------+\r\n1 row in set (0.00 sec)\r\n\r\nmysql> drop index idx1 on tr;\r\nQuery OK, 0 rows affected (0.03 sec)\r\n\r\nmysql> select count(purchased) from tr use index(idx1);\r\nERROR 1176 (42000): Key 'idx1' doesn't exist in table 'tr'\r\n```\r\n\r\n## What is the type of the changes? (mandatory)\r\n\r\nNew feature\r\n- New feature (non-breaking change which adds functionality)\r\n- Improvement (non-breaking change which is an improvement to an existing feature)\r\n- Bug fix (non-breaking change which fixes an issue)\r\n- Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n\r\n## How has this PR been tested? (mandatory)\r\n No\r\n\r\n## Does this PR affect documentation (docs/docs-cn) update? (mandatory)\r\n\r\nNo\r\n\r\n## Does this PR affect tidb-ansible update? (mandatory)\r\n\r\nNo\r\n\r\n## Does this PR need to be added to the release notes? (mandatory)\r\nNo\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/412401872","html_url":"https://github.com/pingcap/tidb/pull/7306#issuecomment-412401872","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/7306","id":412401872,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjQwMTg3Mg==","user":{"login":"ciscoxll","id":20379978,"node_id":"MDQ6VXNlcjIwMzc5OTc4","avatar_url":"https://avatars0.githubusercontent.com/u/20379978?v=4","gravatar_id":"","url":"https://api.github.com/users/ciscoxll","html_url":"https://github.com/ciscoxll","followers_url":"https://api.github.com/users/ciscoxll/followers","following_url":"https://api.github.com/users/ciscoxll/following{/other_user}","gists_url":"https://api.github.com/users/ciscoxll/gists{/gist_id}","starred_url":"https://api.github.com/users/ciscoxll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciscoxll/subscriptions","organizations_url":"https://api.github.com/users/ciscoxll/orgs","repos_url":"https://api.github.com/users/ciscoxll/repos","events_url":"https://api.github.com/users/ciscoxll/events{/privacy}","received_events_url":"https://api.github.com/users/ciscoxll/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T03:49:14Z","updated_at":"2018-08-13T03:49:14Z","author_association":"MEMBER","body":"@winkyao @zimulala PTAL."}}
{"actor":{"display_login":"ciscoxll"}}