generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor MYSQL_PROXY #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Refactor MYSQL_PROXY #118
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6b38980
EFM PROXY
yanw-bq 7a30adf
complete EFM PROXY
yanw-bq a554256
fix unit tests
yanw-bq 8df12dd
fix include
yanw-bq b6c8000
generate node keys after setting next proxy for EFM_PROXY
yanw-bq cc18b06
fix unit tests
yanw-bq 60ecec6
stop monitoring init() and options()
yanw-bq 21ad2e2
replace MYSQL_MONITOR_PROXY with MYSQL_PROXY
yanw-bq 370cfce
fix unit tests
yanw-bq fd8dcdc
stop monitoring ping()
yanw-bq 030dd85
stop monitoring ssl_set and option4
yanw-bq 505a758
stop monitoring autocommit
yanw-bq bcc8981
comment out aws code
yanw-bq 314cb0c
stop monitoring client_find_plugin
yanw-bq acbb28e
newline at eof
yanw-bq e131b3f
free monitor connection before getting a new one
yanw-bq 388eb20
fix unit tests
yanw-bq db20013
test
yanw-bq 8395ead
disable failover and monitoring for monitor thread
yanw-bq 2b05234
fix memory leak in unit test
yanw-bq c1d41d2
needs connection handler for monitor
yanw-bq 678e108
add null check in monitor service start monitoring
yanw-bq 3f8087c
fix env handle still used after deleting
yanw-bq a771372
comment out mysql_library_init
yanw-bq 706652c
move connection handler to its own header file
yanw-bq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // | ||
| // This program is free software; you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License, version 2.0 | ||
| // (GPLv2), as published by the Free Software Foundation, with the | ||
| // following additional permissions: | ||
| // | ||
| // This program is distributed with certain software that is licensed | ||
| // under separate terms, as designated in a particular file or component | ||
| // or in the license documentation. Without limiting your rights under | ||
| // the GPLv2, the authors of this program hereby grant you an additional | ||
| // permission to link the program and your derivative works with the | ||
| // separately licensed software that they have included with the program. | ||
| // | ||
| // Without limiting the foregoing grant of rights under the GPLv2 and | ||
| // additional permission as to separately licensed software, this | ||
| // program is also subject to the Universal FOSS Exception, version 1.0, | ||
| // a copy of which can be found along with its FAQ at | ||
| // http://oss.oracle.com/licenses/universal-foss-exception. | ||
| // | ||
| // This program is distributed in the hope that it will be useful, but | ||
| // WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| // See the GNU General Public License, version 2.0, for more details. | ||
| // | ||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see | ||
| // http://www.gnu.org/licenses/gpl-2.0.html. | ||
|
|
||
| #ifndef __CONNECTION_HANDLER_H__ | ||
| #define __CONNECTION_HANDLER_H__ | ||
|
|
||
| #include "host_info.h" | ||
|
|
||
| #include <memory> | ||
|
|
||
| #ifdef __linux__ | ||
| typedef std::u16string sqlwchar_string; | ||
| #else | ||
| typedef std::wstring sqlwchar_string; | ||
| #endif | ||
|
|
||
| sqlwchar_string to_sqlwchar_string(const std::string& src); | ||
|
|
||
| struct DBC; | ||
| struct DataSource; | ||
| class MYSQL_PROXY; | ||
| typedef short SQLRETURN; | ||
|
|
||
| class CONNECTION_HANDLER { | ||
| public: | ||
| CONNECTION_HANDLER(DBC* dbc); | ||
| virtual ~CONNECTION_HANDLER(); | ||
|
|
||
| virtual SQLRETURN do_connect(DBC* dbc_ptr, DataSource* ds, bool failover_enabled); | ||
| virtual MYSQL_PROXY* connect(const std::shared_ptr<HOST_INFO>& host_info, DataSource* ds); | ||
| void update_connection(MYSQL_PROXY* new_connection, const std::string& new_host_name); | ||
|
|
||
| private: | ||
| DBC* dbc; | ||
| DBC* clone_dbc(DBC* source_dbc, DataSource* ds); | ||
| }; | ||
|
|
||
| #endif /* __CONNECTION_HANDLER_H__ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.