Add support for MariaDB connection in configuration and URI generation
A Pull Request should be associated with an Issue.
We wish to have discussions in Issues. A single issue may be targeted by multiple PRs. If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues, and potentially we'll be able to point development in a particular direction.
Related issue: https://github.com/github/gh-ost/issues/1488 #1488
Further notes in https://github.com/github/gh-ost/blob/master/.github/CONTRIBUTING.md Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR
Description
This PR addresses the issue encountered with MariaDB 10.3 when running gh-ost version 1.1.7. The error occurs due to the use of the transaction_isolation system variable, which is not present in MariaDB 10.3. Instead, MariaDB 10.3 uses tx_isolation to configure the transaction isolation level.
In case this PR introduced Go code changes:
- [x] contributed code is using same conventions as original code
- [x]
script/cibuildreturns with no formatting errors, build errors or unit test errors.
attaching the images
HI @rashiq @meiji163 @timvaillancourt could you guys review this pr and let me know if any more fix/changes need! thanks!
Thanks for your PR @Vasanth-96! Ideally we should run the localtests on a MariaDB docker image. I'm not sure if there's one that works out of the box.
Thanks for the suggestion, @meiji163 I’ve already tested the changes locally using a MariaDB 10.3.31 container:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f8ae17daf37b mariadb:10.3.31 "docker-entrypoint.s…" 6 days ago Up 6 days 0.0.0.0:3306->3306/tcp mariadb-container-fix
The fallback to tx_isolation is working as expected. Let me know if you’d like me to add a CI test setup for MariaDB as well!
@meiji163 please if you could checkout the reply comment thanks
Given this comment https://github.com/github/gh-ost/issues/1488#issuecomment-2938053738, perhaps we should should setting the connection variable directly instead of having a MariaDB flag
It's back to transaction_isolation starting from MariaDB 11.1.1. So it's better to add some version check in the code for that.