genai-toolbox
genai-toolbox copied to clipboard
feat(sources/mariadb): add MariaDB source and MySQL tools integration
Description
This PR
- Adds MariaDB as a Source - Implementation is similar to MySQL source
- Utilises pre implemented MySQL Tools
mysql-execute-sqlmysql-list-active-queriesmysql-list-table-fragmentationmysql-list-tablesmysql-list-tables-missing-unique-indexesmysql-sqlNote: After discussion with @duwenxin99 in issue #1768, I initially assumed MariaDB required new tools due to different metadata structures and system tables. That is true for older MariaDB versions, but current MySQL tooling already works with MariaDB (verified), so a separate tool set was not needed.
- Adds a source doc for MariaDB in docs
- Adds MariaDB integration tests using the existing MySQL test flow.
Note: The test file is based on the MySQL integration test, but
GetMariaDBWants()andRunMariDBListTablesTest()are implemented because MariaDB returns different metadata and list-tables output, so the assertions must be MariaDB-specific. - Updates CI
Lastly I considered adding a MariaDB-exclusive Galera cluster monitoring tool, but skipped it because it requires a multi-node Galera setup for integration testing and would significantly increase CI complexity with unclear usage demand.
PR Checklist
- [x] Make sure you reviewed CONTRIBUTING.md
- [x] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
- [ ] Make sure to add
!if this involve a breaking change
🛠️ Fixes #1712 #1768