{"action":"created","issue":{"url":"https://api.github.com/repos/zendframework/zf1/issues/509","labels_url":"https://api.github.com/repos/zendframework/zf1/issues/509/labels{/name}","comments_url":"https://api.github.com/repos/zendframework/zf1/issues/509/comments","events_url":"https://api.github.com/repos/zendframework/zf1/issues/509/events","html_url":"https://github.com/zendframework/zf1/pull/509","id":57177856,"number":509,"title":"Fix ZF-7570: forceIndex, useIndex methods on db select.","user":{"login":"dbaltas","id":442804,"avatar_url":"https://avatars.githubusercontent.com/u/442804?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaltas","html_url":"https://github.com/dbaltas","followers_url":"https://api.github.com/users/dbaltas/followers","following_url":"https://api.github.com/users/dbaltas/following{/other_user}","gists_url":"https://api.github.com/users/dbaltas/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaltas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaltas/subscriptions","organizations_url":"https://api.github.com/users/dbaltas/orgs","repos_url":"https://api.github.com/users/dbaltas/repos","events_url":"https://api.github.com/users/dbaltas/events{/privacy}","received_events_url":"https://api.github.com/users/dbaltas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zendframework/zf1/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/zendframework/zf1/labels/Zend_Db_Select","name":"Zend_Db_Select","color":"008000"}],"state":"open","locked":false,"assignee":{"login":"ezimuel","id":475967,"avatar_url":"https://avatars.githubusercontent.com/u/475967?v=3","gravatar_id":"","url":"https://api.github.com/users/ezimuel","html_url":"https://github.com/ezimuel","followers_url":"https://api.github.com/users/ezimuel/followers","following_url":"https://api.github.com/users/ezimuel/following{/other_user}","gists_url":"https://api.github.com/users/ezimuel/gists{/gist_id}","starred_url":"https://api.github.com/users/ezimuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezimuel/subscriptions","organizations_url":"https://api.github.com/users/ezimuel/orgs","repos_url":"https://api.github.com/users/ezimuel/repos","events_url":"https://api.github.com/users/ezimuel/events{/privacy}","received_events_url":"https://api.github.com/users/ezimuel/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-02-10T14:00:43Z","updated_at":"2015-04-21T19:05:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zendframework/zf1/pulls/509","html_url":"https://github.com/zendframework/zf1/pull/509","diff_url":"https://github.com/zendframework/zf1/pull/509.diff","patch_url":"https://github.com/zendframework/zf1/pull/509.patch"},"body":"This addresses issue [ZF-7570](http://framework.zend.com/issues/browse/ZF-7570) also mentioned at #489 and is using code originally provided by Richard John.\r\n\r\nAllows for a query like \r\n```sql\r\nSELECT * FROM table_name FORCE INDEX (index_name) WHERE where_statement;\r\n```\r\nKnown Issues:\r\n 1. Code has been implemented and tested for mysql only\r\n 1. Current Implementation works only for indexes on the table used in the FROM part. It can not be used for tables specified at the \"JOIN\" part\r\n 1. FORCE INDEX, USE INDEX have been implemented. IGNORE INDEX has not been implemented"},"comment":{"url":"https://api.github.com/repos/zendframework/zf1/issues/comments/94908400","html_url":"https://github.com/zendframework/zf1/pull/509#issuecomment-94908400","issue_url":"https://api.github.com/repos/zendframework/zf1/issues/509","id":94908400,"user":{"login":"ezequielp","id":2292185,"avatar_url":"https://avatars.githubusercontent.com/u/2292185?v=3","gravatar_id":"","url":"https://api.github.com/users/ezequielp","html_url":"https://github.com/ezequielp","followers_url":"https://api.github.com/users/ezequielp/followers","following_url":"https://api.github.com/users/ezequielp/following{/other_user}","gists_url":"https://api.github.com/users/ezequielp/gists{/gist_id}","starred_url":"https://api.github.com/users/ezequielp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezequielp/subscriptions","organizations_url":"https://api.github.com/users/ezequielp/orgs","repos_url":"https://api.github.com/users/ezequielp/repos","events_url":"https://api.github.com/users/ezequielp/events{/privacy}","received_events_url":"https://api.github.com/users/ezequielp/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T19:05:41Z","updated_at":"2015-04-21T19:05:41Z","body":"This doesn't seem to be quite correct. It will unset force index from $this->parts, making the query usable only once.\r\n\r\nIn particular,  $query->assemble() != $query->assemble() as the first call to assemble removes the FORCE_INDEX parts."}}