{"action":"created","comment":{"url":"https://api.github.com/repos/percona/percona-server/pulls/comments/39830984","id":39830984,"diff_hunk":"@@ -448,6 +445,54 @@ drop table t2;\n \n #-------------------------------------------------------------------------------\n #\n+# Scenario is meant to check following scenarios:\n+# SELECT is allowed to function normally if fake_changes = ON as it is readonly\n+# CREATE...SELECT * from <table>; is allowed to work if CREATE is done using\n+# other SE but SELECT may be working on InnoDB.\n+#\n+create table t1 (i int) engine=innodb;\n+insert into t1 values (1), (2);\n+set session innodb_fake_changes = 1;\n+#\n+select * from t1;\n+let save_session_engine = `select @@session.default_storage_engine`;\n+set @@session.default_storage_engine=innodb;\n+--error ER_CANT_CREATE_TABLE\n+create table t3 select * from t1;\n+#\n+set @@session.default_storage_engine=myisam;\n+create table t2 select * from t1;\n+show create table t2;\n+select * from t2;\n+drop table t2;\n+#\n+set session innodb_fake_changes = 0;\n+eval set @@session.default_storage_engine=$save_session_engine;\n+drop table t1;\n+#\n+#\n+use test;","path":"mysql-test/t/percona_innodb_fake_changes.test","position":54,"original_position":54,"commit_id":"a91d09ada88abb0d20a5d13c78962eb54e46011f","original_commit_id":"a91d09ada88abb0d20a5d13c78962eb54e46011f","user":{"login":"laurynas-biveinis","id":58894,"avatar_url":"https://avatars.githubusercontent.com/u/58894?v=3","gravatar_id":"","url":"https://api.github.com/users/laurynas-biveinis","html_url":"https://github.com/laurynas-biveinis","followers_url":"https://api.github.com/users/laurynas-biveinis/followers","following_url":"https://api.github.com/users/laurynas-biveinis/following{/other_user}","gists_url":"https://api.github.com/users/laurynas-biveinis/gists{/gist_id}","starred_url":"https://api.github.com/users/laurynas-biveinis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurynas-biveinis/subscriptions","organizations_url":"https://api.github.com/users/laurynas-biveinis/orgs","repos_url":"https://api.github.com/users/laurynas-biveinis/repos","events_url":"https://api.github.com/users/laurynas-biveinis/events{/privacy}","received_events_url":"https://api.github.com/users/laurynas-biveinis/received_events","type":"User","site_admin":false},"body":"Redundant?","created_at":"2015-09-18T07:42:43Z","updated_at":"2015-09-18T07:42:43Z","html_url":"https://github.com/percona/percona-server/pull/178#discussion_r39830984","pull_request_url":"https://api.github.com/repos/percona/percona-server/pulls/178","_links":{"self":{"href":"https://api.github.com/repos/percona/percona-server/pulls/comments/39830984"},"html":{"href":"https://github.com/percona/percona-server/pull/178#discussion_r39830984"},"pull_request":{"href":"https://api.github.com/repos/percona/percona-server/pulls/178"}}},"pull_request":{"url":"https://api.github.com/repos/percona/percona-server/pulls/178","id":45304322,"html_url":"https://github.com/percona/percona-server/pull/178","diff_url":"https://github.com/percona/percona-server/pull/178.diff","patch_url":"https://github.com/percona/percona-server/pull/178.patch","issue_url":"https://api.github.com/repos/percona/percona-server/issues/178","number":178,"state":"open","locked":false,"title":"- bug#1382745 : CREATE table .. SELECT * from <table> fails if destin…","user":{"login":"kbauskar","id":14107301,"avatar_url":"https://avatars.githubusercontent.com/u/14107301?v=3","gravatar_id":"","url":"https://api.github.com/users/kbauskar","html_url":"https://github.com/kbauskar","followers_url":"https://api.github.com/users/kbauskar/followers","following_url":"https://api.github.com/users/kbauskar/following{/other_user}","gists_url":"https://api.github.com/users/kbauskar/gists{/gist_id}","starred_url":"https://api.github.com/users/kbauskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbauskar/subscriptions","organizations_url":"https://api.github.com/users/kbauskar/orgs","repos_url":"https://api.github.com/users/kbauskar/repos","events_url":"https://api.github.com/users/kbauskar/events{/privacy}","received_events_url":"https://api.github.com/users/kbauskar/received_events","type":"User","site_admin":false},"body":"…ation table\r\n\r\n  is from other SE that is not aware of fake-changes\r\n\r\n  Creating table in InnoDB with fake-change mode enable is semantically blocked\r\n  and accordingly ha_innobase::create would return an error.\r\n\r\n  What if such table exist in other SE that is not aware of fake-changes and\r\n  table is being created and loaded using CREATE TABLE .... SELECT * FROM;\r\n\r\n  Due to restrictive/blocked SELECT execution (in autocommit mode) it would\r\n  fail which eventually would result in catastrophic error as SELECT statement\r\n  will never fail at commit stage (especially being readonly workload).\r\n\r\n  SELECT is readonly so it could be allowed to execute even if fake-changes are\r\n  enabled. Especially SELECT with auto-commit that use to fail before.\r\n  SELECT inside a transaction is already allowed but commit will fail.\r\n  Infact, a transaction without any other modifying DML statement has nothing\r\n  to commit. Also, SELECT being executed as part of CREATE TABLE .... SELECT\r\n  should be allowed too.","created_at":"2015-09-17T15:26:43Z","updated_at":"2015-09-18T07:42:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"342e4baae42ae3298f1e7f5f3776e130309000ad","assignee":{"login":"laurynas-biveinis","id":58894,"avatar_url":"https://avatars.githubusercontent.com/u/58894?v=3","gravatar_id":"","url":"https://api.github.com/users/laurynas-biveinis","html_url":"https://github.com/laurynas-biveinis","followers_url":"https://api.github.com/users/laurynas-biveinis/followers","following_url":"https://api.github.com/users/laurynas-biveinis/following{/other_user}","gists_url":"https://api.github.com/users/laurynas-biveinis/gists{/gist_id}","starred_url":"https://api.github.com/users/laurynas-biveinis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurynas-biveinis/subscriptions","organizations_url":"https://api.github.com/users/laurynas-biveinis/orgs","repos_url":"https://api.github.com/users/laurynas-biveinis/repos","events_url":"https://api.github.com/users/laurynas-biveinis/events{/privacy}","received_events_url":"https://api.github.com/users/laurynas-biveinis/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/percona/percona-server/pulls/178/commits","review_comments_url":"https://api.github.com/repos/percona/percona-server/pulls/178/comments","review_comment_url":"https://api.github.com/repos/percona/percona-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/percona/percona-server/issues/178/comments","statuses_url":"https://api.github.com/repos/percona/percona-server/statuses/a91d09ada88abb0d20a5d13c78962eb54e46011f","head":{"label":"kbauskar:5.5-ps-bug1382745","ref":"5.5-ps-bug1382745","sha":"a91d09ada88abb0d20a5d13c78962eb54e46011f","user":{"login":"kbauskar","id":14107301,"avatar_url":"https://avatars.githubusercontent.com/u/14107301?v=3","gravatar_id":"","url":"https://api.github.com/users/kbauskar","html_url":"https://github.com/kbauskar","followers_url":"https://api.github.com/users/kbauskar/followers","following_url":"https://api.github.com/users/kbauskar/following{/other_user}","gists_url":"https://api.github.com/users/kbauskar/gists{/gist_id}","starred_url":"https://api.github.com/users/kbauskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbauskar/subscriptions","organizations_url":"https://api.github.com/users/kbauskar/orgs","repos_url":"https://api.github.com/users/kbauskar/repos","events_url":"https://api.github.com/users/kbauskar/events{/privacy}","received_events_url":"https://api.github.com/users/kbauskar/received_events","type":"User","site_admin":false},"repo":{"id":41864912,"name":"percona-server","full_name":"kbauskar/percona-server","owner":{"login":"kbauskar","id":14107301,"avatar_url":"https://avatars.githubusercontent.com/u/14107301?v=3","gravatar_id":"","url":"https://api.github.com/users/kbauskar","html_url":"https://github.com/kbauskar","followers_url":"https://api.github.com/users/kbauskar/followers","following_url":"https://api.github.com/users/kbauskar/following{/other_user}","gists_url":"https://api.github.com/users/kbauskar/gists{/gist_id}","starred_url":"https://api.github.com/users/kbauskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbauskar/subscriptions","organizations_url":"https://api.github.com/users/kbauskar/orgs","repos_url":"https://api.github.com/users/kbauskar/repos","events_url":"https://api.github.com/users/kbauskar/events{/privacy}","received_events_url":"https://api.github.com/users/kbauskar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kbauskar/percona-server","description":"","fork":true,"url":"https://api.github.com/repos/kbauskar/percona-server","forks_url":"https://api.github.com/repos/kbauskar/percona-server/forks","keys_url":"https://api.github.com/repos/kbauskar/percona-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbauskar/percona-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbauskar/percona-server/teams","hooks_url":"https://api.github.com/repos/kbauskar/percona-server/hooks","issue_events_url":"https://api.github.com/repos/kbauskar/percona-server/issues/events{/number}","events_url":"https://api.github.com/repos/kbauskar/percona-server/events","assignees_url":"https://api.github.com/repos/kbauskar/percona-server/assignees{/user}","branches_url":"https://api.github.com/repos/kbauskar/percona-server/branches{/branch}","tags_url":"https://api.github.com/repos/kbauskar/percona-server/tags","blobs_url":"https://api.github.com/repos/kbauskar/percona-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbauskar/percona-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbauskar/percona-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbauskar/percona-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbauskar/percona-server/statuses/{sha}","languages_url":"https://api.github.com/repos/kbauskar/percona-server/languages","stargazers_url":"https://api.github.com/repos/kbauskar/percona-server/stargazers","contributors_url":"https://api.github.com/repos/kbauskar/percona-server/contributors","subscribers_url":"https://api.github.com/repos/kbauskar/percona-server/subscribers","subscription_url":"https://api.github.com/repos/kbauskar/percona-server/subscription","commits_url":"https://api.github.com/repos/kbauskar/percona-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbauskar/percona-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbauskar/percona-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbauskar/percona-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbauskar/percona-server/contents/{+path}","compare_url":"https://api.github.com/repos/kbauskar/percona-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbauskar/percona-server/merges","archive_url":"https://api.github.com/repos/kbauskar/percona-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbauskar/percona-server/downloads","issues_url":"https://api.github.com/repos/kbauskar/percona-server/issues{/number}","pulls_url":"https://api.github.com/repos/kbauskar/percona-server/pulls{/number}","milestones_url":"https://api.github.com/repos/kbauskar/percona-server/milestones{/number}","notifications_url":"https://api.github.com/repos/kbauskar/percona-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbauskar/percona-server/labels{/name}","releases_url":"https://api.github.com/repos/kbauskar/percona-server/releases{/id}","created_at":"2015-09-03T14:39:37Z","updated_at":"2015-09-03T14:41:17Z","pushed_at":"2015-09-18T06:22:04Z","git_url":"git://github.com/kbauskar/percona-server.git","ssh_url":"git@github.com:kbauskar/percona-server.git","clone_url":"https://github.com/kbauskar/percona-server.git","svn_url":"https://github.com/kbauskar/percona-server","homepage":null,"size":383053,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"5.6"}},"base":{"label":"percona:5.5","ref":"5.5","sha":"a4129bb60bfa866923cbad7a0f093ada38dd0ab3","user":{"login":"percona","id":1683025,"avatar_url":"https://avatars.githubusercontent.com/u/1683025?v=3","gravatar_id":"","url":"https://api.github.com/users/percona","html_url":"https://github.com/percona","followers_url":"https://api.github.com/users/percona/followers","following_url":"https://api.github.com/users/percona/following{/other_user}","gists_url":"https://api.github.com/users/percona/gists{/gist_id}","starred_url":"https://api.github.com/users/percona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percona/subscriptions","organizations_url":"https://api.github.com/users/percona/orgs","repos_url":"https://api.github.com/users/percona/repos","events_url":"https://api.github.com/users/percona/events{/privacy}","received_events_url":"https://api.github.com/users/percona/received_events","type":"Organization","site_admin":false},"repo":{"id":30753733,"name":"percona-server","full_name":"percona/percona-server","owner":{"login":"percona","id":1683025,"avatar_url":"https://avatars.githubusercontent.com/u/1683025?v=3","gravatar_id":"","url":"https://api.github.com/users/percona","html_url":"https://github.com/percona","followers_url":"https://api.github.com/users/percona/followers","following_url":"https://api.github.com/users/percona/following{/other_user}","gists_url":"https://api.github.com/users/percona/gists{/gist_id}","starred_url":"https://api.github.com/users/percona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percona/subscriptions","organizations_url":"https://api.github.com/users/percona/orgs","repos_url":"https://api.github.com/users/percona/repos","events_url":"https://api.github.com/users/percona/events{/privacy}","received_events_url":"https://api.github.com/users/percona/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/percona/percona-server","description":"","fork":false,"url":"https://api.github.com/repos/percona/percona-server","forks_url":"https://api.github.com/repos/percona/percona-server/forks","keys_url":"https://api.github.com/repos/percona/percona-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/percona/percona-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/percona/percona-server/teams","hooks_url":"https://api.github.com/repos/percona/percona-server/hooks","issue_events_url":"https://api.github.com/repos/percona/percona-server/issues/events{/number}","events_url":"https://api.github.com/repos/percona/percona-server/events","assignees_url":"https://api.github.com/repos/percona/percona-server/assignees{/user}","branches_url":"https://api.github.com/repos/percona/percona-server/branches{/branch}","tags_url":"https://api.github.com/repos/percona/percona-server/tags","blobs_url":"https://api.github.com/repos/percona/percona-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/percona/percona-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/percona/percona-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/percona/percona-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/percona/percona-server/statuses/{sha}","languages_url":"https://api.github.com/repos/percona/percona-server/languages","stargazers_url":"https://api.github.com/repos/percona/percona-server/stargazers","contributors_url":"https://api.github.com/repos/percona/percona-server/contributors","subscribers_url":"https://api.github.com/repos/percona/percona-server/subscribers","subscription_url":"https://api.github.com/repos/percona/percona-server/subscription","commits_url":"https://api.github.com/repos/percona/percona-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/percona/percona-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/percona/percona-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/percona/percona-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/percona/percona-server/contents/{+path}","compare_url":"https://api.github.com/repos/percona/percona-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/percona/percona-server/merges","archive_url":"https://api.github.com/repos/percona/percona-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/percona/percona-server/downloads","issues_url":"https://api.github.com/repos/percona/percona-server/issues{/number}","pulls_url":"https://api.github.com/repos/percona/percona-server/pulls{/number}","milestones_url":"https://api.github.com/repos/percona/percona-server/milestones{/number}","notifications_url":"https://api.github.com/repos/percona/percona-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/percona/percona-server/labels{/name}","releases_url":"https://api.github.com/repos/percona/percona-server/releases{/id}","created_at":"2015-02-13T11:32:01Z","updated_at":"2015-09-18T05:20:55Z","pushed_at":"2015-09-18T06:22:52Z","git_url":"git://github.com/percona/percona-server.git","ssh_url":"git@github.com:percona/percona-server.git","clone_url":"https://github.com/percona/percona-server.git","svn_url":"https://github.com/percona/percona-server","homepage":null,"size":771330,"stargazers_count":44,"watchers_count":44,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":7,"forks":27,"open_issues":7,"watchers":44,"default_branch":"5.6"}},"_links":{"self":{"href":"https://api.github.com/repos/percona/percona-server/pulls/178"},"html":{"href":"https://github.com/percona/percona-server/pull/178"},"issue":{"href":"https://api.github.com/repos/percona/percona-server/issues/178"},"comments":{"href":"https://api.github.com/repos/percona/percona-server/issues/178/comments"},"review_comments":{"href":"https://api.github.com/repos/percona/percona-server/pulls/178/comments"},"review_comment":{"href":"https://api.github.com/repos/percona/percona-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/percona/percona-server/pulls/178/commits"},"statuses":{"href":"https://api.github.com/repos/percona/percona-server/statuses/a91d09ada88abb0d20a5d13c78962eb54e46011f"}}}}