{"action":"created","issue":{"url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/issues/153","repository_url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux","labels_url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/issues/153/comments","events_url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/issues/153/events","html_url":"https://github.com/sociomantic-tsunami/libdrizzle-redux/pull/153","id":223569904,"number":153,"title":"Bugfix: skip NULL fields when reading from MySQL","user":{"login":"chenzhuoyu","id":8230799,"avatar_url":"https://avatars2.githubusercontent.com/u/8230799?v=3","gravatar_id":"","url":"https://api.github.com/users/chenzhuoyu","html_url":"https://github.com/chenzhuoyu","followers_url":"https://api.github.com/users/chenzhuoyu/followers","following_url":"https://api.github.com/users/chenzhuoyu/following{/other_user}","gists_url":"https://api.github.com/users/chenzhuoyu/gists{/gist_id}","starred_url":"https://api.github.com/users/chenzhuoyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenzhuoyu/subscriptions","organizations_url":"https://api.github.com/users/chenzhuoyu/orgs","repos_url":"https://api.github.com/users/chenzhuoyu/repos","events_url":"https://api.github.com/users/chenzhuoyu/events{/privacy}","received_events_url":"https://api.github.com/users/chenzhuoyu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/milestones/22","html_url":"https://github.com/sociomantic-tsunami/libdrizzle-redux/milestone/22","labels_url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/milestones/22/labels","id":2479934,"number":22,"title":"v5.5.3","description":"Bug fixes on the v5.x.x branch","creator":{"login":"andreas-bok-sociomantic","id":13032446,"avatar_url":"https://avatars0.githubusercontent.com/u/13032446?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-bok-sociomantic","html_url":"https://github.com/andreas-bok-sociomantic","followers_url":"https://api.github.com/users/andreas-bok-sociomantic/followers","following_url":"https://api.github.com/users/andreas-bok-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/andreas-bok-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-bok-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-bok-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/andreas-bok-sociomantic/orgs","repos_url":"https://api.github.com/users/andreas-bok-sociomantic/repos","events_url":"https://api.github.com/users/andreas-bok-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-bok-sociomantic/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":9,"state":"open","created_at":"2017-04-25T10:54:26Z","updated_at":"2017-05-09T08:46:19Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2017-04-22T14:55:07Z","updated_at":"2017-05-09T09:09:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/pulls/153","html_url":"https://github.com/sociomantic-tsunami/libdrizzle-redux/pull/153","diff_url":"https://github.com/sociomantic-tsunami/libdrizzle-redux/pull/153.diff","patch_url":"https://github.com/sociomantic-tsunami/libdrizzle-redux/pull/153.patch"},"body":"In `drizzle_state_binary_field_read()` at `field.cc:401`\r\n\r\n`NULL` fields have no bytes but bit-masked by `con->result->null_bitmap`, we should skip them.\r\n\r\nFor example, given table:\r\n```sql\r\nCREATE TABLE `test_table` (\r\n  a VARCHAR(10) DEFAULT NULL,\r\n  b VARCHAR(10) DEFAULT NULL,\r\n  c INT(10) DEFAULT NULL,\r\n  d VARCHAR(10) DEFAULT NULL\r\n) ENGINE=InnoDB;\r\n```\r\n\r\nand row\r\n\r\n| a     | b      | c   | d     |\r\n| ----- | ------ | --- | ----- |\r\n| test1 | `NULL` | 123 | test2 |\r\n\r\nSince `NULL` fields are not presented in the response body, if we try to read field `b` from the response, it's not a valid operation and may cause serious problems.\r\n\r\nThis patch fixes this problem by skipping `NULL` fields when reading from MySQL's response."},"comment":{"url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/issues/comments/300106295","html_url":"https://github.com/sociomantic-tsunami/libdrizzle-redux/pull/153#issuecomment-300106295","issue_url":"https://api.github.com/repos/sociomantic-tsunami/libdrizzle-redux/issues/153","id":300106295,"user":{"login":"andreas-bok-sociomantic","id":13032446,"avatar_url":"https://avatars0.githubusercontent.com/u/13032446?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-bok-sociomantic","html_url":"https://github.com/andreas-bok-sociomantic","followers_url":"https://api.github.com/users/andreas-bok-sociomantic/followers","following_url":"https://api.github.com/users/andreas-bok-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/andreas-bok-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-bok-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-bok-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/andreas-bok-sociomantic/orgs","repos_url":"https://api.github.com/users/andreas-bok-sociomantic/repos","events_url":"https://api.github.com/users/andreas-bok-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-bok-sociomantic/received_events","type":"User","site_admin":false},"created_at":"2017-05-09T09:09:27Z","updated_at":"2017-05-09T09:09:27Z","body":"ping @chenzhuoyu "}}
{"actor":{"display_login":"andreas-bok-sociomantic"}}