Skip to content
Draft
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8058162
Remove non-supported checks from 'pgsql_replication_hostgroups' defin…
JavierJF May 21, 2025
1a79a9f
Add new variables for disable/enable MySQL/PostgreSQL modules - Close…
JavierJF May 21, 2025
26298bf
Remove old commented code
JavierJF May 21, 2025
8cc081c
Fix indentation and scope match for 'if' condition
JavierJF May 21, 2025
18a7eab
Fix 'MySQLWorker' threads naming
JavierJF May 21, 2025
68685de
Revert "Remove non-supported checks from 'pgsql_replication_hostgroup…
JavierJF Jul 1, 2025
bd877fc
Improve variable definition order in 'ProxySQL_GlobalVariables::global'
JavierJF Jul 1, 2025
74c8598
Add initial doc for variables to disable/enable MySQL/PostgreSQL modules
JavierJF Jul 1, 2025
f70f36a
Fix issue 5186: Prevent admin query crashes after PROXYSQL STOP
renecannao Nov 18, 2025
c9b6617
Add comprehensive TAP test for module enable/disable functionality
renecannao Nov 22, 2025
7027e5d
Fix test logic errors and compiler warnings
renecannao Nov 23, 2025
04ec1f1
Optimize test performance by removing unnecessary sleep
renecannao Nov 23, 2025
a17f41a
Add monitor module enable/disable testing
renecannao Nov 23, 2025
572b4e3
Redirect ProxySQL output to log files in test datadirs
renecannao Nov 23, 2025
b0954e0
Fix monitor module synchronization with admin interface variables
renecannao Nov 23, 2025
2763823
Add module enable/disable TAP tests to default test group
renecannao Nov 23, 2025
2304303
Merge branch 'v3.0' into v3.0-4951
renecannao Nov 23, 2025
e4ec4d4
Add debugging for PROXYSQL STOP query handling delays
renecannao Nov 23, 2025
5c57aaf
Fix PROXYSQL START restart sequence to prevent crashes after STOP
renecannao Nov 23, 2025
48b5bb3
Prevent SSL context corruption during PROXYSQL STOP/START restart
renecannao Nov 23, 2025
d41d7c4
Add null pointer protection to Query Processor access functions
renecannao Nov 23, 2025
13ebf39
Fix ASAN double free issue in dangerous query handling
renecannao Nov 23, 2025
22184bc
Remove incomplete dangerous query blocking implementation
renecannao Nov 23, 2025
19c8a25
Update test expectations for PROXYSQL STOP query handling
renecannao Nov 23, 2025
e5a6807
Add test_proxysql_stop_query_handling-t to default-g1 test group
renecannao Nov 23, 2025
fb638a7
Merge remote-tracking branch 'origin/fix/5186-proxysql-stop-admin-cra…
renecannao Nov 24, 2025
ee61753
Resolve merge conflict in groups.json - include both PR tests
renecannao Nov 24, 2025
9160d2c
Add comprehensive PROXYSQL STOP/START dependency testing for issue #5218
renecannao Nov 24, 2025
39d7689
Fix ASAN stack-use-after-return error in reg_test_4960_modules_startu…
renecannao Nov 24, 2025
487c4ca
Clean up PgSQL_Thread: remove commented out MySQL variables and dead …
renecannao Nov 24, 2025
1cb9552
Fix SQLite 'table already exists' errors during PROXYSQL STOP (issue …
renecannao Nov 24, 2025
9ba7a76
Revert "Fix SQLite 'table already exists' errors during PROXYSQL STOP…
renecannao Nov 27, 2025
60bf26a
Fix SQLite 'table already exists' errors during PROXYSQL STOP (issue …
renecannao Nov 27, 2025
9ee2bf6
Clean up PgSQL_Thread: remove unused MySQL variable assignment
renecannao Nov 27, 2025
cbc1313
Clean up PgSQL_Session: remove commented out MySQL variables and dead…
renecannao Nov 27, 2025
c467a4a
Merge pull request #5223 from sysown/fix-5221
renecannao Nov 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/PgSQL_Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -1050,10 +1050,10 @@ class PgSQL_Threads_Handler
bool query_cache_stores_empty_result;
bool kill_backend_connection_when_disconnect;
bool client_session_track_gtid;
bool enable_client_deprecate_eof;
bool enable_server_deprecate_eof;
bool enable_load_data_local_infile;
bool log_mysql_warnings_enabled;
//bool enable_client_deprecate_eof;
//bool enable_server_deprecate_eof;
//bool enable_load_data_local_infile;
//bool log_mysql_warnings_enabled;
int data_packets_history_size;
int handle_warnings;
char* server_version;
Expand Down
42 changes: 42 additions & 0 deletions include/proxysql_glovars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,50 @@ class ProxySQL_GlobalVariables {
unsigned long long start_time;
bool gdbg;
bool nostart;
/**
* @brief Disable/Enable the MySQL Monitor module.
* @details Meant to be configured as an startup switch. Possible to change it's value only via a
* command line switch or via config file option.
*/
bool my_monitor;
/**
* @brief Disable/Enable the PostgreSQL Monitor module.
* @details Meant to be configured as an startup switch. Possible to change it's value only via a
* command line switch or via config file option.
*/
bool pg_monitor;
/**
* @brief Disable/Enable the MySQL Workers module. This disables ProxySQL capability for handling
* MySQL traffic to be routed to the MySQL backend servers.
* @details Meant to be configured as an startup switch. Possible to change it's value only via a
* command line switch or via config file option. Disabling this module doesn't affect MySQL
* Monitoring.
*/
bool mysql_workers;
/**
* @brief Disable/Enable the PostgreSQL Workers module. This disables ProxySQL capability for handling
* PostgreSQL traffic to be routed to the PostgreSQL backend servers.
* @details Meant to be configured as an startup switch. Possible to change it's value only via a
* command line switch or via config file option. Disabling this module doesn't affect PostgreSQL
* Monitoring.
*/
bool pgsql_workers;
/**
* @brief Disable/Enable MySQL Admin module. This disables access, via MySQL protocol, to
* ProxySQL Administration interface.
* @details Meant to be configured as an startup switch. Possible to change it's value only via a
* command line switch or via config file option. It's important to notice that Administrative access
* remains possible via PostgreSQL Admin interface, if enabled.
*/
bool mysql_admin;
/**
* @brief Disable/Enable PostgreSQL Admin module. This disables access, via PostgreSQL
* protocol, to ProxySQL Administration interface.
* @details Meant to be configured as an startup switch. Possible to change it's value only via a
* command line switch or via config file option. It's important to notice that Administrative access
* remains possible via the MySQL Admin interface, if enabled.
*/
bool pgsql_admin;
bool version_check;
#ifdef SO_REUSEPORT
bool reuseport;
Expand Down
13 changes: 13 additions & 0 deletions include/proxysql_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,14 @@ enum proxysql_session_type {
PROXYSQL_SESSION_NONE
};

// Stop state enumeration for PROXYSQL STOP command (issue 5186)
// Used to manage admin query access during module stop/start cycle
enum proxy_stop_state {
STOP_STATE_RUNNING = 0, // Normal operation, all modules running
STOP_STATE_DRAINING = 1, // Admin queries being drained, modules stopping
STOP_STATE_STOPPED = 2 // Modules stopped, only safe queries allowed
};

#endif /* PROXYSQL_ENUMS */


Expand Down Expand Up @@ -959,6 +967,11 @@ struct _global_variables_t {
bool nostart;
int reload;

// Stop state management for PROXYSQL STOP command
// See issue 5186: Fix query handling after PROXYSQL STOP
volatile int stop_state;
uint64_t active_admin_queries;

unsigned char protocol_version;
char *mysql_server_version;
uint32_t server_capabilities;
Expand Down
Loading
Loading