{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/mssql-jdbc/issues/374","repository_url":"https://api.github.com/repos/Microsoft/mssql-jdbc","labels_url":"https://api.github.com/repos/Microsoft/mssql-jdbc/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/mssql-jdbc/issues/374/comments","events_url":"https://api.github.com/repos/Microsoft/mssql-jdbc/issues/374/events","html_url":"https://github.com/Microsoft/mssql-jdbc/pull/374","id":241288501,"number":374,"title":"Batch support is broken, when setNull is used","user":{"login":"rPraml","id":5530228,"avatar_url":"https://avatars0.githubusercontent.com/u/5530228?v=3","gravatar_id":"","url":"https://api.github.com/users/rPraml","html_url":"https://github.com/rPraml","followers_url":"https://api.github.com/users/rPraml/followers","following_url":"https://api.github.com/users/rPraml/following{/other_user}","gists_url":"https://api.github.com/users/rPraml/gists{/gist_id}","starred_url":"https://api.github.com/users/rPraml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rPraml/subscriptions","organizations_url":"https://api.github.com/users/rPraml/orgs","repos_url":"https://api.github.com/users/rPraml/repos","events_url":"https://api.github.com/users/rPraml/events{/privacy}","received_events_url":"https://api.github.com/users/rPraml/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-07T14:52:44Z","updated_at":"2017-07-07T14:52:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/mssql-jdbc/pulls/374","html_url":"https://github.com/Microsoft/mssql-jdbc/pull/374","diff_url":"https://github.com/Microsoft/mssql-jdbc/pull/374.diff","patch_url":"https://github.com/Microsoft/mssql-jdbc/pull/374.patch"},"body":"*Use case*\r\nIn our application we got sporadically a PRIMARY KEY violation, which we could not explain. After investigating we found out, that this happens since we updated to 6.2.0 (6.1.7.jre8-preview works)\r\n\r\n*Steps to reproduce*\r\ndo several pstmt.setNull & pstmt.setString commands ln a certain order\r\n\r\n*How to fix*\r\n- Either avoid that the \"Could not find prepared statement with handle X\" error occurs. It seems that there is a workaround when this error occurs https://github.com/Microsoft/mssql-jdbc/blob/0b64232330748ecdffd2302886eddb25b6776c76/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerPreparedStatement.java#L531\r\n- OR fix the retry. It seems that the last statement is (partially) executed und executing the same batch again leads into the duplicate-key-exception"},"comment":{"url":"https://api.github.com/repos/Microsoft/mssql-jdbc/issues/comments/313704452","html_url":"https://github.com/Microsoft/mssql-jdbc/pull/374#issuecomment-313704452","issue_url":"https://api.github.com/repos/Microsoft/mssql-jdbc/issues/374","id":313704452,"user":{"login":"msftclas","id":9287708,"avatar_url":"https://avatars2.githubusercontent.com/u/9287708?v=3","gravatar_id":"","url":"https://api.github.com/users/msftclas","html_url":"https://github.com/msftclas","followers_url":"https://api.github.com/users/msftclas/followers","following_url":"https://api.github.com/users/msftclas/following{/other_user}","gists_url":"https://api.github.com/users/msftclas/gists{/gist_id}","starred_url":"https://api.github.com/users/msftclas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msftclas/subscriptions","organizations_url":"https://api.github.com/users/msftclas/orgs","repos_url":"https://api.github.com/users/msftclas/repos","events_url":"https://api.github.com/users/msftclas/events{/privacy}","received_events_url":"https://api.github.com/users/msftclas/received_events","type":"User","site_admin":false},"created_at":"2017-07-07T14:52:48Z","updated_at":"2017-07-07T14:52:48Z","body":"\r\n@__rPraml__,\nThanks for your contribution.\nTo ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.\n\nIt will cover your contributions to all Microsoft-managed open source projects.\n_Thanks,\nMicrosoft Pull Request Bot_"}}
{"actor":{"display_login":"msftclas"}}