{"action":"created","comment":{"url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/comments/245491259","pull_request_review_id":189610385,"id":245491259,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ5MTI1OQ==","diff_hunk":"@@ -212,33 +212,57 @@ def test_drop_table(db_testdir):\n     '''\n     Make sure that we can drop tables and verify they do not exist in the context\n     of a test.\n+\n+    NOTE: For MySQL `DROP TABLE ...` statements \"cause an implicit commit after\n+    executing. The intent is to handle each such statement in its own special\n+    transaction because it cannot be rolled back anyway.\"\n+    https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html\n+\n+    So this test is skipped for 'mysql' engines","path":"tests/test_fixtures.py","position":10,"original_position":10,"commit_id":"db4de7a1a0e057b1f216fd08c21787ca9d53b90b","original_commit_id":"db4de7a1a0e057b1f216fd08c21787ca9d53b90b","user":{"login":"jeancochrane","id":14170650,"node_id":"MDQ6VXNlcjE0MTcwNjUw","avatar_url":"https://avatars3.githubusercontent.com/u/14170650?v=4","gravatar_id":"","url":"https://api.github.com/users/jeancochrane","html_url":"https://github.com/jeancochrane","followers_url":"https://api.github.com/users/jeancochrane/followers","following_url":"https://api.github.com/users/jeancochrane/following{/other_user}","gists_url":"https://api.github.com/users/jeancochrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jeancochrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeancochrane/subscriptions","organizations_url":"https://api.github.com/users/jeancochrane/orgs","repos_url":"https://api.github.com/users/jeancochrane/repos","events_url":"https://api.github.com/users/jeancochrane/events{/privacy}","received_events_url":"https://api.github.com/users/jeancochrane/received_events","type":"User","site_admin":false},"body":"What happens if you don't skip this test in MySQL? I would expect an autocommit not to cause a problem here, since the outermost transaction is supposed to listen for nested inner commits and restart transactions when they occur. Maybe there's something about \"implicit commits\" in MySQL that overrides nested transactions?\r\n\r\nI'd like to get to the bottom of this behavior, since it seems pretty restricting to not be able to run any of the statements that are listed on the MySQL docs for implicit commits (`DROP TABLE` and `TRUNCATE TABLE`  are used pretty often in the test suite that inspired this plugin, for example). Again, let me know if you get stuck and I'd be happy to help out with research.","created_at":"2019-01-05T23:08:54Z","updated_at":"2019-01-05T23:09:52Z","html_url":"https://github.com/jeancochrane/pytest-flask-sqlalchemy/pull/10#discussion_r245491259","pull_request_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/comments/245491259"},"html":{"href":"https://github.com/jeancochrane/pytest-flask-sqlalchemy/pull/10#discussion_r245491259"},"pull_request":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10","id":242165811,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMTY1ODEx","html_url":"https://github.com/jeancochrane/pytest-flask-sqlalchemy/pull/10","diff_url":"https://github.com/jeancochrane/pytest-flask-sqlalchemy/pull/10.diff","patch_url":"https://github.com/jeancochrane/pytest-flask-sqlalchemy/pull/10.patch","issue_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/issues/10","number":10,"state":"open","locked":false,"title":"Adding MySQL support for db fixtures","user":{"login":"kamikaz1k","id":11997716,"node_id":"MDQ6VXNlcjExOTk3NzE2","avatar_url":"https://avatars0.githubusercontent.com/u/11997716?v=4","gravatar_id":"","url":"https://api.github.com/users/kamikaz1k","html_url":"https://github.com/kamikaz1k","followers_url":"https://api.github.com/users/kamikaz1k/followers","following_url":"https://api.github.com/users/kamikaz1k/following{/other_user}","gists_url":"https://api.github.com/users/kamikaz1k/gists{/gist_id}","starred_url":"https://api.github.com/users/kamikaz1k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamikaz1k/subscriptions","organizations_url":"https://api.github.com/users/kamikaz1k/orgs","repos_url":"https://api.github.com/users/kamikaz1k/repos","events_url":"https://api.github.com/users/kamikaz1k/events{/privacy}","received_events_url":"https://api.github.com/users/kamikaz1k/received_events","type":"User","site_admin":false},"body":"Adding MySQL (tested on 5.7) support with updated tests. The travis config was updated to support testing on multiple databases. I will try to tackle SQLite next.\r\n\r\nNOTE: I skip the drop table tests for MySQL engines because the `DROP TABLE ...` statement causes an autocommit, which breaks what the test was trying to assert. After scratching my head quite a lot I found these in the MySQL docs: https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html\r\n\r\n> \"[`DROP TABLE` statements] cause an implicit commit after executing. The intent is to handle each such statement in its own special transaction because it cannot be rolled back anyway.\"\r\n\r\nIf anybody thinks I have misunderstood, I'll gladly take the lesson!\r\n\r\nRefs https://github.com/jeancochrane/pytest-flask-sqlalchemy/issues/3 (kinda)","created_at":"2019-01-04T03:14:40Z","updated_at":"2019-01-05T23:09:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b37b6dfcd56a897f60cf87294c413f073865fdba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10/commits","review_comments_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10/comments","review_comment_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/issues/10/comments","statuses_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/statuses/db4de7a1a0e057b1f216fd08c21787ca9d53b90b","head":{"label":"kamikaz1k:multi-db-travis","ref":"multi-db-travis","sha":"db4de7a1a0e057b1f216fd08c21787ca9d53b90b","user":{"login":"kamikaz1k","id":11997716,"node_id":"MDQ6VXNlcjExOTk3NzE2","avatar_url":"https://avatars0.githubusercontent.com/u/11997716?v=4","gravatar_id":"","url":"https://api.github.com/users/kamikaz1k","html_url":"https://github.com/kamikaz1k","followers_url":"https://api.github.com/users/kamikaz1k/followers","following_url":"https://api.github.com/users/kamikaz1k/following{/other_user}","gists_url":"https://api.github.com/users/kamikaz1k/gists{/gist_id}","starred_url":"https://api.github.com/users/kamikaz1k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamikaz1k/subscriptions","organizations_url":"https://api.github.com/users/kamikaz1k/orgs","repos_url":"https://api.github.com/users/kamikaz1k/repos","events_url":"https://api.github.com/users/kamikaz1k/events{/privacy}","received_events_url":"https://api.github.com/users/kamikaz1k/received_events","type":"User","site_admin":false},"repo":{"id":160460867,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA0NjA4Njc=","name":"pytest-flask-sqlalchemy","full_name":"kamikaz1k/pytest-flask-sqlalchemy","private":false,"owner":{"login":"kamikaz1k","id":11997716,"node_id":"MDQ6VXNlcjExOTk3NzE2","avatar_url":"https://avatars0.githubusercontent.com/u/11997716?v=4","gravatar_id":"","url":"https://api.github.com/users/kamikaz1k","html_url":"https://github.com/kamikaz1k","followers_url":"https://api.github.com/users/kamikaz1k/followers","following_url":"https://api.github.com/users/kamikaz1k/following{/other_user}","gists_url":"https://api.github.com/users/kamikaz1k/gists{/gist_id}","starred_url":"https://api.github.com/users/kamikaz1k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamikaz1k/subscriptions","organizations_url":"https://api.github.com/users/kamikaz1k/orgs","repos_url":"https://api.github.com/users/kamikaz1k/repos","events_url":"https://api.github.com/users/kamikaz1k/events{/privacy}","received_events_url":"https://api.github.com/users/kamikaz1k/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kamikaz1k/pytest-flask-sqlalchemy","description":"A pytest plugin for preserving test isolation in Flask-SQlAlchemy using database transactions.","fork":true,"url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy","forks_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/forks","keys_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/teams","hooks_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/hooks","issue_events_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/issues/events{/number}","events_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/events","assignees_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/assignees{/user}","branches_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/branches{/branch}","tags_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/tags","blobs_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/git/refs{/sha}","trees_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/statuses/{sha}","languages_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/languages","stargazers_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/stargazers","contributors_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/contributors","subscribers_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/subscribers","subscription_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/subscription","commits_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/commits{/sha}","git_commits_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/git/commits{/sha}","comments_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/comments{/number}","issue_comment_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/issues/comments{/number}","contents_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/contents/{+path}","compare_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/merges","archive_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/downloads","issues_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/issues{/number}","pulls_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/pulls{/number}","milestones_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/milestones{/number}","notifications_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/labels{/name}","releases_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/releases{/id}","deployments_url":"https://api.github.com/repos/kamikaz1k/pytest-flask-sqlalchemy/deployments","created_at":"2018-12-05T04:30:46Z","updated_at":"2018-12-05T04:30:49Z","pushed_at":"2019-01-04T03:13:39Z","git_url":"git://github.com/kamikaz1k/pytest-flask-sqlalchemy.git","ssh_url":"git@github.com:kamikaz1k/pytest-flask-sqlalchemy.git","clone_url":"https://github.com/kamikaz1k/pytest-flask-sqlalchemy.git","svn_url":"https://github.com/kamikaz1k/pytest-flask-sqlalchemy","homepage":"","size":75,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jeancochrane:master","ref":"master","sha":"43e2c36e8f7083775a70fe73bc370a5dc4039fa5","user":{"login":"jeancochrane","id":14170650,"node_id":"MDQ6VXNlcjE0MTcwNjUw","avatar_url":"https://avatars3.githubusercontent.com/u/14170650?v=4","gravatar_id":"","url":"https://api.github.com/users/jeancochrane","html_url":"https://github.com/jeancochrane","followers_url":"https://api.github.com/users/jeancochrane/followers","following_url":"https://api.github.com/users/jeancochrane/following{/other_user}","gists_url":"https://api.github.com/users/jeancochrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jeancochrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeancochrane/subscriptions","organizations_url":"https://api.github.com/users/jeancochrane/orgs","repos_url":"https://api.github.com/users/jeancochrane/repos","events_url":"https://api.github.com/users/jeancochrane/events{/privacy}","received_events_url":"https://api.github.com/users/jeancochrane/received_events","type":"User","site_admin":false},"repo":{"id":134448117,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ0NDgxMTc=","name":"pytest-flask-sqlalchemy","full_name":"jeancochrane/pytest-flask-sqlalchemy","private":false,"owner":{"login":"jeancochrane","id":14170650,"node_id":"MDQ6VXNlcjE0MTcwNjUw","avatar_url":"https://avatars3.githubusercontent.com/u/14170650?v=4","gravatar_id":"","url":"https://api.github.com/users/jeancochrane","html_url":"https://github.com/jeancochrane","followers_url":"https://api.github.com/users/jeancochrane/followers","following_url":"https://api.github.com/users/jeancochrane/following{/other_user}","gists_url":"https://api.github.com/users/jeancochrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jeancochrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeancochrane/subscriptions","organizations_url":"https://api.github.com/users/jeancochrane/orgs","repos_url":"https://api.github.com/users/jeancochrane/repos","events_url":"https://api.github.com/users/jeancochrane/events{/privacy}","received_events_url":"https://api.github.com/users/jeancochrane/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jeancochrane/pytest-flask-sqlalchemy","description":"A pytest plugin for preserving test isolation in Flask-SQLAlchemy using database transactions.","fork":false,"url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy","forks_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/forks","keys_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/teams","hooks_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/hooks","issue_events_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/issues/events{/number}","events_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/events","assignees_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/assignees{/user}","branches_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/branches{/branch}","tags_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/tags","blobs_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/statuses/{sha}","languages_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/languages","stargazers_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/stargazers","contributors_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/contributors","subscribers_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/subscribers","subscription_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/subscription","commits_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/contents/{+path}","compare_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/merges","archive_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/downloads","issues_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/issues{/number}","pulls_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls{/number}","milestones_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/milestones{/number}","notifications_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/labels{/name}","releases_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/releases{/id}","deployments_url":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/deployments","created_at":"2018-05-22T17:03:08Z","updated_at":"2019-01-02T12:02:35Z","pushed_at":"2019-01-04T03:14:41Z","git_url":"git://github.com/jeancochrane/pytest-flask-sqlalchemy.git","ssh_url":"git@github.com:jeancochrane/pytest-flask-sqlalchemy.git","clone_url":"https://github.com/jeancochrane/pytest-flask-sqlalchemy.git","svn_url":"https://github.com/jeancochrane/pytest-flask-sqlalchemy","homepage":"","size":72,"stargazers_count":33,"watchers_count":33,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":4,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10"},"html":{"href":"https://github.com/jeancochrane/pytest-flask-sqlalchemy/pull/10"},"issue":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/issues/10"},"comments":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/jeancochrane/pytest-flask-sqlalchemy/statuses/db4de7a1a0e057b1f216fd08c21787ca9d53b90b"}},"author_association":"NONE"}}
{"actor":{"display_login":"jeancochrane"}}