{"action":"created","comment":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/245457436","pull_request_review_id":189569463,"id":245457436,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ1NzQzNg==","diff_hunk":"@@ -0,0 +1,38 @@\n+#pragma once\n+#include \"fmt/format.h\"\n+\n+namespace Envoy {\n+namespace Extensions {\n+namespace NetworkFilters {\n+namespace MySQLProxy {\n+\n+constexpr int MYSQL_VER_MAJOR = 5;\n+constexpr int MYSQL_VER_MINOR = 0;\n+constexpr int MYSQL_VER_VAR = 54;\n+constexpr int MYSQL_SM_LAST_ID = 0;\n+constexpr int MYSQL_SM_SERVER_OK = 0;\n+constexpr int MYSQL_SM_SERVER_WARNINGS = 0x0001;\n+constexpr int MYSQL_SM_AFFECTED_ROWS = 1;\n+constexpr int CLIENT_NUM = 10;\n+constexpr int PARALLEL_SESSIONS = 4;\n+\n+class MySQLTestUtils {\n+\n+public:\n+  static std::string getSalt() { return \"!@salt#$\"; }\n+  static std::string getAuthResp() { return \"p4$$w0r6\"; }\n+  static std::string getVersion() {\n+    std::string ver = fmt::format(\"{0}.{1}.{2}\", MYSQL_VER_MAJOR, MYSQL_VER_MINOR, MYSQL_VER_VAR);","path":"test/extensions/filters/network/mysql_proxy/mysql_test_utils.h","position":25,"original_position":25,"commit_id":"ad6561a49f8172a04418a0659fbc439ab13c485f","original_commit_id":"ad6561a49f8172a04418a0659fbc439ab13c485f","user":{"login":"lizan","id":1016047,"node_id":"MDQ6VXNlcjEwMTYwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/1016047?v=4","gravatar_id":"","url":"https://api.github.com/users/lizan","html_url":"https://github.com/lizan","followers_url":"https://api.github.com/users/lizan/followers","following_url":"https://api.github.com/users/lizan/following{/other_user}","gists_url":"https://api.github.com/users/lizan/gists{/gist_id}","starred_url":"https://api.github.com/users/lizan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizan/subscriptions","organizations_url":"https://api.github.com/users/lizan/orgs","repos_url":"https://api.github.com/users/lizan/repos","events_url":"https://api.github.com/users/lizan/events{/privacy}","received_events_url":"https://api.github.com/users/lizan/received_events","type":"User","site_admin":false},"body":"return directly.","created_at":"2019-01-05T00:47:22Z","updated_at":"2019-01-05T00:48:18Z","html_url":"https://github.com/envoyproxy/envoy/pull/4975#discussion_r245457436","pull_request_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/245457436"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/4975#discussion_r245457436"},"pull_request":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975"}}},"pull_request":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975","id":228805357,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4ODA1MzU3","html_url":"https://github.com/envoyproxy/envoy/pull/4975","diff_url":"https://github.com/envoyproxy/envoy/pull/4975.diff","patch_url":"https://github.com/envoyproxy/envoy/pull/4975.patch","issue_url":"https://api.github.com/repos/envoyproxy/envoy/issues/4975","number":4975,"state":"open","locked":false,"title":"Mysql proxy filter","user":{"login":"rshriram","id":8202871,"node_id":"MDQ6VXNlcjgyMDI4NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/8202871?v=4","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"body":"This filter contains the logic to decode the mysql wire protocol and SQL queries (SQL99 only).\r\nThe code is based on our internal version at VMware. The SQL parser can be found at https://github.com/rshriram/sql-parser. Its a cleaned up version of Hyrise SQL parser. I am keeping the code as a separate library as importing the sources into envoy will cause a lot of changes to the code.\r\n\r\nSigned-off-by: Giorgio Valentini <gvalentini@vmware.com>\r\nSigned-off-by: Deepa Kalani <dkalani@vmware.com>\r\nSigned-off-by: Shriram Rajagopalan <shriramr@vmware.com>\r\nSigned-off-by: Venil Noronha <veniln@vmware.com>","created_at":"2018-11-06T19:19:04Z","updated_at":"2019-01-05T00:48:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"174924fec7f2af173161d5b12831d7b281358b1f","assignee":{"login":"dio","id":73152,"node_id":"MDQ6VXNlcjczMTUy","avatar_url":"https://avatars3.githubusercontent.com/u/73152?v=4","gravatar_id":"","url":"https://api.github.com/users/dio","html_url":"https://github.com/dio","followers_url":"https://api.github.com/users/dio/followers","following_url":"https://api.github.com/users/dio/following{/other_user}","gists_url":"https://api.github.com/users/dio/gists{/gist_id}","starred_url":"https://api.github.com/users/dio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dio/subscriptions","organizations_url":"https://api.github.com/users/dio/orgs","repos_url":"https://api.github.com/users/dio/repos","events_url":"https://api.github.com/users/dio/events{/privacy}","received_events_url":"https://api.github.com/users/dio/received_events","type":"User","site_admin":false},"assignees":[{"login":"dio","id":73152,"node_id":"MDQ6VXNlcjczMTUy","avatar_url":"https://avatars3.githubusercontent.com/u/73152?v=4","gravatar_id":"","url":"https://api.github.com/users/dio","html_url":"https://github.com/dio","followers_url":"https://api.github.com/users/dio/followers","following_url":"https://api.github.com/users/dio/following{/other_user}","gists_url":"https://api.github.com/users/dio/gists{/gist_id}","starred_url":"https://api.github.com/users/dio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dio/subscriptions","organizations_url":"https://api.github.com/users/dio/orgs","repos_url":"https://api.github.com/users/dio/repos","events_url":"https://api.github.com/users/dio/events{/privacy}","received_events_url":"https://api.github.com/users/dio/received_events","type":"User","site_admin":false},{"login":"mattklein123","id":6305260,"node_id":"MDQ6VXNlcjYzMDUyNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6305260?v=4","gravatar_id":"","url":"https://api.github.com/users/mattklein123","html_url":"https://github.com/mattklein123","followers_url":"https://api.github.com/users/mattklein123/followers","following_url":"https://api.github.com/users/mattklein123/following{/other_user}","gists_url":"https://api.github.com/users/mattklein123/gists{/gist_id}","starred_url":"https://api.github.com/users/mattklein123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattklein123/subscriptions","organizations_url":"https://api.github.com/users/mattklein123/orgs","repos_url":"https://api.github.com/users/mattklein123/repos","events_url":"https://api.github.com/users/mattklein123/events{/privacy}","received_events_url":"https://api.github.com/users/mattklein123/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":988830710,"node_id":"MDU6TGFiZWw5ODg4MzA3MTA=","url":"https://api.github.com/repos/envoyproxy/envoy/labels/no%20stalebot","name":"no stalebot","color":"e2ce8a","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975/commits","review_comments_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975/comments","review_comment_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/issues/4975/comments","statuses_url":"https://api.github.com/repos/envoyproxy/envoy/statuses/ad6561a49f8172a04418a0659fbc439ab13c485f","head":{"label":"rshriram:mysql","ref":"mysql","sha":"ad6561a49f8172a04418a0659fbc439ab13c485f","user":{"login":"rshriram","id":8202871,"node_id":"MDQ6VXNlcjgyMDI4NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/8202871?v=4","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"repo":{"id":88080031,"node_id":"MDEwOlJlcG9zaXRvcnk4ODA4MDAzMQ==","name":"envoy","full_name":"rshriram/envoy","private":false,"owner":{"login":"rshriram","id":8202871,"node_id":"MDQ6VXNlcjgyMDI4NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/8202871?v=4","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rshriram/envoy","description":"C++ front/service proxy","fork":true,"url":"https://api.github.com/repos/rshriram/envoy","forks_url":"https://api.github.com/repos/rshriram/envoy/forks","keys_url":"https://api.github.com/repos/rshriram/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rshriram/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rshriram/envoy/teams","hooks_url":"https://api.github.com/repos/rshriram/envoy/hooks","issue_events_url":"https://api.github.com/repos/rshriram/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/rshriram/envoy/events","assignees_url":"https://api.github.com/repos/rshriram/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/rshriram/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/rshriram/envoy/tags","blobs_url":"https://api.github.com/repos/rshriram/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rshriram/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rshriram/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rshriram/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rshriram/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/rshriram/envoy/languages","stargazers_url":"https://api.github.com/repos/rshriram/envoy/stargazers","contributors_url":"https://api.github.com/repos/rshriram/envoy/contributors","subscribers_url":"https://api.github.com/repos/rshriram/envoy/subscribers","subscription_url":"https://api.github.com/repos/rshriram/envoy/subscription","commits_url":"https://api.github.com/repos/rshriram/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rshriram/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rshriram/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rshriram/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rshriram/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/rshriram/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rshriram/envoy/merges","archive_url":"https://api.github.com/repos/rshriram/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rshriram/envoy/downloads","issues_url":"https://api.github.com/repos/rshriram/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/rshriram/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/rshriram/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/rshriram/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rshriram/envoy/labels{/name}","releases_url":"https://api.github.com/repos/rshriram/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/rshriram/envoy/deployments","created_at":"2017-04-12T17:44:05Z","updated_at":"2018-09-20T14:08:29Z","pushed_at":"2019-01-02T17:00:16Z","git_url":"git://github.com/rshriram/envoy.git","ssh_url":"git@github.com:rshriram/envoy.git","clone_url":"https://github.com/rshriram/envoy.git","svn_url":"https://github.com/rshriram/envoy","homepage":"https://lyft.github.io/envoy","size":39936,"stargazers_count":0,"watchers_count":0,"language":"C++","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":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"envoyproxy:master","ref":"master","sha":"87553968ec2258919d986e9a76512b0009d01575","user":{"login":"envoyproxy","id":30125649,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI1NjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/30125649?v=4","gravatar_id":"","url":"https://api.github.com/users/envoyproxy","html_url":"https://github.com/envoyproxy","followers_url":"https://api.github.com/users/envoyproxy/followers","following_url":"https://api.github.com/users/envoyproxy/following{/other_user}","gists_url":"https://api.github.com/users/envoyproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/envoyproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envoyproxy/subscriptions","organizations_url":"https://api.github.com/users/envoyproxy/orgs","repos_url":"https://api.github.com/users/envoyproxy/repos","events_url":"https://api.github.com/users/envoyproxy/events{/privacy}","received_events_url":"https://api.github.com/users/envoyproxy/received_events","type":"Organization","site_admin":false},"repo":{"id":65214191,"node_id":"MDEwOlJlcG9zaXRvcnk2NTIxNDE5MQ==","name":"envoy","full_name":"envoyproxy/envoy","private":false,"owner":{"login":"envoyproxy","id":30125649,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI1NjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/30125649?v=4","gravatar_id":"","url":"https://api.github.com/users/envoyproxy","html_url":"https://github.com/envoyproxy","followers_url":"https://api.github.com/users/envoyproxy/followers","following_url":"https://api.github.com/users/envoyproxy/following{/other_user}","gists_url":"https://api.github.com/users/envoyproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/envoyproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envoyproxy/subscriptions","organizations_url":"https://api.github.com/users/envoyproxy/orgs","repos_url":"https://api.github.com/users/envoyproxy/repos","events_url":"https://api.github.com/users/envoyproxy/events{/privacy}","received_events_url":"https://api.github.com/users/envoyproxy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/envoyproxy/envoy","description":"C++ front/service proxy","fork":false,"url":"https://api.github.com/repos/envoyproxy/envoy","forks_url":"https://api.github.com/repos/envoyproxy/envoy/forks","keys_url":"https://api.github.com/repos/envoyproxy/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/envoyproxy/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/envoyproxy/envoy/teams","hooks_url":"https://api.github.com/repos/envoyproxy/envoy/hooks","issue_events_url":"https://api.github.com/repos/envoyproxy/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/envoyproxy/envoy/events","assignees_url":"https://api.github.com/repos/envoyproxy/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/envoyproxy/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/envoyproxy/envoy/tags","blobs_url":"https://api.github.com/repos/envoyproxy/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/envoyproxy/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/envoyproxy/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/envoyproxy/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/envoyproxy/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/envoyproxy/envoy/languages","stargazers_url":"https://api.github.com/repos/envoyproxy/envoy/stargazers","contributors_url":"https://api.github.com/repos/envoyproxy/envoy/contributors","subscribers_url":"https://api.github.com/repos/envoyproxy/envoy/subscribers","subscription_url":"https://api.github.com/repos/envoyproxy/envoy/subscription","commits_url":"https://api.github.com/repos/envoyproxy/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/envoyproxy/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/envoyproxy/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/envoyproxy/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/envoyproxy/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/envoyproxy/envoy/merges","archive_url":"https://api.github.com/repos/envoyproxy/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/envoyproxy/envoy/downloads","issues_url":"https://api.github.com/repos/envoyproxy/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/envoyproxy/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/envoyproxy/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/envoyproxy/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/envoyproxy/envoy/labels{/name}","releases_url":"https://api.github.com/repos/envoyproxy/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/envoyproxy/envoy/deployments","created_at":"2016-08-08T15:07:24Z","updated_at":"2019-01-05T00:14:41Z","pushed_at":"2019-01-05T00:48:12Z","git_url":"git://github.com/envoyproxy/envoy.git","ssh_url":"git@github.com:envoyproxy/envoy.git","clone_url":"https://github.com/envoyproxy/envoy.git","svn_url":"https://github.com/envoyproxy/envoy","homepage":"https://www.envoyproxy.io","size":25834,"stargazers_count":7853,"watchers_count":7853,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1131,"mirror_url":null,"archived":false,"open_issues_count":413,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1131,"open_issues":413,"watchers":7853,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/4975"},"issue":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/4975"},"comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/4975/comments"},"review_comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975/comments"},"review_comment":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/4975/commits"},"statuses":{"href":"https://api.github.com/repos/envoyproxy/envoy/statuses/ad6561a49f8172a04418a0659fbc439ab13c485f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lizan"}}