Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: askdba/mysql-mcp-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: askdba/mysql-mcp-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.0
Choose a head ref
  • 5 commits
  • 3 files changed
  • 1 contributor

Commits on Dec 6, 2025

  1. Add Multi-DSN orchestration and Vector search tools

    Multi-DSN Support:
    - ConnectionManager for managing multiple MySQL connections
    - Load DSNs from MYSQL_DSN, MYSQL_DSN_1/2/3..., or MYSQL_CONNECTIONS JSON
    - list_connections tool: Show all configured connections
    - use_connection tool: Switch active connection by name
    - Passwords masked in DSN display for security
    
    Vector Tools (MySQL 9.0+, MYSQL_MCP_VECTOR=1):
    - vector_search: Similarity search on VECTOR columns
      - Supports cosine, euclidean, and dot product distance
      - Configurable limit, select columns, and WHERE clause
    - vector_info: List vector columns with dimensions and index info
    - Auto-detect MySQL 9.0+ vector support
    
    Configuration:
    - MYSQL_DSN_N / MYSQL_DSN_N_NAME / MYSQL_DSN_N_DESC for numbered DSNs
    - MYSQL_CONNECTIONS for JSON array configuration
    - MYSQL_MCP_VECTOR=1 to enable vector tools
    
    Updated README with full documentation for new features.
    askdba committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    52f0766 View commit details
    Browse the repository at this point in the history
  2. Refactor VectorSearchInput and VectorInfoOutput struct fields for con…

    …sistency
    
    - Adjusted field alignment in VectorSearchInput and VectorInfoOutput for improved readability.
    - Ensured consistent formatting of JSON tags and jsonschema annotations across the structs.
    - Minor fix in toolRunQuery for proper error handling with database name validation.
    - Updated logging configuration in main function for better clarity on startup parameters.
    askdba committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    91c2441 View commit details
    Browse the repository at this point in the history
  3. Fix data race in connection switching

    Bug Fix: Global db variable was modified without synchronization in
    toolUseConnection while other handlers read it concurrently, violating
    Go's memory model.
    
    Solution:
    - Added getDB() helper function that safely retrieves the active
      connection through ConnectionManager's mutex-protected GetActiveDB()
    - Replaced all direct db.* calls with getDB().* calls throughout
    - Removed unsafe global db assignment in toolUseConnection
    
    The ConnectionManager already has proper mutex (sync.RWMutex) protection
    for its internal state. Now all database access goes through getDB()
    which delegates to connManager.GetActiveDB(), ensuring thread-safe
    connection switching.
    
    Note: Bug 1 (variable shadowing) was already fixed in the previous commit
    where short declarations (:=) were changed to simple assignments (=).
    askdba committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    f9b666a View commit details
    Browse the repository at this point in the history
  4. Latest local changes

    askdba committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    824a888 View commit details
    Browse the repository at this point in the history
  5. Fix Docker build: download Go 1.24.3 from source

    The testcontainers-go v0.40.0 requires Go 1.24+, but Docker Hub only
    has golang:1.23-alpine. Updated Dockerfile to:
    - Use alpine:3.20 as base
    - Download and install Go 1.24.3 directly from go.dev
    - Build with proper caching
    askdba committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    0e6fc2e View commit details
    Browse the repository at this point in the history
Loading