Skip to content
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

Review multiple functions in MySQL_Connection that get/set status_flags #2717

Closed
renecannao opened this issue Apr 29, 2020 · 0 comments
Closed

Comments

@renecannao
Copy link
Contributor

There are 11 functions that set status_flags, and 11 functions that get status_flags :


	void set_status_transaction(bool);
	void set_status_compression(bool);
	void set_status_get_lock(bool);
	void set_status_lock_tables(bool);
	void set_status_temporary_table(bool);
	void set_status_no_backslash_escapes(bool);
	void set_status_prepared_statement(bool);
	void set_status_user_variable(bool);
	void set_status_no_multiplex(bool);
	void set_status_sql_log_bin0(bool);
	void set_status_found_rows(bool);
	bool get_status_transaction();
	bool get_status_compression();
	bool get_status_get_lock();
	bool get_status_lock_tables();
	bool get_status_temporary_table();
	bool get_status_no_backslash_escapes();
	bool get_status_prepared_statement();
	bool get_status_user_variable();
	bool get_status_no_multiplex();
	bool get_status_sql_log_bin0();
	bool get_status_found_rows();

See https://github.com/sysown/proxysql/blob/v2.1.0/include/mysql_connection.h#L141-L162 .
We can replace them all with 1 function for set, and one for get, passing the flag as argument

renecannao added a commit that referenced this issue Jun 14, 2020
Refactored MySQL_Connection setter/getter functions functions for 'status_flags' #2717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants