mirror of https://github.com/sysown/proxysql
docs/passthrough-auth-spec
feature/aws-rds-monitor
v3.0_fix_ci-mysqlx-cache-and-soak
GH-Actions
v3.0
v3.0_fix_codecov-coverage-path-prefix
issue-1288-load-mysql-variables-feedback
ci/fix-pgsql-socket-g1-cache-key
v3.0_fix_ci-mysqlx-fetch-depth
cleanup/drop-unreachable-port-defaults
feature/pgsql-native-backend-protocol
fix/pgsql-unix-socket
ci-pgsql-socket-g1
v3.0_fix_coverage-gcov-prefix-strip
fix/pgsql-omit-port-zero
aws-rds-bg
fix/jemalloc-page-size-auto-detect
feature/ci-codecov-tap-all-groups-callers
fix/run-tests-backtick-leak
ci/zstd-level-15
feature/ci-codecov-tap-all-groups-callees
v3.0_partition-fairness
feature/ci-codecov-tap-legacy-g2
v3.0_partition-gate
fix/ci-cache-restore-path
v3.0_fix-stale-pause-until
feature/perf-improvements-test2
fix/kill-proxysqlgenai-build-flag
feat/passthrough-auth
ci-trigger-tolerate-cleanup-401
fix/5790-mariadb-collation-255
fix/parsersql-1.0.3-pg-set-fixes
issue_5639
pgsql_dns_cache
fix/5755-followup-typecast-digest-fixtures
v3.0_merge-5776-5784
v3.0_latency_consistency_improvement
fix/galera-g5-cluster-start
fix/ghcr-pull-retry
v3.0_cap_violation_5767
ci-mariadb10-galera-GH-Actions
ci/fix-gr-g5-cluster-start
ci-mysql84-gr-g1-g9-GH-Actions
perf/pull-ci-base-from-ghcr
fix/split-test-groups
fix/rename-set-parser-workflow
gh-actions/add-set-parser-algorithm-3-g1
fix/4760-advertise-lenenc-auth-capability
feature/mysqlx-stack-consolidated
feature/mysqlx-asan-coverage-docker-isolation
fix/ci-unit-tests-tsan-project-name
feature/mysqlx-tsan-v3-companion
feature/ci-builds-add-tsan-matrix
ci-reduce-polling-interval
feature/mysqlx-tsan-workflow-only
feature/mysqlx-ci-validation-workflows
feature/mysqlx-test-leak-cleanup
feature/mysqlx-behavioural-tap
feature/mysqlx-parity-cleanup
ci-g5-enable-cluster
feature/mysqlx-tls-passthrough
feature/mysqlx-asymmetric-tls
feature/mysqlx-state-machines
feature/build-tsan-plumbing
feature/mysqlx-observability-p0
fix/mysqlx-review-findings
v3.0-test-ci
ci/fix-mysql-apt-key-expired-v2
ci/fix-mysql-apt-key-expired
mariadb-rpl-helper
fix-fc-parsing
ci/fix-upload-artifact-eacces
ci/fix-cache-prune-permissions
ci/shrink-test-cache
ci/fix-tap-build-target
ci/gh-actions-readme-pointer
ci/fix-mysql84-infradb-label
ci/add-missing-group-reusables
infra-mysql57-binlog
feature/pgbouncer-compat
v3.0_pgsql_sslkeylog_5281
fix/5554-resolution-family-limitation
fix/3p-ci-error-handling
v3.0-5493
v3.0-ci260322_cluster
copilot/extract-server-selection-algorithm
copilot/extract-health-state-logic
copilot/extract-query-rule-matching-logic
copilot/extract-connection-pool-logic
v3.0-set_parser_v3
feature/arm-builds
release-notes-3.0.6-4.0.6-draft
v3.0.6-add-tap-test_stats_table_check
v2.7.3-test260221
v4.0-mcp-stats
copilot/uninstall-amazon-linux-2023
fix-prometheus-labels-test
tap-mcp-client
agent-skill-tap-test
v4.0-tsdb1
v3.0-fix_5256
gh-pages
feature/modern-docs
v4.0
v4.0-fix-vec-search
v4.0_rag_sys_prompt
v4.0_rag_mcp
v4.0-tsdb
feature/v4-docs-init
otel_system_libs
otel_clean
v3.0-5288
otel
otel_2
fix/postgresql-cluster-sync
v3.0-releate_notes_scripts_fixes
test_gh-actions_triggers
postgresql-digest-testing-improvement
v3.0_select_auto_commit
v3.0-5218
fix-5221
fix/5186-proxysql-stop-admin-crash
v3.0-4951
add-claude-github-actions-1763877527835
fix-rpm
v3.0-DS_crash
add-claude-github-actions-1763663272333
add-claude-github-actions-1763663091346
add-claude-github-actions-1763663091411
add-claude-github-actions-1763476725261
add-claude-github-actions-1763476725489
v3.0_optimizations_and_stability
v2.7.3.1
v3.0.3-upgrade_json
v3.0.sonar-cli
v3.0.sonar-config
otel-tracepoint
v3.0.2-merge-upgrade_deps-add_new_distros
v3.0.2-upgrade_deps
v3.0.2-add_new_distros
v3.0-add_more_testing_groups
v3.0-upgrade_prometheus-cpp
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-sliced_groups
v3.0_auth_negotiation
v2.7
v2.7-fix_run_name
v3.0_4799_4827
v3.0-3687
v2.7-pmm_runtime_servers_metrics
v2.7-4839
v2.7-4841
v2.7-bump_version_to_2.7.3
2.6.6-4841
v2.x_pg_PrepStmtBase_240714
v3.0-4803-4817
v3.0-4803
v2.7-minorBugs
v3.0-privates
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
v2.7-actions-add-3p-tests-parameter
none
v2.7-fix_hang_on_resume
v2.x-logging_mem
v2.7_servers_defaults
v2.7-mariadb_column_metadata_integrity_check
ssl_optimization
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_fix_multiple_builds
v3.0_servers_defaults
v2.7-update_actions_triggers_v2
v2.7-update_actions_triggers
v2.6
v2.6.x-update_triggers
v2.6-4646
v2.7.1-update_actions
v2.x
v2.6.x-testing-global-multiplexing-disabled
use-wrlock-in-dns-cache-empty
v2.6.x-fix-darwin
v2.x-admin_list_ciphers
v2.x-sqlite3_pass_exts
v2.x-tap_tests_opt_ssl
v2.6.0-update_to_libhttpserver_v0.19
v2.x_router_2ports
v2.6.0-update_to_openssl_v3.1.5
v2.x-2411025
v2.x-profiling_poc1
v2.x_sha2pass_draft2
v2.x-webui_fixes
v2.6.0-more-makefile-fixes
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
v2.x_refactor_cluster_mysql_servers
v2.x-aurora_autodiscovery
v2.x-zd70545
v2.x-aurora_autodiscovery_shunned_promotion
v2.x-tap20230609
v2.x-test20230530
v2.x_sha2pass_draft2-TEST
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
v2.2.0-sqliteserver_read_only
v2.x-digest_umap_aux-comparison
v2.4.8
v2.x-4105_4114
v2.x-3583-server_closed_conn
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-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.9
3.0.8
3.0.7
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
v3.0.6
v3.0.7
v3.0.8
v3.0.9
v3.1.6
v3.1.7
v3.1.8
v3.1.9
v4.0.6
v4.0.7
v4.0.8
${ item.name }
${ noResults }
11 Commits (feature/pgsql-native-backend-protocol)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
b8cfa32c63 |
fix: address all critical and important code review findings (issue #5729)
Critical fixes: - Move db_kind to end of ProxySQL_PluginRuntimeView (tail-append = free ABI-3 compat) - Add mutex to protect Anomaly_Detector::user_statistics from concurrent session threads - Replace system(mkdir -p) with pure mkdir() loop (command injection fix) - Replace 77 std::stoi/stoll with non-throwing parse_int_or_zero/parse_ll_or_zero - Fix proxysql.cnf filename: Mysqlx -> MySQLX - Add --whole-archive to non-ClickHouse link path (plugin symbol resolution) Important fixes: - Add default: case with warning to db_kind switch in ProxySQL_PluginManager.cpp - Add config_db dispatch and null-handle tests to plugin_runtime_views_unit-t (6 new tests) - Update CLAUDE.md with sqlite-vec PROXYSQLGENAI exception - Remove stale anomaly_detection-t Makefile target - Replace fixed 1024-byte buffer with dynamic sqlite3_mprintf in Anomaly_Detector Minor: update ABI.md, PLUGIN_API.md, stale comments, unit test plan counts |
2 months ago |
|
|
97649b5005 |
test: update genai plugin load unit test for 3-handle refresh (issue #5729)
|
2 months ago |
|
|
967ab401ec |
genai: fix lifecycle reloads and drop dead MCP stats registration
Load GenAI and MCP variables before runtime initialization, reinitialize the AI stack on reload, and make the anomaly hook obey the configured enable flags. Restore the missing MCP command aliases and the disk/config reload verbs, fix the MySQLX packaging filename mismatch, and update the unit harness for the plugin ABI. Also remove the stale stats_mcp_* registrations from the plugin surface. There is no plugin-side writer for those tables in this branch, so advertising them as live schema was misleading. Update the unit test and bootstrap comments to match the actual exposed surface. |
2 months ago |
|
|
978a6f8d2f |
fix(plugins/genai): blocker fixes from PR-#5701 review
Five concrete fixes uncovered by the four-agent review (architecture,
code-safety, build/packaging, test coverage):
# Blocker 1: per-row INSERT failure leaves transaction half-done
In the six MCP_Threads_Handler methods that follow the
BEGIN -> DELETE -> prepare -> loop INSERT -> COMMIT pattern, the
SAFE_SQLITE3_STEP2 macro inside the loop didn't check `rc`. If a
single INSERT failed (constraint violation, disk full, ...), the
loop would continue binding subsequent rows and the COMMIT below
would either succeed with partial data or be left dangling. Hoist
the per-row binding into three insert_*_row(stmt, row) -> bool
helpers in an anonymous namespace, then have every caller check the
return value and `ROLLBACK; return false/return;` on failure.
Affects save_auth_profiles_to_admin_table, save_target_profiles_to
_admin_table, save_query_rules_to_admin_table, project_auth_profiles
_to_runtime_view, project_target_profiles_to_runtime_view,
project_query_rules_to_runtime_view, plus the new save_profiles_to
_admin_table below.
# Blocker 2: cross-table install/save atomicity for profiles
target.auth_profile_id is an FK to auth.auth_profile_id. The old
mcp_load_target_auth_map_from_admindb / mcp_save_target_auth_map_to_
admindb wrappers ran the two installs / two saves as separate
operations under separate locks / transactions. A failure of the
second step (or a concurrent LOAD/SAVE racing in between) left
target_auth_map rebuilt from a (auth_v2, target_v1) mismatch, or
left main.mcp_target_profiles referencing auth_profile_ids that
didn't exist in main.mcp_auth_profiles.
Add atomic combined methods:
- install_profiles_from_admin: reads both source tables BEFORE
taking the wrlock (so a slow admindb doesn't gate the listener),
then under one wrlock swaps both vectors and rebuilds the joined
target_auth_map exactly once.
- save_profiles_to_admin_table: snapshots both vectors under one
rdlock, then deletes target before auth (FK direction-aware) and
inserts auth before target inside a single BEGIN ... COMMIT.
The plugin_main.cpp wrappers now route through these atomic methods.
The per-table install_*_from_admin / save_*_to_admin_table public
methods stay (used by future granular admin verbs and unit tests),
but each rebuilds target_auth_map after its own swap as before.
# Blocker 3: unit-test PROXYSQLGENAI autodetect probe
test/tap/tests/unit/Makefile had been probing libproxysql.a for the
`MCP_Tool_Handler` symbol to autodetect PROXYSQLGENAI. Step 7 of
the carve-out moved that symbol to plugins/genai/, so the probe
silently found 0 matches and stopped defining -DPROXYSQLGENAI for
unit-test builds. Switch the probe to invoke_register_schemas_phase
(the chassis-exclusive symbol that's already used to probe
PROXYSQL40) so the macro auto-defines whenever the chassis is
available — which matches when genai-plugin unit tests can actually
be built and exercised.
# Blocker 4: triplet coverage through dispatch surface
Extend genai_plugin_load_unit-t to drive the full install/save/project
flow through the production dispatch path:
- seed mcp_<X> tables in admindb
- dispatch "LOAD MCP PROFILES TO RUNTIME" via mgr.dispatch_admin_
command (same path admin SQL takes)
- manually invoke refresh_runtime_views_for_query (the chassis hook
that fires on every admin SELECT) and assert runtime_mcp_<X>
rows match the source
- mutate main.<X> directly to simulate an operator stomp, then
dispatch "SAVE MCP PROFILES TO MEMORY" and assert the in-memory
snapshot was written back over the stomp
This is the end-to-end coverage that plugin_runtime_views_unit-t
can't provide (it uses synthetic callbacks) and that a standalone
genai_mcp_config_store unit test would have provided at the cost of
stubbing 9 plugin classes. Plan bumped from 25 -> 36.
# Should-fix: atomic fence + GloGATH lifetime
genai_anomaly_embed_fn was std::atomic with relaxed ordering; the
comment claimed nothing else needed synchronising. Wrong: the
embed function dereferences GloGATH, a non-atomic global mutated by
genai_init / genai_stop. Pair the load with acquire and the stores
with release so a reader that observes the non-null pointer also
observes the prior `GloGATH = new ...`, and a reader that observes
the post-stop nullptr short-circuits before GloGATH's deletion is
visible. Acquire/release is free on x86_64 / arm64 — no perf
regression.
# Should-fix: harden DEB awk substitution + RPM glob
DEB entrypoint: replace the inline awk -v repl="$..." substitution
(which mangled paths containing awk metacharacters via gsub) with a
file-backed awk getline that reads the replacement block verbatim.
Add a fail-fast grep for the placeholder after substitution so a
silently-broken substitution can't ship a malformed package.
RPM (rhel + suse): the spec gates `/usr/lib/proxysql/*.so` on
%if 0%{?with_plugins}, but rpmbuild aborts on "File not found by
glob" if the directory is empty (silent plugin build failure +
with_plugins=1). Have the entrypoint compgen-check whether any .so
actually got staged and only pass --define "with_plugins 1" when
true.
|
2 months ago |
|
|
b840468cd5 |
test(unit): align genai_plugin_load + register plugin_runtime_views
Two unit-test-side fixes uncovered by running unit-tests-g1 against the new ABI-3 / Phase-B plugin shape: # genai_plugin_load_unit-t * setup_admindb_schema was using a pre-Step-4.G shape for the mcp_auth_profiles / mcp_target_profiles tables — the new install_*_from_admin reads the full canonical column set (use_ssl, ssl_mode, comment for auth; description, comment for targets) and was failing with `no such column: use_ssl`. Fixture now mirrors the DDL in include/ProxySQL_Admin_Tables_Definitions.h and also creates mcp_query_rules + runtime_mcp_query_rules so the newly-added install_query_rules_from_admin path also has tables to read. * As of Step 4.G the genai plugin publishes its admin/config/stats table set via genai_register_schemas (Phase B), not init. The test was calling load → init_all → start_all and the table-count assertions saw zero rows because Phase B never fired. Add an explicit invoke_register_schemas_phase between load and init_all (matches the order ProxySQL itself uses at startup) and bump the plan from 25 to 26 to cover the new ok(). # Makefile UNIT_TESTS list plugin_runtime_views_unit-t.cpp lives in test/tap/tests/unit/ and exercises the chassis ABI-3 register_runtime_view dispatch surface that landed in PR #5688. It had a build rule but wasn't in UNIT_TESTS, so the runner reported "(not-found)" for it. Wire it in alongside the other plugin-chassis unit tests under PROXYSQL40. |
2 months ago |
|
|
9078fd3150 |
feat(plugins/genai): Step 4.G — register MCP admin tables via plugin ABI
Moves MCP admin / config / stats SQLite table registration from
lib/Admin_Bootstrap.cpp into the plugin via the chassis
register_table service. Pure refactor: the same DDL strings produce
the same SQLite tables in the same SQLite DBs; only the registration
path changes.
New plugins/genai/src/plugin_tables.cpp registers 14 tables:
admin DB (6)
mcp_query_rules, runtime_mcp_query_rules
mcp_auth_profiles, runtime_mcp_auth_profiles
mcp_target_profiles, runtime_mcp_target_profiles
config DB (3)
mcp_query_rules, mcp_auth_profiles, mcp_target_profiles
(no runtime_* in config; matches the pre-4.G layout)
stats DB (5)
stats_mcp_query_tools_counters, _reset
stats_mcp_query_digest, _reset
stats_mcp_query_rules
The DDL strings still live in include/ProxySQL_Admin_Tables_Definitions.h
for now — plugin_tables.cpp #includes the header. Migrating the
macros into a plugin-private header is a follow-up gated on no
remaining core caller of the MCP table macros (Step 7 territory).
Core changes (lib/Admin_Bootstrap.cpp):
- Deleted the 9 admin/config insert_into_tables_defs() entries
inside `#ifdef PROXYSQLGENAI` for mcp_*.
- Deleted the 5 stats insert_into_tables_defs() entries similarly.
- Replaced both blocks with a one-line comment pointing at the new
plugin owner.
Plugin lifecycle:
- genai_init() now calls genai_register_admin_tables() right after
genai_register_admin_commands(). Both run during chassis Phase C
(init), before admin module bootstrap so the chassis dispatcher
merges plugin tables into the admin DB schema before any DML.
Test extension (test/tap/tests/unit/genai_plugin_load_unit-t.cpp):
- Updated the "skeleton registers no tables (yet)" assertions to
expect 6 admin / 3 config / 5 stats — matching plugin_tables.cpp.
- 25/25 tests passing.
What this changes for operators (no-op):
- Same SQL: SHOW TABLES still shows mcp_*, runtime_mcp_*, stats_mcp_*.
- Same DDL: column lists, primary keys, defaults — all preserved.
- Same admindb / configdb / statsdb attachment.
|
2 months ago |
|
|
f90307ad75 |
feat(plugins/genai): Step 4.F — register LOAD/SAVE MCP QUERY RULES TO/FROM RUNTIME
Adds the last LOAD/SAVE pair the pre-4.C admin SQL surface had:
the MCP query rules cache held by Query_Tool_Handler's
Discovery_Schema catalog.
New helpers in plugins/genai/src/plugin_main.cpp:
mcp_load_query_rules_to_runtime(ctx)
SELECT * FROM main.mcp_query_rules WHERE active=1 ORDER BY rule_id
→ catalog->load_mcp_query_rules(rs). Mirrors the pre-4.C
ProxySQL_Admin::load_mcp_query_rules_to_runtime.
mcp_save_query_rules_from_runtime(ctx, runtime)
Pulls catalog->get_mcp_query_rules() and REPLACEs the rows in
main.mcp_query_rules (or runtime_mcp_query_rules when runtime=true).
Mirrors the pre-4.C ProxySQL_Admin::save_mcp_query_rules_from_runtime.
Both helpers fail cleanly (return false, log to stderr) when the
MCP listener isn't running — there's no in-memory Query_Tool_Handler
cache to read or write. Pre-4.C behaviour was to attempt a
load_mcp_server() self-recovery in that case; we no longer have that
shortcut from outside the listener lifecycle, so callers get a clear
error instead of an opaque retry.
New verbs registered in plugin_commands.cpp:
LOAD MCP QUERY RULES TO RUNTIME
aliases: FROM MEMORY, FROM MEM, TO RUN
SAVE MCP QUERY RULES TO MEMORY
aliases: TO MEM, FROM RUNTIME, FROM RUN
Required new core-side includes in plugin_main.cpp for the
Discovery_Schema and Query_Tool_Handler types these helpers traffic in.
The .so already linked against them via the chassis --whole-archive
trick on libproxysql.a; this is just a header dependency.
Test extension (test/tap/tests/unit/genai_plugin_load_unit-t.cpp):
- 6 new assertions for the QUERY RULES canonical + 5 aliases.
- 25/25 tests passing.
Carve-out scoreboard, runtime reconfig surface restored:
LOAD MCP VARIABLES TO RUNTIME / FROM MEMORY / FROM MEM / TO RUN
LOAD MCP PROFILES TO RUNTIME / FROM MEMORY / FROM MEM / TO RUN
LOAD MCP QUERY RULES TO RUNTIME / FROM MEMORY / FROM MEM / TO RUN
SAVE MCP VARIABLES TO MEMORY / TO MEM / FROM RUNTIME / FROM RUN
SAVE MCP QUERY RULES TO MEMORY / TO MEM / FROM RUNTIME / FROM RUN
Still pending: SET mcp-X=Y (chassis ABI gap, separate enhancement).
|
2 months ago |
|
|
7a4f08416e |
feat(plugins/genai): Step 4.F — register SAVE MCP VARIABLES TO MEMORY
Adds the SAVE direction (runtime → main.global_variables) to the
plugin's admin SQL surface, mirroring the LOAD direction wired in
the previous commit.
New helper plugins/genai/src/plugin_main.cpp::mcp_save_variables_to_admindb
Walks ctx.mcp->get_variables_list(), reads each runtime value via
ctx.mcp->get_variable, and REPLACEs the corresponding "mcp-<name>"
rows in main.global_variables. Owns its own MCP_Threads_Handler
wrlock so callers don't have to coordinate.
Mirrors the pre-4.C flush_mcp_variables___runtime_to_database with
runtime=false (no runtime_global_variables view write).
New verb registered in plugins/genai/src/plugin_commands.cpp:
SAVE MCP VARIABLES TO MEMORY (canonical)
aliases:
SAVE MCP VARIABLES TO MEM
SAVE MCP VARIABLES FROM RUNTIME
SAVE MCP VARIABLES FROM RUN
Same alias convention as the LOAD verbs and as plugins/mysqlx.
The on-disk write ("SAVE MCP VARIABLES TO DISK") stays in core's
admin_handler_command_load_or_save — it's a pure SQL DML that copies
main.* to disk.* and doesn't need plugin runtime state.
Test extension (test/tap/tests/unit/genai_plugin_load_unit-t.cpp):
- 4 new TAP assertions for the SAVE canonical + 3 aliases.
- 19/19 tests passing.
Carve-out scoreboard, runtime reconfig surface restored:
LOAD MCP VARIABLES TO RUNTIME / FROM MEMORY / FROM MEM / TO RUN
LOAD MCP PROFILES TO RUNTIME / FROM MEMORY / FROM MEM / TO RUN
SAVE MCP VARIABLES TO MEMORY / TO MEM / FROM RUNTIME / FROM RUN
Still pending:
- SET mcp-X=Y (chassis ABI lacks per-variable namespace
registration; would need a new ABI surface).
- LOAD/SAVE MCP QUERY RULES TO/FROM RUNTIME (Query_Tool_Handler in
plugin owns the runtime cache; helpers come in next commit).
|
2 months ago |
|
|
ae13958995 |
feat(plugins/genai): Step 4.F (continued) — register LOAD MCP {VARIABLES,PROFILES} TO RUNTIME
Adds plugins/genai/src/plugin_commands.cpp registering two admin SQL
verbs through the chassis command registry, restoring runtime
reconfiguration that 4.C disabled.
Verbs registered (each with FROM MEMORY / FROM MEM / TO RUN aliases):
LOAD MCP VARIABLES TO RUNTIME
-> mcp_load_variables_from_admindb()
-> mcp_start_listener_if_enabled()
Re-pushes mcp-* values from main.global_variables into the running
MCP_Threads_Handler, then re-evaluates the listener state (start
if newly enabled). Replaces the FIXME-stubbed
ProxySQL_Admin::flush_mcp_variables___database_to_runtime path.
LOAD MCP PROFILES TO RUNTIME
-> mcp_load_target_auth_map_from_admindb()
Refreshes runtime_mcp_auth_profiles / runtime_mcp_target_profiles
from main.* and rebuilds the in-memory target_auth_map. Replaces
the FIXME-stubbed init_mcp_variables auth-map block.
The chassis dispatcher in lib/Admin_Handler.cpp:3987 runs BEFORE
admin_handler_command_load_or_save, so any admin SQL matching a
registered plugin verb routes to the plugin and the (now no-op)
hardcoded core handlers never fire. No core changes needed.
What's still stubbed (deferred to follow-up commits):
- SAVE MCP VARIABLES TO MEMORY / FROM RUNTIME (needs runtime ->
admindb push in plugin)
- SAVE MCP PROFILES TO DISK (writes runtime view back to disk.*)
- LOAD/SAVE MCP QUERY RULES (Query_Tool_Handler in plugin owns
them, but the runtime->admindb push isn't wired through plugin
yet)
- SET mcp-X=Y (chassis ABI has no
register_variable_namespace; would need either a new ABI surface
or per-variable register_command — defer to a chassis enhancement)
Refactor: moved mcp_load_variables_from_admindb,
mcp_load_target_auth_map_from_admindb, mcp_start_listener_if_enabled
out of the anonymous namespace in plugin_main.cpp so plugin_commands.cpp
can call them. Forward declarations added to genai_plugin.h.
Test extension (test/tap/tests/unit/genai_plugin_load_unit-t.cpp):
- 7 new TAP assertions verifying canonical SQL and aliases resolve
through the plugin manager's resolve_alias_to_canonical, which is
the same path admin SQL dispatch uses.
- 15/15 tests passing.
|
2 months ago |
|
|
84216c6670 |
feat(plugins/genai): Step 4.F (MVP) — restore MCP listener auto-start
Step 4.C left the MCP listener inert: the admin-SQL surface that used
to drive load_mcp_server() was stubbed in core, so no path existed
from "mcp_enabled=true in admin DB" to "ProxySQL_MCP_Server is up".
This commit restores the startup path entirely from inside the plugin,
so the listener auto-starts again whenever the operator has it
enabled in admin tables — which is the 80% case.
genai_start() (plugins/genai/src/plugin_main.cpp) now does, in order:
1. mcp_load_variables_from_admindb(ctx)
SELECT variable_name, variable_value FROM main.global_variables
WHERE variable_name LIKE 'mcp-%'.
For each row, strip the 'mcp-' prefix and call
ctx.mcp->set_variable(name, value). Mirrors the pre-4.C
flush_mcp_variables___database_to_runtime in
lib/Admin_FlushVariables.cpp.
2. mcp_load_target_auth_map_from_admindb(ctx)
Refresh runtime_mcp_auth_profiles / runtime_mcp_target_profiles
from main.*, JOIN them, and pass the result set to
ctx.mcp->load_target_auth_map(rs). Mirrors the pre-4.C
ProxySQL_Admin::init_mcp_variables target-auth-map block.
3. mcp_start_listener_if_enabled(ctx)
If ctx.mcp->variables.mcp_enabled, check SSL cert availability
(when use_ssl=true), check_port_availability(port), and
new ProxySQL_MCP_Server(port, ctx.mcp) + start(). Mirrors the
startup branch of the pre-4.C ProxySQL_Admin::load_mcp_server().
What this MVP does NOT yet cover (deferred to 4.F continued / 4.G):
- Runtime reconfiguration via admin SQL: "LOAD MCP VARIABLES TO
RUNTIME", "LOAD MCP PROFILES …", "SAVE MCP …", and "SET mcp-X=Y".
Those still hit the FIXME stubs in core left by 4.C. Future work
registers them through the plugin command registry
(services->register_command).
- The variable-listener-restart branch from the original
load_mcp_server (port/SSL change → tear down + restart). Today,
operators must restart proxysql to pick up mcp-port / mcp-use-ssl
changes.
Test fixture update (test/tap/tests/unit/genai_plugin_load_unit-t.cpp)
Replaced the fake `char*`-cast-to-SQLite3DB stubs with real
in-memory SQLite3DB instances pre-seeded with the table shapes
genai_start now reads. Without this, the test segfaults the
moment the plugin tries to query the fake "DB". The schema is
empty — no rows in global_variables / mcp_*_profiles — which
exercises the "fresh install, MCP disabled" path: all queries
succeed and return empty result sets, so the listener correctly
stays down.
All three plugin unit tests pass:
- genai_plugin_load_unit-t : 8/8
- genai_plugin_anomaly_unit-t : 6/6
- genai_plugin_backend_client : 27/27
|
2 months ago |
|
|
9d06ab90f5 |
feat(plugins/genai): Step 1 — empty plugin skeleton
Creates the GenAI plugin shell that subsequent steps will fill out
(per docs/superpowers/specs/2026-04-16-genai-plugin-carveout-design.md
"Migration sequence — Step 1").
plugins/genai/
├── Makefile (mirrors plugins/mysqlx/Makefile)
├── .gitignore
├── include/genai_plugin.h (shared plugin context, atomic started flag)
└── src/plugin_main.cpp (descriptor + empty init/start/stop/status_json)
Top-level Makefile: cd plugins/genai for every existing build_src* /
clean target that already cd's into plugins/mysqlx — release, debug,
legacy, and all test_* flavours (testaurora, testaurora_random,
testgalera, testgrouprep, testreadonly, testreplicationlag, testall).
Unit test: test/tap/tests/unit/genai_plugin_load_unit-t.cpp drives the
real .so through load → init → start → stop and asserts that the
skeleton currently registers no admin/config/stats tables. Wired into
the unit Makefile with an explicit build dependency on the .so so a
clean checkout can produce a passing test in one make invocation.
End-to-end smoke verified: launching proxysql with
plugins=("…/ProxySQL_GenAI_Plugin.so") in proxysql.cnf maps the .so
into /proc/PID/maps, leaves the admin port responsive, and shuts down
cleanly on SIGTERM.
All 58 unit-test binaries pass (+1 over baseline).
Notes on what is intentionally NOT in this commit:
- No GenAI code has moved out of core yet — that begins Step 3.
- The skeleton has no tables, no commands, no query hook, no status
vars — those are Step 2 (ABI extensions) and onwards.
- Pre-existing breakage in test/tap/tests/Makefile (the generic %-t
pattern can't link plugin tests because it doesn't pull the core
globals stub) is unchanged; the genai test sidesteps it by living
under test/tap/tests/unit/, which has the proper harness. The
mysqlx test in test/tap/tests/ remains broken in the same way and
is left for a separate fix.
|
2 months ago |