{"action":"created","issue":{"url":"https://api.github.com/repos/twitter/finagle/issues/618","repository_url":"https://api.github.com/repos/twitter/finagle","labels_url":"https://api.github.com/repos/twitter/finagle/issues/618/labels{/name}","comments_url":"https://api.github.com/repos/twitter/finagle/issues/618/comments","events_url":"https://api.github.com/repos/twitter/finagle/issues/618/events","html_url":"https://github.com/twitter/finagle/pull/618","id":228103711,"number":618,"title":"Support unsigned integer","user":{"login":"mehmetgunturkun","id":3748385,"avatar_url":"https://avatars1.githubusercontent.com/u/3748385?v=3","gravatar_id":"","url":"https://api.github.com/users/mehmetgunturkun","html_url":"https://github.com/mehmetgunturkun","followers_url":"https://api.github.com/users/mehmetgunturkun/followers","following_url":"https://api.github.com/users/mehmetgunturkun/following{/other_user}","gists_url":"https://api.github.com/users/mehmetgunturkun/gists{/gist_id}","starred_url":"https://api.github.com/users/mehmetgunturkun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehmetgunturkun/subscriptions","organizations_url":"https://api.github.com/users/mehmetgunturkun/orgs","repos_url":"https://api.github.com/users/mehmetgunturkun/repos","events_url":"https://api.github.com/users/mehmetgunturkun/events{/privacy}","received_events_url":"https://api.github.com/users/mehmetgunturkun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-05-11T19:58:27Z","updated_at":"2017-06-01T15:24:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/twitter/finagle/pulls/618","html_url":"https://github.com/twitter/finagle/pull/618","diff_url":"https://github.com/twitter/finagle/pull/618.diff","patch_url":"https://github.com/twitter/finagle/pull/618.patch"},"body":"Problem\r\n\r\nfinagle-mysql does not support unsigned integers. If an integer field is with unsigned attribute, it has larger maximum limit (4294967295) than signed integer. Since there is no support for unsigned integer in Java, if the value is higher than Integer.MAX_VALUE (2147483647), it is interpreted as IntValue(-1)\r\n\r\nSolution\r\n\r\nIn order to understand the field is unsigned or not, I added bit masks for type attributes and a function to **Field** class. Bit masks for attributes are listed in the source code of mysql (https://github.com/mysql/mysql-server/blob/5.7/include/mysql_com.h). During field decoding, if the field is unsigned, I created a LongValue and used **readUnsignedIntLE** function from **MysqlBufReader**.\r\n\r\nAdditionally, added an integration test case into com.twitter.finagle.mysql.integration.TypeTest.NumericTypeTest. Added unsigned int field, inserted an integer value higher than Integer.MAX_VALUE, and expected to be parsed as LongValue.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/twitter/finagle/issues/comments/305528180","html_url":"https://github.com/twitter/finagle/pull/618#issuecomment-305528180","issue_url":"https://api.github.com/repos/twitter/finagle/issues/618","id":305528180,"user":{"login":"mehmetgunturkun","id":3748385,"avatar_url":"https://avatars1.githubusercontent.com/u/3748385?v=3","gravatar_id":"","url":"https://api.github.com/users/mehmetgunturkun","html_url":"https://github.com/mehmetgunturkun","followers_url":"https://api.github.com/users/mehmetgunturkun/followers","following_url":"https://api.github.com/users/mehmetgunturkun/following{/other_user}","gists_url":"https://api.github.com/users/mehmetgunturkun/gists{/gist_id}","starred_url":"https://api.github.com/users/mehmetgunturkun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehmetgunturkun/subscriptions","organizations_url":"https://api.github.com/users/mehmetgunturkun/orgs","repos_url":"https://api.github.com/users/mehmetgunturkun/repos","events_url":"https://api.github.com/users/mehmetgunturkun/events{/privacy}","received_events_url":"https://api.github.com/users/mehmetgunturkun/received_events","type":"User","site_admin":false},"created_at":"2017-06-01T15:24:17Z","updated_at":"2017-06-01T15:24:17Z","body":"@mosesn I guess I broke something. I just merged develop -> Support_Unsigned_Integer and removed these unnecessary functions, but coverage is decreased. I did sth. wrong?"}}
{"actor":{"display_login":"mehmetgunturkun"}}