{"action":"opened","issue":{"url":"https://api.github.com/repos/Grinnz/Mojo-SQLite/issues/2","labels_url":"https://api.github.com/repos/Grinnz/Mojo-SQLite/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Grinnz/Mojo-SQLite/issues/2/comments","events_url":"https://api.github.com/repos/Grinnz/Mojo-SQLite/issues/2/events","html_url":"https://github.com/Grinnz/Mojo-SQLite/issues/2","id":99573932,"number":2,"title":"Results destructor may call finish on a statement handle being used in another query","user":{"login":"Grinnz","id":5769356,"avatar_url":"https://avatars.githubusercontent.com/u/5769356?v=3","gravatar_id":"","url":"https://api.github.com/users/Grinnz","html_url":"https://github.com/Grinnz","followers_url":"https://api.github.com/users/Grinnz/followers","following_url":"https://api.github.com/users/Grinnz/following{/other_user}","gists_url":"https://api.github.com/users/Grinnz/gists{/gist_id}","starred_url":"https://api.github.com/users/Grinnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Grinnz/subscriptions","organizations_url":"https://api.github.com/users/Grinnz/orgs","repos_url":"https://api.github.com/users/Grinnz/repos","events_url":"https://api.github.com/users/Grinnz/events{/privacy}","received_events_url":"https://api.github.com/users/Grinnz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-07T03:58:32Z","updated_at":"2015-08-07T03:58:32Z","closed_at":null,"body":"Statement handles are cached... so the same statement handle may be retrieved for another query, but the destructor for the Results object calls finish on the handle.\r\n\r\n```\r\nmy $results = $db->query('select * from foo');\r\n$results = $db->query('select * from foo');\r\n# The assignment causes the first Results object destructor be called, calling finish on the statement handle which is still in use for the second Results object!\r\n```"}}