{"action":"opened","issue":{"url":"https://api.github.com/repos/MySQLOnRocksDB/mysql-5.6/issues/66","labels_url":"https://api.github.com/repos/MySQLOnRocksDB/mysql-5.6/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/MySQLOnRocksDB/mysql-5.6/issues/66/comments","events_url":"https://api.github.com/repos/MySQLOnRocksDB/mysql-5.6/issues/66/events","html_url":"https://github.com/MySQLOnRocksDB/mysql-5.6/issues/66","id":77594615,"number":66,"title":"Unique secondary keys contain duplicate columns","user":{"login":"spetrunia","id":2734550,"avatar_url":"https://avatars.githubusercontent.com/u/2734550?v=3","gravatar_id":"","url":"https://api.github.com/users/spetrunia","html_url":"https://github.com/spetrunia","followers_url":"https://api.github.com/users/spetrunia/followers","following_url":"https://api.github.com/users/spetrunia/following{/other_user}","gists_url":"https://api.github.com/users/spetrunia/gists{/gist_id}","starred_url":"https://api.github.com/users/spetrunia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spetrunia/subscriptions","organizations_url":"https://api.github.com/users/spetrunia/orgs","repos_url":"https://api.github.com/users/spetrunia/repos","events_url":"https://api.github.com/users/spetrunia/events{/privacy}","received_events_url":"https://api.github.com/users/spetrunia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-18T10:11:28Z","updated_at":"2015-05-18T10:11:28Z","closed_at":null,"body":"Consider an example:\r\n\r\n```\r\ncreate table t4 \r\n(\r\n  pk1 int not null,\r\n  pk2 int not null,\r\n  col1 int not null,\r\n  col2 int,\r\n  primary key PK(pk1,pk2),\r\n  unique key U(pk1, col1)\r\n) engine=rocksdb;\r\n\r\ninsert into t4 values (1,1,1,1), (2,2,2,2),(3,3,3,3);\r\n```\r\n\r\n```\r\nselect * from t4 force index (U) where pk1 in (1,2,3);\r\n```\r\n\r\nPutting a breakpoint in ha_rocksdb::index_read_map, one can find that:\r\n\r\n```\r\n(gdb) p kd->name.c_str()\r\n  $35 = 0x7fffa006a188 \"U\"\r\n(gdb)  \r\n(gdb) p kd->get_m_key_parts()\r\n  $36 = 4\r\n(gdb) p table->key_info[active_index].actual_key_parts\r\n  $37 = 2\r\n```\r\n"}}