{"action":"created","issue":{"url":"https://api.github.com/repos/Cleroth/sp_server/issues/16","repository_url":"https://api.github.com/repos/Cleroth/sp_server","labels_url":"https://api.github.com/repos/Cleroth/sp_server/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Cleroth/sp_server/issues/16/comments","events_url":"https://api.github.com/repos/Cleroth/sp_server/issues/16/events","html_url":"https://github.com/Cleroth/sp_server/issues/16","id":135927194,"number":16,"title":"Issue about mysql,  packet handler memory,  room list","user":{"login":"jl9404","id":1576809,"avatar_url":"https://avatars.githubusercontent.com/u/1576809?v=3","gravatar_id":"","url":"https://api.github.com/users/jl9404","html_url":"https://github.com/jl9404","followers_url":"https://api.github.com/users/jl9404/followers","following_url":"https://api.github.com/users/jl9404/following{/other_user}","gists_url":"https://api.github.com/users/jl9404/gists{/gist_id}","starred_url":"https://api.github.com/users/jl9404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jl9404/subscriptions","organizations_url":"https://api.github.com/users/jl9404/orgs","repos_url":"https://api.github.com/users/jl9404/repos","events_url":"https://api.github.com/users/jl9404/events{/privacy}","received_events_url":"https://api.github.com/users/jl9404/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-02-24T02:03:21Z","updated_at":"2016-02-24T16:22:57Z","closed_at":null,"body":"First of all,  the mysql_use_result function will return null or even return 'cannot access memory' and it will lead the server crash.  I have tried to increase the mysql server buffer and memory,  and change the table engine to Myisam,  it still return null or error,  it will be horrible.\r\n\r\nFor the memory issue,  sometimes the packethandler memory cannot be read,  so it will crash the server.  I am thinking about will it related to the handling disconnect from user?\r\n\r\nThe room capacity is fixed to 22, and the server may crash if u change to any other number,  it seems the packet format is not that precise? "},"comment":{"url":"https://api.github.com/repos/Cleroth/sp_server/issues/comments/188333337","html_url":"https://github.com/Cleroth/sp_server/issues/16#issuecomment-188333337","issue_url":"https://api.github.com/repos/Cleroth/sp_server/issues/16","id":188333337,"user":{"login":"whitearies","id":10374056,"avatar_url":"https://avatars.githubusercontent.com/u/10374056?v=3","gravatar_id":"","url":"https://api.github.com/users/whitearies","html_url":"https://github.com/whitearies","followers_url":"https://api.github.com/users/whitearies/followers","following_url":"https://api.github.com/users/whitearies/following{/other_user}","gists_url":"https://api.github.com/users/whitearies/gists{/gist_id}","starred_url":"https://api.github.com/users/whitearies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitearies/subscriptions","organizations_url":"https://api.github.com/users/whitearies/orgs","repos_url":"https://api.github.com/users/whitearies/repos","events_url":"https://api.github.com/users/whitearies/events{/privacy}","received_events_url":"https://api.github.com/users/whitearies/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T16:22:57Z","updated_at":"2016-02-24T16:22:57Z","body":"I use this to avoid mysql_query  error because of data = NULL.\r\n    mysql_query(connection, buffer);\r\n    MYSQL_RES *res = mysql_use_result(connection);\r\n    if (res == NULL || !res->row_count)\r\n    {\r\n        cout << \"NO DATA\" << endl;\r\n        return;\r\n    }\r\n    MYSQL_ROW result = mysql_fetch_row(res);"}}