mirror of https://github.com/sysown/proxysql
fix/postgresql-cluster-sync_2
release-notes-3.0.6-4.0.6-draft
v3.0.6-add-tap-test_stats_table_check
v3.0_pgsql-copy-error-recovery-issue-5415
session-track-system-variable
v3.0-unified-large-pr
v3.0-noise-testing
v3.0-ff_inspect
v4.0-mcp-stats2
v3.0-5384
v3.0
v3.0-ai260221
v3.0-misc0221
v2.7.3-test260221
v3.0-pgsql_monitor_repl_lag
v3.0-2233
v3.0_3596_3597
v3.0_fix-pgsql-extended-query-routing_5387
v3.0-5243
v3.0-tsdb-feature
v4.0-mcp-stats
v3.0_pgsql_advanced_logging
v3.0-set_parser_v3
copilot/uninstall-amazon-linux-2023
v3.0-MCP_multi
GH-Actions
v3.0_pgsql_meta_command_describe_table
fix-prometheus-labels-test
v3.0-test0213
v3.0_pgsql-prepared-statement-refcount-race-5352
v3.0_improve_mysql_monitoring_5256
tap-mcp-client
v3.0-openssl-fix
v3.0-fixes0212
v3.0-5069
agent-skill-tap-test
v3.0_pgsql-meta-cmd-admin-5365
v3.0-webui_2602
v3.0-fix_5256
v3.0-5359
v3.0-misc260209
v3.0-5355
v3.0.6-fix_rustc_check
v3.0-mac3
v3.0_mac2
v3.0-scram_strtok
v3.0_mac
v3.0.6-revert_build_image_versions
v3.0.6-implement_FLUSH_STATS
fix/remove-wrong-index-connection-cleanup
v3.0-merge-v4.0-genai
fix-genai-critical-issues
v3.0.6-add_fedora43
copilot/sub-pr-5329
gh-pages
feature/modern-docs
v4.0
v4.0_rag_ingest_sqlite_server
v4.0-fix-vec-search
v4.0-rag_tools_stats
v4.0_rag_ingest_2
v4.0_rag_sys_prompt
v3.0.6-fix_reg_test_5233_set_warning-t
v4.0-mcp_rules_test
v4.0_rag_mcp
v4.0-tsdb1
v4.0-tsdb
pr-5312-fixes
feature/v4-docs-init
v4.0-update-docker-build-image-versions
otel_system_libs
otel_clean
v3.0-5288
otel
otel_2
v3.0.6-bump_version
v3.0_fix-pgsql-threshold-deadlock_5300
v3.0_pg-cancel-terminate-backend-param-support_5298
fix/postgresql-cluster-sync
v3.0-releate_notes_scripts_fixes
v3.0_fix_reg_test_5233_set_warning-t_test
v3.0.5-groups.json_add_missing_test
v3.0_pgsql-use-ssl-issue-5284
v3.0-misc260111
v3.0_buildTap
v3.0_bind-format-issue-5273-fix
v3.0-poll_doc
test_gh-actions_triggers
v3.0-timezone-parser-fix
v3.0-keylog_doc
v3.0_5272
v3.0_fork
v3.0_readme_update_postgres
v3.0_restapi_improvement
v3.0_mysql_monitor_crash_5256
v3.0.5-bump_version
v3.0-304release
v3.0-304-docInstall
v3.0-misc251220
v3.0-handle_unexp_ping
v3.0_mysql_monitor_cur_cmd_cmnt_fix
v3.0_pgsql-query-digest-gen-5253
misc251219
v3.0-set_testing_version
v3.0-issue5248
feature/gtid-range-update
v3.0_pgsql-monitor-sslsupport-5205
v3.0-issue5246
v3.0-issue5244
v3.0_get_server_version
v3.0_wait_timeout
v3.0-5062_2
v3.0-5062
postgresql-digest-testing-improvement
v3.0.4-rpm_spec_rework
v3.0_refactor_prepared_statement_cache_design_5211
v3.0.agentics
fix/issue-4855
v3.0_select_auto_commit
v3.0-5218
fix-5221
v3.0-5212
v3.0.4-add_opensuse16
refactor-gtid-events-count
refactor-gtid-events-count_doc
fix/5186-proxysql-stop-admin-crash
v3.0-4951
add-claude-github-actions-1763877527835
fix-rpm
feature/add-tap-test-documentation
v3.0-DS_crash
add-claude-github-actions-1763663272333
add-claude-github-actions-1763663091346
add-claude-github-actions-1763663091411
v3.0_FastForwardGracefulClose
v3.0.4-balance_test_groups
add-claude-github-actions-1763476725261
add-claude-github-actions-1763476725489
v3.0.4-bump_version
v3.0_optimizations_and_stability
v3.0_refactor_monitoring_ping
v3.0_add_delay_tap_test
v2.7.3.1
v3.0-stmt_exec_bounds_check
v3.0-fix_proclist_use_after_free
v3.0-fullauth_sid
v3.0_default_interface_global_var_5189
v3.0_add_delay_watchdog
v3.0_bind_fmt_patch
v3.0_admin_cmd_5170
v3.0.3-revert-opensuse16
v3.0-fix_use_after_free_in_pgsql_proclist
v3.0-fix_test_server_sess_status
v3.0-fix_use_after_free_in_proclist
v3.0.3-tap_groups_fix
revert-gtid-refactoring
v3.0_optimise_extended_query_response
v3.0.3-upgrade_json
fix-rest-api-tap-test
v3.0.3-upgrade_coredumper
crash-sqlite-max-len
v3.0-debug_log_pass
v3.0.3-makefiles_cleanup
v3.0_assert_to_warning
revert-5129-include_settings_information_schema_stats_expiry
v3.0_disable_pgsql_prometheus_5159
v3.0_pgsql_stat_activity_issue_4682
v3.0.3-upgrade_deps
v3.0.3-upgrade_curl
v3.0_transaction_alias_support_5152
v3.0.3-upgrade_clickhouse
v3.0.3-upgrade_sqlite3
v3.0.3-upgrade_libmicrohttp
v3.0_track_search_path_param_5148
v3.0_parameter_status_case_sensitive_issue_5145
v3.0_datestyle-parser-tweak
v3.0_fix-describe-portal-nodata-empty-query
v3.0_bind_fmt_bug_fix_5140
v3.0.3-add_debian13_builds
v3.0.3-add_centos10_builds
v3.0.3-add_fedora42_builds
v3.0_pgsql_query_cancel_terminate_issue_5136
v3.0_extended_query_pgsql_query_rules_5132
v3.0_postgres_query_logging_issue_5123
5127.changelog.update
v3.0_clang_compilation_fix
v3.0_extend_multiplex_status_test
v3.0_extended_query_protocol_issue_5118
v3.0_extended_query_protocol_phase_2
add_action_php_pdo_pgsql
v3.0_issue_5101
v3.0.sonar-cli
v3.0_issue_5102
v3.0_issue_5100
v3.0.sonar-config
v3.0_fix_issue_5086
v3.0_extended_query_protocol
v3.0.3-bump_version
v3.0_session_param_reset_connection
otel-tracepoint
v3.0_mirror_crash_fix
v3.0-pgsql_mon_table_fix
v3.0_qp_mem_leak_fix
v3.0.2-merge-upgrade_deps-add_new_distros
v3.0.2-upgrade_deps
v3.0-4976
v3.0.2-add_new_distros
v3.0-add_more_testing_groups-v2
v3.0-add_more_testing_groups
v3.0-upgrade_prometheus-cpp
v3.0_mysql_deprecate_native
v3.0-upgrade_json
v3.0-upgrade_sqlite3
v3.0-upgrade_libmicrohttpd
v3.0-upgrade_curl
v3.0-add_centos10_builds
v3.0-add_fedora42_builds
v3.0_PG_PrepStmt
v3.0_structured_libpq_error_message
v3.0-bump_version_to_3.0.2
v3.0-ReadySet1
v3.0-4935
v3.0-sliced_groups
v3.0-4861_fixes1
v3.0_track_transaction_param_state_4907
v3.0-4918
v3.0-4930
v3.0-build_tap_tests_in_container
v3.0_unknown_param_crash_fix_4919
v3.0_read_only_action_deprecated
v3.0-4861-mysql-logging_prepared_statement_parameters
v3.0-ff_conns_eof_caps_match
v3.0_refactor_connection_info_param
v3.0_reg_4867_tap_test
v3.0-4727
v3.0_auth_negotiation
v3.0-4877
v3.0-sqlite3_permission
v3.0-pass_env_to_docker
v3.0-4803_20250313
v3.0_shutdown_debug
v2.7
v2.7-fix_run_name
v3.0-fix_run_name
v3.0-ci_fixes_172
v3.0_improve_copy_stdin
v3.0_issue_4867
v3.0-4856
v3.0_session_parameter_tracking
v3.0_4799_4827
v3.0-3687
v2.7-pmm_runtime_servers_metrics
v2.7-4839
v3.0-4839
v2.7-4841
v2.7-bump_version_to_2.7.3
2.6.6-4841
v3.0-flush_debug
v3.0_collation_255
v2.x_pg_PrepStmtBase_240714
v3.0-4803-4817
v3.0-4803
v2.7-minorBugs
v3.0_debugFastLog
v3.0-privates
v3.0_compression_test_fix
v3.0-rev4806
v3.0-SetThreadName_optional
v3.0-rm_malloc_conf_on_version
v3.0-fix_aux_threads_ssl_leaks
v3.0-fix_ssl_params_leak
v3.0-conns_eof_caps_match
v2.x-logging_mem_2
v2.7_fix
v2.7_amd64_build_fix
v2.7-fix_aux_threads_ssl_leaks
v2.7-fix_ssl_params_leak
v2.7-rm_malloc_conf_on_version
v2.7_compression
v3.0_compression
openssl_enhancement
v3.0-actions-add-3p-test-parameter
v2.7-actions-add-3p-tests-parameter
v3.0_notice_support
v3.0-fix-builds
v3.0_dynamic_fast_forward
none
ssl_dynamic_lib
v3.0-fix_hang_on_resume
v2.7-fix_hang_on_resume
v3.0-remove-obsolete-distros
v3.0_refactor_query_cache
v2.x-logging_mem
v2.7_servers_defaults
v3.0_ssl_warnings
v3.0_copy_out_support
v3.0_randomized_cache_ttl
v3.0_issue_4707_threshold_resultset_size
v3.0-mariadb_column_metadata_integrity_check
v2.7-mariadb_column_metadata_integrity_check
ssl_optimization
v3.0-postgres_read_only
v2.7_reg_test_4716_single_semicolon
v2.7_issue_4707_threshold_resultset_size
v2.7_reg_test_4723_query_cache_stores_empty_result
2.7_randomized_cache_ttl
v3.0_env_opt_support
v3.0-fix_ubuntu24_fedora41_builds
v3.0_fix_multiple_builds
v3.0_servers_defaults
v3.0-bump_version_to_3.0.1
v3.0_reg_test_4716_single_semicolon
v2.7-update_actions_triggers_v2
v3.0-update_actions_triggers_v2
v3.0_test_aurora_build
v3.0_mem_leak_fixes
v3.0_escape_connection_param
v3.0_clang_linking_fix
v3.0-postgres_monitor_poc
v2.7-update_actions_triggers
v3.0_unsupported_features_error
v3.0_remove_pkgroot
v3.0_md5_auth_support
v3.0-update_actions_triggers
v3.0_pgsql_digest_stats_tables
v3.0-add_pkglist_targets
v2.7-bump_version_to_2.7.2
v3.0-doc240920
v3.0-4658_4659
v3.0_obsolete
v2.6
v2.7-4658_4659
v2.6_dns_cache_fixes
v2.7_dns_cache_fixes
v2.6.x-update_triggers
v2.6-4646
v2.7-4646
v2.7-PackageSpeedup
v2.7.1-update_actions
v2.7.1-add_fedora41
v2.7.1-update_gh_triggers
v2.7.1-bump_version_to_2.7.1
v2.7-update_version_to_2.7.0
v2.x
v2.x-4628
v2.x_stats_digest_uppercase
v2.x_proxy
v2.x-4589
v2.x-fix_connpool_metrics_init_val
v2.x-fix_change_user_assert
v2.6.x-use_versioned_build_images
v2.6.x-add_test_groups
v2.x-4612
v2.6.x-fix_gcov_files
v2.x_4598
v2.x-AT
v2.x-backend_conns_ssl_err_clear
v2.x-client_ssl_busy_wait
v2.6.4-fix_fedora40_arm64_build
v2.x-240708
set-thread-names
v2.x-POLLHUP
v2.x_240702
x509_mmap
v2.x-4572
v2.6.x-testing-global-multiplexing-disabled
v2.x-4567
v2.6.x-update_to_openssl_3.3.1
use-wrlock-in-dns-cache-empty
v2.6.x-fix_use_local_includes
v2.x-digest_spaces_fix
v2.6.x-fix-darwin
v2.6.x-freebsd_fixes
v2.x_monitor_slave_lag_when_null_4521
v2.x-fix_cluster_leaks
v2.x-disable_ssl_tickets
v2.6.x-ubuntu24-fedora40
v2.x_hostgroup_online_servers
fix-tests-build
v2.x_240429-2
v2.x_240429
v2.x_240427
v2.x_240424
v2.x-admin_list_ciphers
v2.x_240421_fixes
v2.x-4493
v2.x-4510
v2.x_240421
v2.6.x-freebsd_fixes_2
v2.x-jemalloc_defaults
v2.x-4491
v2.6.x-fix_docker_compose
2.x-AWS_RDS_autodiscovery
v2.x-stmt_explain
v2.x-sqlite3_pass_exts-2
v2.x-caching_sha2_compress
v2.x-ps3371
v2.x-restartbackoff
v2.x-doc240320
v2.x-sqlite3_pass_exts
v2.x-tap_tests_opt_ssl
v2.6-4466
v2.x-clang_cppdotenv
v2.6.0-update_to_libhttpserver_v0.19
v2.x_Servers_SSL_Params
v2.x_sha2pass_draft3
v2.x_openssl_verify_load_cacert_duration
v2.x_memleak_fix_stats_mysql_prepared_statements_info
v2.x_shun_replication_lag
v2.6.0-fix-test_ssl-poolout
v2.x_dns_stale_record_fix
v2.x_router_2ports
v2.6.0-update_to_openssl_v3.2.1
v2.6.0-update_to_openssl_v3.1.5
v2.6.0-fix-package-licensing
v2.x-2411025
v2.x-profiling_poc1
v2.6.0-4437-deprecate-old-distros
v2.x-4438
v2.x-year
v2.x-4335
v2.x-4241
v2.x-pause_status
v2.x-4396
v2.x-4355
v2.x-2091
v2.x-aurora_autodiscovery-refactor_cluster_mysql_servers-gr_bootstrap_mode
v2.x_issue_4399
v2.x-4415
v2.x_fixed_tap_rpath
v2.6.0-set_testing-240-iterate-all-rhg
v2.x_update_mariadb_connector_to_3.3.8
v2.6.0-clang-fix
v2.x_unified_makefile_fixes
v2.x_issue_4402
v2.x_sha2pass_draft2
v2.x_cleanup231208
v2.x-webui_fixes
v2.6.0-centos9
v2.6.0-more-makefile-fixes
v2.x_warning_support
v2.x_testing_ci_test_failures
v2.x_issue_4380
v2.x_no_reg_test_3273
v2.x-set_testing_fix
v2.x-depr_checksum_vars_fix
v2.x-20230914_test
v2.x-20230913_test
v2.5.5-branch
v2.5.5-branch_255_patches
v2.x-aurora_autodiscovery-refactor_cluster_mysql_servers-gr_bootstrap_mode_2
v2.x_mysql_connector_j_fixes
v2.6-deprecate_old_clickhouse_2
v2.6-deprecate_old_clickhouse
v2.x-4300
v2.x_update_dns_records_count
v2.x-clickhouse230726
v2.6.0-tap_test_fixes
v2.x-4272
v2.x-4264
v2.x-fast_routing_race_cond_fix
v2.x_refactor_cluster_mysql_servers
v2.x-aurora_autodiscovery
v2.x_read_only_actions_offline_hard_servers
v2.x-patch_libdaemon_umask
v2.x-prometheus0717
v2.x-change_user_compression
v2.x-zd70545
v2.x-aurora_autodiscovery_shunned_promotion
v2.x-tap20230609
v2.x_unix_socket_ssl
v2.x_ssl_support_kill_query
v2.x_ssl_keylog_support
v2.x-dynamic_test_mysql_query_rules_fast_routing
v2.x_coredump_stats_fix
v2.x_issue_4194
v2.x-test20230530
v2.x-poll_optimization
v2.x_troubleshooting-feature
v2.x-fix_charset_init_handshake
v2.x_sha2pass_draft2-TEST
v.2x_dns_cache_issue_4210
v2.x-gr_autodiscovery
v2.x-hostgroup_attributes_servers_defaults
v2.x_dns_cache_update_message
v2.x-ssl3_warnings2
v2.x-log_insert_id2
v2.x-cluster_sync_disabled_modules_checksums
v2.x-session_track_system_variables_v2
v2.x-status-variables-for-set-stmts
v2.x-enable_session_state_trackers
v2.x-increase-logging-eof_fast_forward-t
v2.x-3863-special-query
v2.x-session_track_system_variables
v2.x_refactor_read_only_action
v2.x_sha2pass_draft1
CodeQL
v2.x-3863
v2.2.0-sqliteserver_read_only
v2.x-digest_umap_aux-comparison
v2.4.8
v2.x-HG_init_connect
v2.x-4105_4114
v2.x-3583-server_closed_conn
v2.x-4066-upgrade_deps
v2.x-group_replication_rework-SHUNNED_promotion
v2.1.0-var-global-multiplex
v2.x-CI-hostname-tap-test-fixes
v2.x-limit-version-check
v2.x-fix_deprecate_eof_warning
v2.x-3698
v2.x_tidb_replica_read
v2.x-HostGroups_attributes
v2.0.18.221009
v2.x-ci_reg_test_3273_ssl_con
TAP_test_restapi
v2.x-tap_tests_groups
v2.x-tap_test_sqlite3_server-t
PRS_3888_3903_2
PRS_3888_3903
v2.x_code_refactor_2206
v2.x-multipacket_poc_1
v2.x-impr_hg_latency_obsv
v2.x-gcc-warnings
v2.x-hg_lock_session_id
v2.x-3768
v2.x-3371
v2.x-ci_verifications
v2.x-thread_local_qps_limit
v2.x-parser_table
v2.1.1-3207
v2.x-qps_limits
v2.x-3711
v2.x-3642
v2.x-3674
v2.x-ssl3_warnings
V2
v2.3.2
v2.3.2_3646_3647
v2.x-client_err_limit_conn_timeout
v2.x-keep_multiplexing_regression_fix
v2.3.2-3628
v2.2.2-to-v2.3.0-7
v2.2.2-to-v2.3.0-7_merge
v2.2.2-to-v2.3.0-6
v2.2.2-to-v2.3.0-6_merge
v2.2.2-to-v2.3.0-5
v2.2.2-to-v2.3.0-4
v2.2.2-to-v2.3.0-3
v2.2.2-to-v2.3.0-2
v2.2.2-to-v2.3.0-1
v2.3.1
v2.0.14-70226
v2.3.0
v2.x-client_err_limit-gr_replication_lag_action
v2.2.2
v2.2.1-3603
v2.2.1-centos7-ASAN
v2.2.1
v2.2.1-3601
v2.2.1-3599
v2.2.1-3597
v2.2.1-3595
v2.2.0-restapi_server_exc_log
v2.x-3574
v2.x-3558
v2.2.0-3546-centos-7-gcc-8
v2.x-3549
v2.x-cluster_large_mysql_users
v2.x-cov_ci_verification
v2.0.14-tb1
v2.0.14-tb1-3494
v2.0.14-tb1-3488
v2.0.14-tb1-3117
v2.0.14-tb1-2762
v2.0.14-2762
v1.4.13-arm
v2.1.1-3296
v2.2.0
v2.0.18
v2.1.1
v2.0.18-3342
v2.0.18-3182
v2.1.1-3184
v2.1.0-revert-da7fdfe14
v2.0.18-revert-da7fdfe14
v1.4.13-70160
v2.0.18-3354
v2.0.18-3350
v2.0.14-3339
1.4.13-70160
v2.0.18-3339
v2.1.1-3317
v2.1.1-3319
v2.0.18-3317
v2.1.2-LBalgo
v2.0.18-1574
v2.1.2-hgman
v2.0.17
v2.1.0
v2.0.17-3288
v2.0.17-3276
v2.0.17-3273
v2.0.16
v2.0.16-3267
v2.0.16-3265
v2.0.16-3262
v2.0.16-3261
v2.1.1-3252
v2.1.1-collation
v2.0.16-3252
v2.0.16-collation
v2.1.0-3238
v2.1.0-parser
v2.0.16-3219
v2.0.16-3216
v2.0.16-3201
v2.0.16-2330
revert-3191-v2.0.16-3190
v2.0.16-3204
v2.0.16-3177
v2.0.16-2619
v2.0.16-3190
v2.0.16-3187
v2.1.0-70118
v2.0.16-3133
v2.0.16-3133_ci_verification
v2.0.16-3150
v2.0.16-change_user
v2.0.15
v2.0.15_amd64_fix
v2.0.15_arm64_packages
v1.4.14-ssl
v2.0.15_arm64
v2.1.0-2820
v2.0.15-sslbug
v2.0.15-KillTrx
v2.0.14
v2.0.14-ch_build_fix
v2.0.14-focal
v2.0.14-valgrind20200904
v2.1.0-3042
v2.0.14-3035
v2.0.14-3036
v2.0.14-2955
v2.0.14-vars
v2.0.14-3005
v2.0.14-3003
v2.0.14_2970_2979
v2.0.14-NOTSOCK
v2.1.0'
v2.0.14-2958
v1.4.10-zd
v2.0.13
v2.0.13-autocommit_fix
v2.1.0-2892
v2.0.13-2711
v2.0.13-duplicated_variables
v2.0.13-duplicated_variables_for_2.1.0
v2.0.12-deprecate_eof
v2.1.0-1377
v2.1.0-admin_queries
v2.0.12-var-global-multiplex
v2.1.0-var-foreign-key
v2.0.12
v2.0.12-tab-small-log
v2.0.12-var-foreign-key
v2.0.12-var-long-query-time
v2.0.12-galera-shunned
v2.1.0-admin_queries_2
v2.1.0-tap-rm-config
v2.0.12-tap-rm-config-test
v2.1.0-QP_stmt_3
v2.0.11-fix-multi-2-ci
v2.0.11-fix-multi
v2.0.11-266_0-3
2.1.0
v2.0.11
v2.1.0-track-vars
v2.1.0-track-variables
v2.0.11-track-variables
v2.0.11-2526
v2.0.11-tap-tests
v2.0.13-2698-commit1
v2.0.10-galera-pxc-maint-mode
v2.0.11-track-vars
v2.0.10-2647
v2.0.11-track
v2.0.11-track-session-vars
v2.0.9-var-array-review
v2.0.11-stats
v2.0.10
v2.0.10-centos67
v1.4.14.2
1.4.14.2
v1.4.14-show-warnings
v2.0.9
v2.0.9-var-array_2
v2.0.9-var-array
v1.4.16
v2.0.8
val214-changing_charset
v2.0.6
v1.4.16-1922_2
v1.4.13.2
v2.0.4-charset248
v2.0.5
v1.4.10-67841
v2.0.4
v2.0.4-sqlite327
v2.0.3
v2.0.2
v1.4.15
v2.0.1
v1.4.14
v2.0.0
v1.4.14-ping_shun
v1.4.14-1828
v1.4.14-latency_awareness
v1.4.12
v1.4.13-admin_deadlock
v2.0.0-improve_speed
v1.4.13
v1.4.13-autocommit_revert
v1.4.11.2
v1.4.13-ps
v2.0.0_bionic_deb_fix
v2_962
v1.4.12-1640
v1.4.11-names_tz
v1.4.12-1693
master
v1.4.11
v1.4.10
v1.4.6
v1.3.10
jenkins_test
v2.0.0-cachegrind
v1.4.9
v2.0-lab
v149_1511
v149_1382
v1.4.7-f2
v1.4.7-f1
v149_1491
v1.4.5-kub
v1.4.8
v2.0-web2
v1.4.3
v1.4.7
bsd_install_update
v1.4.2
v1.4.1-ch2
v1.4.1
v1.3.9
v1.4.1-ch
v1.3.8
v1.3.8-dev
v1.3.7
v1.3.7-dev
v1.3.6-dev
v1.4.0-clickhouse
v1.4.0
v1.3.6
v1.3.5
v1.3.5-dev
v1.4.0-955
v1.3.4
v1.3.4-dev
v1.3.3
v1.3.3-dev
v1.3.2
v1.3.2-dev
v1.3.2-766
v1.3.0h
v1.3.1-utf8mb4
1.4.0-840
v1.3.1
v1.2.6
v1.3.0
v1.4.0-797
v1.2.5-715
v1.2.5
v1.2.4-lowmem
v1.3.1-dev-mem
v1.2.0
connleak
lab-1.2.0
v1.1.2
T107_add_proxysql_consul_requirements
T89_write_consul_integration_doc
T98_consul_multi_table_config
mongoose
evhttp
SQLiteServer
1.0
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
2.7.3
2.6.6.1
3.0.1
2.7.2
3.0.0
2.6.6
2.7.1
2.7.0
2.6.5
2.6.4
2.6.3
2.6.2
2.6.1
2.5.5
2.6.0
2.5.4
2.5.3
2.5.2
2.5.1
2.4.8
2.5.0
2.4.7
2.4.6
2.4.5
2.4.4
2.4.3
2.4.2
2.4.1
2.4.0
2.3.2
2.3.1
2.3.0
2.2.2
2.2.1
2.2.0
2.0.18
2.1.1
2.0.17
2.0.16
2.0.15
2.0.14
2.0.13
2.0.12
2.0.11
2.1.0
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
1.4.16
1.4.15
2.0.1
1.4.14
1.4.13
1.4.12
1.4.11
1.4.10
1.3.10
1.4.9
2.0.0
1.4.8
1.4.7
1.4.6
1.4.4
1.4.3
1.4.2
1.3.9
1.3.8
1.4.1
1.3.7
1.4.0
1.3.6
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0h
1.3.0g
1.3.0f
1.3.0e
1.3.0d
1.3.0c
v1.3.0b
1.4.5
v1.1.0
v1.1.0-rc
v1.1.1-beta
v1.1.1-beta.1
v1.1.1-beta.2
v1.1.1-beta.3
v1.1.1-beta.4
v1.1.1-beta.5
v1.1.1-beta.6
v1.1.2
v1.2.0a
v1.2.0b
v1.2.0c
v1.2.0d
v1.2.0e
v1.2.0f
v1.2.0g
v1.2.0h
v1.2.0i
v1.2.0j
v1.2.0k
v1.2.1
v1.2.2
v1.2.3
v1.2.4
v1.2.4.0923
v1.2.5
v1.2.6
v1.3.0
v1.3.0a
v1.3.0g
v1.3.0h
v1.3.1
v1.3.10
v1.3.2
v1.3.2-1
v1.3.3
v1.3.4
v1.3.5
v1.3.6
v1.3.7
v1.3.8
v1.3.9
v1.3.9-prev.1
v1.4.0
v1.4.1
v1.4.10
v1.4.11
v1.4.12
v1.4.13
v1.4.14
v1.4.15
v1.4.16
v1.4.2
v1.4.3
v1.4.4
v1.4.5
v1.4.6
v1.4.7
v1.4.8
v1.4.9
v2.0.0-beta.1
v2.0.0-rc1
v2.0.0-rc2
v2.0.1
v2.0.10
v2.0.11
v2.0.12
v2.0.13
v2.0.14
v2.0.15
v2.0.16
v2.0.17
v2.0.18
v2.0.2
v2.0.3
v2.0.4
v2.0.5
v2.0.6
v2.0.7
v2.0.8
v2.0.9
v2.1.0
v2.1.1
v2.2.0
v2.2.1
v2.2.2
v2.3.0
v2.3.1
v2.3.2
v2.4.0
v2.4.1
v2.4.2
v2.4.3
v2.4.4
v2.4.5
v2.4.6
v2.4.7
v2.4.8
v2.5.0
v2.5.1
v2.5.2
v2.5.3
v2.5.4
v2.5.5
v2.6.0
v2.6.1
v2.6.2
v2.6.3
v2.6.4
v2.6.5
v2.6.6
v2.7.0
v2.7.1
v2.7.2
v2.7.3
v3.0.0-alpha
v3.0.1
v3.0.2
v3.0.3
v3.0.4
v3.0.5
${ noResults }
42 Commits (9685cdaa4b87e2cd5be9584c46dca42d9703934d)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
9685cdaa4b |
mcp discovery: enforce target-scoped run model and add protocol-aware static harvesting (mysql+pgsql)
Refactor the MCP query/discovery stack to remove prototype-era MySQL-only assumptions and make discovery/catalog semantics explicitly target-scoped. This commit is intentionally not backward compatible with legacy single-target catalog metadata. Key implementation details: - Discovery_Schema: - runs table now stores target_id, protocol, and server_version - resolve_run_id() now requires target_id and resolves schemas within target scope - create_run() now records target/protocol/server version - added legacy schema detection + destructive catalog table rebuild when old runs layout is found - fixed resultset lifetime/escaping issues in target-aware run resolution - New PostgreSQL static harvester: - added PgSQL_Static_Harvester class and build wiring - harvests schemas/objects/columns/indexes/fks/view definitions into Discovery_Schema - maps pg metadata to object_id-based insert APIs used by Discovery_Schema - Query_Tool_Handler: - constructor simplified to catalog_path only (no mcp-mysql_* runtime ctor deps) - discovery.run_static now requires target_id and dispatches protocol-aware harvester at runtime - catalog.*, agent.run_start, and llm.* tool contracts now require target_id when resolving run_id - all run_id resolution call sites switched to resolve_run_id(target_id, ...) - list_schemas catalog query now scoped by target_id via runs join - digest logging path now resolves run_id in target context - ProxySQL_MCP_Server: - updated Query_Tool_Handler construction to new signature - Docs updated: - added explicit target_id scoping guidance for discovery/catalog/agent/llm workflows - clarified protocol-aware routing and noted legacy examples still present in large script docs Build validation: - Recompiled changed objects with PROXYSQLGENAI=1: - Query_Tool_Handler.oo - Discovery_Schema.oo - PgSQL_Static_Harvester.oo - ProxySQL_MCP_Server.oo |
6 days ago |
|
|
7e54883ba5 |
mcp query debugging: surface rule-id context for blocks and add backend failure SQL details
Observed confusion:
- MCP failures like 'Error 100' / 'Error 101' were visible at endpoint level but gave no direct clue whether they came from query-rule blocks or backend execution failures.
- Connection/firewall-style failures also lacked enough target/query context in lower-level logs.
Changes in this commit:
1) Log MCP query-rule block/OK matches with rule id and context
- In Discovery_Schema::evaluate_mcp_query_rules():
- when error_msg rule action is applied, log:
rule_id, tool, target_id, schema, error_msg, query preview.
- when OK_msg rule action is applied, log:
rule_id, tool, target_id, schema, ok_msg.
- This makes it explicit which runtime_mcp_query_rules row produced the returned error.
2) Add detailed backend execution error logs in Query_Tool_Handler
- For MySQL and PostgreSQL execution paths (with and without schema switching), failures now log:
- target_id
- schema (when applicable)
- backend error text
- SQL query text
- Added context for PG search_path failures too.
- This disambiguates rule-block errors from actual backend connectivity/authorization/firewall failures.
Behavioral notes:
- API responses are unchanged (to avoid breaking tests expecting exact messages).
- Logging is now sufficiently descriptive to trace each failure to either:
- a specific MCP rule id/action, or
- a concrete backend execution error.
Validation:
- Recompiled successfully:
- lib/obj/Discovery_Schema.oo
- lib/obj/Query_Tool_Handler.oo
|
7 days ago |
|
|
f15460348c |
mcp query diagnostics: include runtime hostgroup status breakdown when target lacks ONLINE backend
Adds targeted debug context for non-executable MCP targets. When Query_Tool_Handler reports that a target has no ONLINE backend, it now appends a status summary read from the corresponding runtime server table for that hostgroup: - MySQL: runtime_mysql_servers - PostgreSQL: runtime_pgsql_servers Example diagnostics now include status aggregates such as: - ONLINE=0, SHUNNED=1 - OFFLINE_SOFT=1 - no rows in runtime_*_servers for hostgroup X This closes the observability gap where users saw 'target non-executable' but could not immediately tell why the hostgroup failed ONLINE eligibility. Validation: - Recompiled lib/obj/Query_Tool_Handler.oo successfully. |
7 days ago |
|
|
f4bc1943fb |
mcp query diagnostics: restore strict ONLINE requirement and explain target non-executable failures
This change does two things:
1) Reverts executable-target policy to strict ONLINE backend status
- Query target resolution in Query_Tool_Handler is restored to require UPPER(status)='ONLINE' in runtime_mysql_servers/runtime_pgsql_servers.
- This matches expected semantics: non-ONLINE backends should not be considered executable MCP targets.
2) Replaces generic non-executable errors with actionable diagnostics
- Added Query_Tool_Handler::format_target_unavailable_error(target_id).
- All query-tool paths that previously returned the generic:
'Target is not executable by this handler'
now return a reasoned error with context, including:
- target_id
- protocol
- hostgroup_id
- auth_profile_id
- concrete reason (for example: empty db_username in auth profile, or no ONLINE backend in runtime_*_servers)
- Internal logs in get_connection()/get_pgsql_connection() now emit the same detailed reason.
3) Improves MCP endpoint failure logging with SQL/target context
- In MCP_JSONRPC_Resource::handle_tools_call(), failed tool calls now log:
- endpoint/tool/error
- full arguments payload (existing)
- additional parsed details when present:
target_id, schema, sql (trimmed for safety)
- This makes it explicit what SQL was requested when a tool call fails before execution.
4) Protocol normalization retained for robustness
- MCP_Threads_Handler::load_target_auth_map() lowercases protocol values when loading runtime profile joins.
- This avoids protocol-casing drift causing inconsistent routing behavior.
Build validation:
- Successfully recompiled modified objects:
- lib/obj/Query_Tool_Handler.oo
- lib/obj/MCP_Endpoint.oo
- lib/obj/MCP_Thread.oo
Resulting behavior expected on next test run:
- If a target is non-executable, the response and logs will state exactly why (ONLINE/backend/auth reason), instead of a generic error.
- Failure logs will also include the attempted SQL text (for tool calls that carry sql arguments), clarifying whether a backend query was actually executed or blocked before execution.
|
7 days ago |
|
|
49f811a638 |
mcp query: stop misclassifying reachable targets as non-executable
Observed failure: - MCP tools received valid target_id values, but /mcp/query returned 'Target is not executable by this handler'. - This prevented rule evaluation, digest accounting, and hit counters from advancing, causing multiple TAP phases to fail. Root cause addressed in this commit: - Target endpoint resolution required runtime server status to be exactly ONLINE. - In practice, reachable backends can temporarily appear in other statuses (for example monitor-related transitions), while MCP direct connections with profile credentials are still valid. - Protocol casing inconsistencies could also lead to fragile routing behavior when profile data is consumed. Changes: 1) Relax backend eligibility during endpoint resolution - In Query_Tool_Handler::refresh_target_registry(), endpoint discovery now accepts any server status except OFFLINE_HARD. - ONLINE is still preferred deterministically via ORDER BY, but non-ONLINE candidates remain eligible for MCP execution. 2) Normalize protocol values to lowercase - In MCP_Threads_Handler::load_target_auth_map(), target protocol is normalized to lowercase when loaded from runtime profiles. - In Query_Tool_Handler::refresh_target_registry(), protocol is normalized again defensively before routing decisions. 3) Improve diagnostics for target executability - Added explicit warnings when: - a target resolves to a backend but has empty db_username, - a target has no eligible backend for its hostgroup/protocol. - These logs make it clear why a target is being marked non-executable. Expected behavioral impact: - MCP query tools should execute for valid target_id entries even when monitor status is not strictly ONLINE. - Query-rules blocking/rewriting/OK actions should be exercised again. - stats_mcp_query_rules hits and stats_mcp_query_digest counters should resume incrementing once queries run. Validation performed: - Recompiled modified objects successfully: - lib/obj/Query_Tool_Handler.oo - lib/obj/MCP_Thread.oo |
7 days ago |
|
|
6a788e48c4 |
mcp: make /mcp/query self-healing when targets/backends appear after startup
Problem addressed: - MCP query endpoint could stay unusable with 'Tool Handler not initialized' after restart/reload flows. - This was triggered when Query_Tool_Handler could not build an executable pool at init time (for example profiles loaded before ONLINE servers), leaving runtime commands like 'LOAD MCP QUERY RULES FROM MEMORY' blocked behind a NULL query tool handler. - Users had to manually toggle MCP enablement to recover, which is the opposite of expected self-healing behavior. What this commit changes: 1) Query_Tool_Handler pool init is now resilient and idempotent - init_connection_pool() now starts with close() so reinitialization fully resets stale mysql/pgsql pool state before rebuilding from runtime profile + server tables. - If no executable targets are available, init_connection_pool() now returns success with a warning instead of hard failure. This allows the query tool handler (and /mcp/query endpoint) to stay initialized even before backends are ready. 2) Lazy auto-rebuild on first query usage - get_connection() and get_pgsql_connection() now: - refresh target registry before resolution, - attempt to use an existing pooled connection, - if unavailable, trigger a full pool rebuild (init_connection_pool()) and retry once. - This provides automatic recovery when hostgroups/servers/profiles are loaded or changed after MCP startup, without requiring manual MCP disable/enable. 3) Admin runtime rule load path attempts MCP recovery - load_mcp_query_rules_to_runtime() now detects NULL query tool handler and calls load_mcp_server() once before failing. - This turns a hard, immediate admin error into a self-recovery attempt consistent with MCP runtime semantics. Behavioral impact: - /mcp/query endpoint remains online even when there are temporarily zero executable targets. - As soon as compatible runtime targets/backends exist, run_sql_readonly/explain_sql can recover automatically on demand. - LOAD MCP QUERY RULES TO/FROM RUNTIME no longer fails immediately on first NULL handler condition; it retries after MCP server recovery. Validation performed: - Recompiled modified objects successfully: - lib/obj/Query_Tool_Handler.oo - lib/obj/ProxySQL_Admin.oo - Full TAP runtime test execution is not possible in this sandbox due blocked local TCP socket creation; validation should be run in the normal test environment where ProxySQL/MySQL/PGSQL are reachable. |
7 days ago |
|
|
af0411bd46 |
MCP: add target-aware rules/stats tests, explain_sql rule coverage, and AI local docker TAP infra
This commit completes end-to-end MCP query-rules validation for multi-target routing and introduces a self-contained TAP infra for the `ai` group that can run both in Jenkins and manually. Main MCP/runtime changes: - Extended MCP query-rule matching context to include both `target_id` and resolved backend `username`. - Added `target_id` column to `mcp_query_rules` and `runtime_mcp_query_rules` table definitions. - Extended `stats_mcp_query_rules` to include `username` and `target_id` alongside `rule_id` and `hits`. - Updated load/save/runtime refresh paths to persist and rehydrate the expanded MCP rule schema. - Wired the rule engine into `explain_sql` so MCP rules apply consistently across `run_sql_readonly` and `explain_sql`. - Included startup-order fix in `src/main.cpp` to initialize MCP/GenAI thread handlers early, preventing startup crashes in PROXYSQLGENAI builds. Test coverage changes: - Updated existing MCP TAP phases to assert target-aware and username-aware behavior: - `test_phase4_stats.sh` - `test_phase6_eval_block.sh` - Added new MCP TAP phases: - `test_phase10_eval_explain.sh` (rule engine coverage for `explain_sql`) - `test_phase11_pgsql_target.sh` (pgsql target routing/rule/stats coverage; graceful skip if no pgsql target is configured) - Updated `test_mcp_query_rules-t.sh` runner to execute new phases. AI group isolated infra (manual + CI compatible): - Added `test/tap/groups/ai/docker-compose.yml` with MySQL 9.0 and PostgreSQL 16 backends. - Added lifecycle scripts: - `docker-compose-init.bash` - `docker-compose-destroy.bash` - `pre-proxysql.bash` - `post-proxysql.bash` - Extended `test/tap/groups/ai/env.sh` with local default ports/credentials/target IDs used by MCP TAP tests. - Added `test/tap/groups/ai/README.md` documenting manual execution flow outside Jenkins. Outcome: - MCP tests now validate routing-aware rule enforcement and stats attribution for both MySQL and PostgreSQL targets. - The `ai` TAP group can be run with an isolated local backend stack without relying on external Jenkins infra repositories. |
7 days ago |
|
|
013864b36f |
MCP: introduce profile-based target/auth routing and unified LOAD/SAVE MCP PROFILES commands
This commit introduces the core MCP routing architecture that decouples client-facing target selection from backend connection details. Architecture introduced: - New MCP auth profile table to store backend credentials/policy (`mcp_auth_profiles`). - New MCP target profile table to map opaque `target_id` -> protocol/hostgroup/auth profile (`mcp_target_profiles`). - Runtime mirrors for both profile tables. Behavioral changes: - MCP query tools resolve execution context by `target_id` and route internally by protocol + hostgroup. - Client no longer needs backend-specific connection details; only logical target identifiers. - Unified admin commands for profile lifecycle management: - `LOAD MCP PROFILES TO/FROM MEMORY/RUNTIME/DISK` - `SAVE MCP PROFILES TO/FROM MEMORY/RUNTIME/DISK` Design goals: - Support multi-backend MCP execution (MySQL + PostgreSQL) behind one endpoint. - Provide server-side credential management and cleaner operational model. - Replace legacy one-backend POC configuration with scalable target/auth abstractions. Result: - MCP routing is now dynamic, protocol-agnostic at the client layer, and fully managed through profile tables and unified load/save commands. |
7 days ago |
|
|
1af768f932 |
Fix critical issues in GenAI code (PR #5339)
This commit addresses critical issues identified in the PR review: 1. Build system redundancy (src/Makefile): - Remove redundant PROXYSQLGENAI conditionals in linking commands - The flag doesn't affect linking, so simplify to PROXYSQLCLICKHOUSE only 2. Missing PROXYSQLGENAI guard (lib/Admin_Handler.cpp): - Add #ifdef PROXYSQLGENAI around MCP VARIABLES DISK commands - Ensures MCP commands are only available when GenAI is enabled 3. Broken retry logic (lib/LLM_Clients.cpp): - Remove misleading is_retryable_error() checks that used stale values - last_curl_code and last_http_code were never updated - Simplify to retry on empty responses only (documented limitation) - Fix thread-safety: use thread_local std::mt19937 instead of rand() 4. Resource leak (lib/MySQL_Tool_Handler.cpp): - Clean up previously created connections on init failure - Both mysql_init and mysql_real_connect error paths now clean up 5. Race condition (lib/Query_Tool_Handler.cpp): - Add missing pool_lock in find_connection() - Prevents race condition when accessing connection_pool Fixes identified by automated PR review agents. |
3 weeks ago |
|
|
b965fc6df4 |
Fix PROXYSQLGENAI build - resolve circular includes and missing headers
This commit fixes compilation errors when building with PROXYSQLGENAI=1: Header file fixes: - Add missing #endif /* PROXYSQLGENAI */ before header guards in multiple headers - Remove #include cpp.h from GenAI headers to avoid circular dependencies Source file fixes: - Add #include proxysql.h to GenAI .cpp files that were missing it - Add #include Static_Harvester.h to Query_Tool_Handler.cpp for forward decl Build system fixes: - Remove vec.o from libproxysql.a (it's linked separately in src/Makefile) - Prevents duplicate symbol errors during linking Test files: - Rename MCP test files with .sh suffix to prevent make clean deletion Both build modes now work: - make build_lib_debug (without GenAI) - PROXYSQLGENAI=1 make build_lib_debug (with GenAI) |
3 weeks ago |
|
|
48bc7dd7bf |
Merge v4.0 GenAI features into v3.0 with conditional compilation
This commit merges the experimental v4.0 GenAI/MCP features into the stable v3.0 branch using conditional compilation. All v4.0 features are disabled by default and only enabled when PROXYSQLGENAI=1 is set at compile time. Changes: Build System: - Modified main Makefile to pass PROXYSQLGENAI flag to sub-makefiles - Modified deps/Makefile to conditionally build sqlite-vec and sqlite-rembed - Modified lib/Makefile to add PSQLGA flag and include GenAI object files - Modified src/Makefile to add PSQLGA flag and conditional linking Headers (wrapped with #ifdef PROXYSQLGENAI): - All 20 new GenAI header files in include/ - Modified cpp.h, proxysql_glovars.hpp, proxysql_admin.h - Modified ProxySQL_Admin_Tables_Definitions.h for GenAI/MCP tables Source Files: - All 22 new GenAI source files in lib/ wrapped with #ifdef PROXYSQLGENAI - Modified src/main.cpp for conditional global variables and init/shutdown - Modified Admin_Handler.cpp for conditional command handlers - Modified Admin_Bootstrap.cpp for conditional table registration - Modified Admin_FlushVariables.cpp for conditional variable flushing - Modified ProxySQL_Admin.cpp for conditional admin methods - Modified ProxySQL_Admin_Stats.cpp for conditional MCP stats functions - Modified proxy_sqlite3_symbols.cpp to always compile (needed by core) - Modified MySQL_Session.cpp for conditional GenAI function calls Test Files: - Renamed test_mcp_query_rules-t to test_mcp_query_rules-t.sh - Renamed test_mcp_rag_metrics-t to test_mcp_rag_metrics-t.sh - Modified anomaly_detection-t.cpp for conditional test execution Usage: # Build without GenAI (v3.0 mode - default) make clean && make build_deps -j$(nproc) && make build_lib -j$(nproc) && make build_src -j$(nproc) # Build with GenAI (v4.0 mode) make clean && PROXYSQLGENAI=1 make build_deps -j$(nproc) && PROXYSQLGENAI=1 make build_lib -j$(nproc) && PROXYSQLGENAI=1 make build_src -j$(nproc) |
3 weeks ago |
|
|
e351a0df74 |
feat: Add leading comments (--) detection for 'run_sql_readonly'
Read only queries are no longer flagged as non-readonly when starting with double dash comments. |
4 weeks ago |
|
|
a5ef787c7e |
feat: Improve logging for MCP and RAG tools
- Add new column 'endpoint' for 'stats_mcp_query_tools_counters'. - Add new table 'rag_search_log' to log 'log_rag_search_fts' operations. |
4 weeks ago |
|
|
3ccfa2bcc1 |
Address AI code review feedback for PR #5313
This commit addresses concerns raised by AI code reviewers (gemini-code-assist, Copilot, coderabbitai) on the initial security fixes. Critical fixes: - Fix lock.release() → lock.unlock() in GenAI_Thread.cpp worker_loop (lock.release() detaches without unlocking, causing deadlock) - Add missing early return after schema validation failure in Query_Tool_Handler.cpp Code quality improvements: - Improve escape_string() memory management in MySQL_Tool_Handler.cpp: - Use std::string instead of new[]/delete[] for buffer management - Check return value of mysql_real_escape_string() for errors - Remove redundant validation checks in validate_sql_identifier functions (character class loop already rejects unsafe characters) - Add backslash escaping to escape_string_literal() for defense-in-depth - Improve column list validation in MySQL_Tool_Handler sample_rows(): - Replace blacklist approach with proper column identifier parsing - Allow qualified identifiers (table.column) - Allow AS aliases (column AS alias) - No longer rejects legitimate column names containing "JOIN" These changes improve robustness while maintaining the security posture of the original SQL injection fixes. |
1 month ago |
|
|
c914feb230 |
Fix security issues identified in PR #5312 code review
This commit addresses critical and important security vulnerabilities found during comprehensive code review of the Gen AI features merge. Critical fixes: - SQL injection vulnerabilities in MySQL_Tool_Handler.cpp: - Added validate_sql_identifier() for schema/table validation - Added escape_string() for MySQL string escaping using mysql_real_escape_string - Fixed list_tables(), describe_table(), sample_rows(), sample_distinct() - SQL injection vulnerabilities in Query_Tool_Handler.cpp: - Added validate_sql_identifier_sqlite() for identifier validation - Added escape_string_literal() for SQLite string escaping - Fixed list_tables tool and catalog.get_relationships function - Use-after-free race condition in GenAI_Thread: - Changed shutdown_ from int to std::atomic<int> for proper memory ordering - Added additional shutdown check in worker_loop after popping request Important fixes: - Buffer overflow risks from sprintf usage: - Converted all sprintf() calls to snprintf() in GenAI_Thread.cpp - Converted sprintf() to snprintf() in MySQL_Session.cpp - Worker loop shutdown race condition: - Added shutdown check after popping request from queue - Properly clean up client_fd when shutdown is detected These fixes ensure: 1. All user input is properly validated before use in SQL queries 2. String values are properly escaped using database-specific escaping 3. Thread-safe shutdown with proper memory ordering guarantees 4. Bounds-safe string formatting to prevent buffer overflows |
1 month ago |
|
|
bbc04974f1 |
fix: Fix mysql_query failure path and affected_rows race condition
Fix two issues in Query_Tool_Handler's execute_query functions: 1. mysql_query() failure path now returns immediately after return_connection() instead of continuing to process on bad state. 2. Capture affected_rows BEFORE return_connection() to avoid race condition. Previously, mysql_affected_rows() was called after return_connection(), potentially accessing a stale connection. Apply fixes to both execute_query() and execute_query_with_schema(). Addresses coderabbitai review comments. |
1 month ago |
|
|
6305537ba8 |
fix: Use delete instead of free for SQLite3_result deallocation
Change free(resultset) to delete resultset in Query_Tool_Handler (extract_schema_name function). SQLite3_result is a C++ class allocated with new, so it must be deallocated with delete, not free(). Using free() causes mixed allocator UB. Addresses coderabbitai review comment. |
1 month ago |
|
|
bd6d34f52b |
fix: Address SQL injection vulnerabilities from PR #26 review
- lib/MySQL_Catalog.cpp: Convert search/list/remove to use SQLite prepared statements instead of string concatenation for user parameters - lib/RAG_Tool_Handler.cpp: Add escape_fts_query() function to properly escape single quotes in FTS5 MATCH clauses; update all FTS and vector MATCH queries to use escaped values - lib/Static_Harvester.cpp: Add is_valid_schema_name() validation function to ensure schema names only contain safe characters (alphanumeric, underscore, dollar sign) before using in INFORMATION_SCHEMA queries - lib/Query_Tool_Handler.cpp: Add clarifying comments to validate_readonly_query explaining the blacklist (quick exit) + whitelist (allowed query types) approach - Remove backup file lib/Anomaly_Detector.cpp.bak Addresses gemini-code-assist review comments from PR #26. |
1 month ago |
|
|
709649232b |
fix: Address AI code review concerns from PR #19
This commit addresses valid concerns raised by coding agents (Gemini, Copilot, CoderabbitAI): 1. Fix stats_mcp_query_digest naming conflict (ProxySQL_Admin.cpp): - Made reset and non-reset paths mutually exclusive using else block - Prevents both flags from being true, matching MySQL pattern - Ensures reset takes precedence over non-reset 2. Fix INSERT OR REPLACE sync issue (Admin_Handler.cpp): - Added DELETE before INSERT OR REPLACE in LOAD/SAVE MCP QUERY RULES - Prevents stale rules from persisting when syncing disk <-> memory - Ensures deleted source rows are also removed from target 3. Fix integer division truncation for timeout (Query_Tool_Handler.cpp): - Changed timeout_ms/1000 to (timeout_ms+999)/1000 for ceiling division - Ensures sub-second timeouts (e.g., 500ms) become at least 1 second - Prevents zero-second timeouts from causing unexpected behavior 4. Remove confusing comment (Discovery_Schema.cpp): - Simplified column count comment to be clear and accurate Note: The re_modifiers parsing code already correctly handles VARCHAR "CASELESS" to int conversion (lines 2414-2425), so that review comment was already addressed. |
1 month ago |
|
|
a1d9d2f1ba |
docs: Add comprehensive documentation to MCP features
Add detailed function-level documentation to all MCP query rules, query digest, static harvester, and catalog components. Static_Harvester.cpp: - Document all 18+ harvest functions (schemas, objects, columns, indexes, FKs, views) - Document lifecycle methods (init, close, connect, disconnect) - Document helper methods (is_time_type, is_id_like_name) - Document run management (start_run, finish_run, run_full_harvest) - Document statistics methods (get_harvest_stats) Query_Tool_Handler.cpp: - Document JSON helper functions (json_string, json_int, json_double) - Document digest tracking section with flow explanation MySQL_Catalog.cpp: - Document schema isolation architecture - Document CRUD operations (upsert, get, search, list, remove, merge) Discovery_Schema.cpp: - Document MCP query rules evaluation (evaluate_mcp_query_rules) - Document digest functions (compute_mcp_digest, fingerprint_mcp_args) - Document update/get functions for rules and digests ProxySQL_Admin_Stats.cpp: - Document stats collection functions ProxySQL_Admin.cpp: - Document load/save functions for query rules Admin_Handler.cpp: - Document MCP query rules command handlers include/ProxySQL_Admin_Tables_Definitions.h: - Add comments explaining table purposes |
1 month ago |
|
|
f01fc79584 |
feat: Add runtime_mcp_query_rules table and fix stats_mcp_query_rules schema
- Add ADMIN_SQLITE_TABLE_RUNTIME_MCP_QUERY_RULES schema (17 columns, same as mcp_query_rules) - Fix STATS_SQLITE_TABLE_MCP_QUERY_RULES to only have rule_id and hits columns - Add runtime_mcp_query_rules detection and refresh in ProxySQL_Admin - Implement save_mcp_query_rules_from_runtime(bool _runtime) for both config and runtime tables - Update get_mcp_query_rules() to return 17 columns (no hits) - get_stats_mcp_query_rules() returns 2 columns (rule_id, hits) Mirrors the MySQL query rules pattern: - mcp_query_rules: config table (17 cols) - runtime_mcp_query_rules: runtime state (17 cols) - stats_mcp_query_rules: hit counters (2 cols) |
1 month ago |
|
|
f449c4236f |
fix: Improve question learning fallback and error logging
Two bug fixes for the question learning feature:
1. **Fallback to most recent agent_run across all schemas**
- get_last_agent_run_id() now falls back to the most recent agent_run_id
across ALL runs if none exists for the specific run_id
- This allows adding questions even when the current schema's discovery
didn't include an agent run
- Adds logging to show when fallback is used
2. **Fix error message extraction for query_tool_calls logging**
- Fixed bug where error messages weren't being extracted correctly
- The old code checked for result["error"]["message"] but create_error_response
only has result["error"] (no nested "message" field)
- Now correctly extracts result["error"] as a string when present
- This ensures failed tool calls are properly logged with error messages
This fixes the issue where llm.question_template_add would fail with
"No agent run found" even when agent runs exist for other schemas.
|
1 month ago |
|
|
5b502c0864 |
feat: Add question learning capability to demo agent
Add ability for the demo agent to learn new questions and add them to the catalog, making it smarter over time. Changes: - Added get_last_agent_run_id() function to Discovery_Schema: - Queries agent_runs table for the most recent agent_run_id for a run_id - Returns 0 if no agent runs exist for the schema - Updated llm.question_template_add handler: - Made agent_run_id optional (defaults to 0 when not provided) - When agent_run_id <= 0, auto-fetches last agent_run_id for the schema - Returns helpful error if no agent run exists for the schema - Returns agent_run_id in response for visibility - Updated llm.question_template_add tool schema: - Moved agent_run_id from required to optional parameters - Updated description to explain auto-fetch behavior - Updated demo_agent_claude.sh prompt: - Added llm.question_template_add to available tools - Added Step 4: "Learn from Success" to workflow - Added explicit instruction to ALWAYS LEARN new questions - Added example showing learning workflow - Expanded from 4 steps to 5 steps to include learning Now the demo agent can: 1. Search for existing questions 2. Reuse SQL if a good match exists 3. Generate new SQL if no good match 4. LEARN new questions by adding them to the catalog 5. Present results This enables continuous learning - the more users interact with it, the smarter it becomes. |
1 month ago |
|
|
ee74384c79 |
fix: Prevent llm.search from returning huge object lists in list mode
When llm.search is called with an empty query (list mode) to retrieve all available questions, include_objects=true was returning full object schemas for all related objects, resulting in massive responses that could fill the LLM's context and cause rejections. Fix: include_objects now only works when query is non-empty (search mode). When query is empty (list mode), only question templates are returned without object details, regardless of include_objects setting. This makes semantic sense: - Empty query = "list all questions" → just titles/bodies (compact) - Non-empty query = "search for specific questions" → full details including object schemas (for answering the question) Changes: - Modified fts_search_llm() to check !query.empty() before fetching objects - Updated tool schema description to clarify this behavior |
1 month ago |
|
|
7e522aa2c0 |
feat: Add schema parameter to run_sql_readonly with per-connection tracking
Add optional schema parameter to run_sql_readonly tool that allows queries
to be executed against a specific schema, independent of the default schema
configured in mcp-mysql_schema.
Changes:
- Added current_schema field to MySQLConnection structure to track the
currently selected schema for each connection in the pool
- Added find_connection() helper to find connection wrapper by mysql pointer
- Added execute_query_with_schema() function that:
- Uses mysql_select_db() instead of 'USE schema' SQL statement
- Only calls mysql_select_db() if the requested schema differs from the
current schema (optimization to avoid unnecessary switches)
- Updates current_schema after successful schema switch
- Updated run_sql_readonly handler:
- Extracts optional 'schema' parameter
- Calls execute_query_with_schema() instead of execute_query()
- Returns error response when query fails (instead of success)
- Updated tool schema to document the new 'schema' parameter
This fixes the issue where queries would run against the default schema
(configured in mcp-mysql_schema) instead of the schema being queried,
causing "Table doesn't exist" errors when the default schema differs
from the discovered schema.
|
1 month ago |
|
|
ee13e4bf13 |
feat: Add include_objects parameter to llm_search for complete object retrieval
Enhance the llm_search MCP tool to return complete question template data
and optionally include full object schemas, reducing the need for additional
MCP calls when answering questions.
Changes:
- Added related_objects column to llm_question_templates table
- Updated add_question_template() to accept and store related_objects JSON array
- Enhanced fts_search_llm() with include_objects parameter:
- LEFT JOIN with llm_question_templates to return example_sql,
related_objects, template_json, and confidence
- When include_objects=true, fetches full object schemas (columns, indexes)
for all related objects in a single batch operation
- Added error checking for SQL execution failures
- Fixed fts_search_llm() get_object() call to pass schema_name and object_name
separately instead of combined object_key
- Updated Query_Tool_Handler:
- Added is_boolean() handling to json_int() helper to properly convert
JSON boolean true/false to int 1/0
- Updated llm.search handler to extract and pass include_objects parameter
- Updated llm.question_template_add to extract and pass related_objects
- Updated tool schemas to document new parameters
This change allows agents to get all necessary schema information in a single
llm_search call instead of making multiple catalog_get_object calls, significantly
reducing MCP call overhead.
|
1 month ago |
|
|
1b42cfbd27 |
feat: Add empty query support to llm_search for listing all artifacts
Changes: - fts_search_llm(): Empty query now returns all artifacts (list mode) - Update llm.search tool: query parameter is now optional - Tool description mentions empty query lists all artifacts - Add body field to llm_search results - Update demo script: Add special case for "What questions can I ask?" This enables agents to retrieve all pre-defined question templates when users ask what questions are available, instead of inferring questions from schema. |
1 month ago |
|
|
2250b762a3 |
feat: Add query_tool_calls table to log MCP tool invocations
Add query_tool_calls table to Discovery Schema to track all MCP tool invocations via the /mcp/query/ endpoint. Logs: - tool_name: Name of the tool that was called - schema: Schema name (nullable, empty if not applicable) - run_id: Run ID from discovery (nullable, 0 if not applicable) - start_time: Start monotonic time in microseconds - execution_time: Execution duration in microseconds - error: Error message (null if success) Modified files: - Discovery_Schema.cpp: Added table creation and log_query_tool_call function - Discovery_Schema.h: Added function declaration - Query_Tool_Handler.cpp: Added logging after each tool execution |
1 month ago |
|
|
77643859e3 |
feat: Add timing columns to stats_mcp_query_tools_counters
Extend the stats_mcp_query_tools_counters table with timing statistics (first_seen, last_seen, sum_time, min_time, max_time) following the same pattern as stats_mysql_query_digest. All timing values are in microseconds using monotonic_time(). New schema: - tool VARCHAR - schema VARCHAR - count INT - first_seen INTEGER (microseconds) - last_seen INTEGER (microseconds) - sum_time INTEGER (microseconds - total execution time) - min_time INTEGER (microseconds - minimum execution time) - max_time INTEGER (microseconds - maximum execution time) |
1 month ago |
|
|
a816a756d4 |
feat: Add MCP query tool usage counters to stats schema
Add stats_mcp_query_tools_counters and stats_mcp_query_tools_counters_reset tables to track MCP query tool usage statistics. - Added get_tool_usage_stats_resultset() method to Query_Tool_Handler - Defined table schemas in ProxySQL_Admin_Tables_Definitions.h - Registered tables in Admin_Bootstrap.cpp - Added pattern matching in ProxySQL_Admin.cpp - Added stats___mcp_query_tools_counters() in ProxySQL_Admin_Stats.cpp - Fixed friend declaration for track_tool_invocation() - Fixed Discovery_Schema.cpp log_llm_search() to use prepare_v2/finalize |
1 month ago |
|
|
393967f511 |
fix: Use row->cnt instead of row->fields_count
|
1 month ago |
|
|
df0527c044 |
refactor: list_schemas to use catalog instead of live database
- Query schemas from catalog's schemas table - Maintains same output format for compatibility - Removes dependency on live MySQL connection |
1 month ago |
|
|
527a748d16 |
refactor: Remove describe_table tool completely
Tool was deprecated; users should use catalog.get_object instead. |
1 month ago |
|
|
623675b369 |
feat: Add schema name resolver and deprecate direct DB tools
- Add resolve_run_id() to map schema names to latest run_id - Update all catalog and LLM tools to accept schema names - Deprecate describe_table, table_profile, column_profile - Deprecate get_constraints, suggest_joins, find_reference_candidates - Keep sample_rows, sample_distinct for data preview |
1 month ago |
|
|
757cdaff15 |
fix: Improve error logging and fix llm.domain_set_members
1. Fix error logging to catch ALL tool failures, not just those with
both success and result fields. Previously, error responses like
{"success": false, "error": "..."} without a result field were
silently ignored.
2. Fix llm.domain_set_members to accept both array and JSON string
formats for the members parameter. Some clients send it as a
JSON string, others as a native array.
3. Add detailed error logging for llm.domain_set_members failures,
including what was actually received.
|
1 month ago |
|
|
53ecda7730 |
fix: Add comprehensive error handling and logging for MCP tools
- Add try-catch around handle_jsonrpc_request to catch unexpected exceptions - Add detailed logging for tool execution success/failure - Add proper SQLite error checking in create_agent_run with error messages - Fix json_int/json_double to handle both numbers and numeric strings The json_int function was throwing exceptions when receiving numeric strings (e.g., "14" instead of 14) from clients, causing 500 errors. Now it handles both formats gracefully. Also added logging so tool failures are visible in logs instead of being silent 500 errors. |
1 month ago |
|
|
1b7335acfe |
Fix two-phase discovery documentation and scripts
- Add mcp_config.example.json for Claude Code MCP configuration - Fix MCP bridge path in example config (../../proxysql_mcp_stdio_bridge.py) - Update Two_Phase_Discovery_Implementation.md with correct Phase 1/Phase 2 usage - Fix Two_Phase_Discovery_Implementation.md DELETE FROM fts_objects to scope to run_id - Update README.md with two-phase discovery section and multi-agent legacy note - Create static_harvest.sh bash wrapper for Phase 1 - Create two_phase_discovery.py orchestration script with prompts - Add --run-id parameter to skip auto-fetch - Fix RUN_ID placeholder mismatch (<USE_THE_PROVIDED_RUN_ID>) - Fix catalog path default to mcp_catalog.db - Add test_catalog.sh to verify catalog tools work - Fix Discovery_Schema.cpp FTS5 syntax (missing space) - Remove invalid CREATE INDEX on FTS virtual tables - Add MCP tool call logging to track tool usage - Fix Static_Harvester::get_harvest_stats() to accept run_id parameter - Fix DELETE FROM fts_objects to only delete for specific run_id - Update system prompts to say DO NOT call discovery.run_static - Update user prompts to say Phase 1 is already complete - Add --mcp-only flag to restrict Claude Code to MCP tools only - Make FTS table failures non-fatal (check if table exists first) - Add comprehensive documentation for both discovery approaches |
1 month ago |
|
|
6f23d5bcd0 |
feat: Implement two-phase schema discovery architecture
Phase 1 (Static/Deterministic): - Add Discovery_Schema: SQLite catalog with deterministic and LLM tables - Add Static_Harvester: MySQL INFORMATION_SCHEMA metadata extraction - Harvest schemas, objects, columns, indexes, foreign keys, view definitions - Compute derived hints: is_time, is_id_like, has_pk, has_fks, has_time - Build quick profiles and FTS5 indexes Phase 2 (LLM Agent): - Add 19 new MCP tools for two-phase discovery - discovery.run_static: Trigger ProxySQL's static harvest - Catalog tools: init, search, get_object, list_objects, get_relationships - Agent tools: run_start, run_finish, event_append - LLM tools: summary_upsert, relationship_upsert, domain_upsert, etc. Files: - include/Discovery_Schema.h, lib/Discovery_Schema.cpp - include/Static_Harvester.h, lib/Static_Harvester.cpp - include/Query_Tool_Handler.h, lib/Query_Tool_Handler.cpp (updated) - lib/Makefile (updated) - scripts/mcp/DiscoveryAgent/ClaudeCode_Headless/prompts/ - scripts/mcp/DiscoveryAgent/ClaudeCode_Headless/two_phase_discovery.py |
1 month ago |
|
|
7de3f0c510 |
feat: Add schema separation to MCP catalog and discovery scope constraint
This commit addresses two issues: 1. MCP Catalog Schema Separation: - Add 'schema' column to catalog table for proper isolation - Update all catalog methods (upsert, get, search, list, remove) to accept schema parameter - Update MCP tool handlers and JSON-RPC parameter parsing - Unique constraint changed from (kind, key) to (schema, kind, key) - FTS table updated to include schema column 2. Discovery Prompt Scope Constraint: - Add explicit SCOPE CONSTRAINT section to multi_agent_discovery_prompt.md - Agents now respect Target Schema and skip list_schemas when specified - Prevents analyzing all schemas when only one is targeted Files modified: - include/MySQL_Catalog.h: Add schema parameter to all catalog methods - include/MySQL_Tool_Handler.h: Update wrapper method signatures - lib/MySQL_Catalog.cpp: Implement schema filtering in all operations - lib/MySQL_Tool_Handler.cpp: Update wrapper implementations - lib/Query_Tool_Handler.cpp: Extract schema from JSON-RPC params, update tool descriptions - scripts/mcp/DiscoveryAgent/ClaudeCode_Headless/prompts/multi_agent_discovery_prompt.md: Add scope constraint |
1 month ago |
|
|
ef5b99edbf |
Fix MCP tool bugs: NULL value handling and query validation
- Fixed NULL value handling in execute_query: use empty string instead of nullptr to avoid "basic_string: construction from null" errors - Fixed validate_readonly_query: corrected substring length check from substr(0,6)!="SELECT " to substr(0,6)!="SELECT" - Fixed test script: added proper variable_name parameter for get_config/set_config tools Query endpoint tools now pass all tests. |
1 month ago |
|
|
22db1a5fdd |
Fix JSON value extraction in Query_Tool_Handler::execute_tool
The nlohmann::json value() method can throw "basic_string: construction from null is not valid" when trying to convert a JSON null value to std::string. Added helper functions get_json_string() and get_json_int() that: - Check if key exists before accessing - Check if value is not null - Check if value has correct type - Return default value if any check fails This prevents crashes when: 1. Arguments are missing (returns default) 2. Arguments are explicitly null (returns default) 3. Arguments have wrong type (returns default) |
1 month ago |
|
|
c86a048d9c |
Implement MCP multi-endpoint architecture with dedicated tool handlers
This commit implements Option 1 (Multiple Tool Handlers) for the MCP module, where each of the 5 endpoints has its own dedicated tool handler with specific tools. ## Architecture Changes - Created MCP_Tool_Handler base class interface for all tool handlers - Each endpoint now has its own dedicated tool handler: - /mcp/config → Config_Tool_Handler (configuration management) - /mcp/query → Query_Tool_Handler (database exploration) - /mcp/admin → Admin_Tool_Handler (administrative operations) - /mcp/cache → Cache_Tool_Handler (cache management) - /mcp/observe → Observe_Tool_Handler (monitoring & metrics) ## New Files Base Interface: - include/MCP_Tool_Handler.h - Base class for all tool handlers Tool Handlers: - include/Config_Tool_Handler.h, lib/Config_Tool_Handler.cpp - include/Query_Tool_Handler.h, lib/Query_Tool_Handler.cpp - include/Admin_Tool_Handler.h, lib/Admin_Tool_Handler.cpp - include/Cache_Tool_Handler.h, lib/Cache_Tool_Handler.cpp - include/Observe_Tool_Handler.h, lib/Observe_Tool_Handler.cpp Documentation: - doc/MCP/Architecture.md - Comprehensive architecture documentation ## Modified Files - include/MCP_Thread.h, lib/MCP_Thread.cpp - Added 5 tool handler pointers - include/MCP_Endpoint.h, lib/MCP_Endpoint.cpp - Use tool_handler base class - lib/ProxySQL_MCP_Server.cpp - Create and pass handlers to endpoints - lib/Makefile - Added new source files ## Implementation Status - Config_Tool_Handler: Functional (get_config, set_config, list_variables, get_status) - Query_Tool_Handler: Functional (wraps MySQL_Tool_Handler, all 18 tools) - Admin_Tool_Handler: Stub implementations (TODO: implement) - Cache_Tool_Handler: Stub implementations (TODO: implement) - Observe_Tool_Handler: Stub implementations (TODO: implement) See GitHub Issue #8 for detailed TODO list. Co-authored-by: Claude <claude@anthropic.com> |
1 month ago |