-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for MariaDB #9409
Add support for MariaDB #9409
Conversation
461eb95
to
47fb525
Compare
tool/tsh/db.go
Outdated
// Check if mysql comes from Oracle or MariaDB | ||
mysqlVer, err := c.exe.RunCommand(mysqlBin, "--version") | ||
if err != nil { | ||
// Looks like incorrect mysql installation or mysql binary is missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think this comment will make more sense if placed in the getMySQLCommand
since it is where the decision to go and use Oracle's version in case of error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @r0mant suggested I changed the logic a bit. I changed the comment as now we have an explicit check for mysql
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with a few nits
add test
f7ff17a
to
a010afb
Compare
@klizhentas Can you take a look on the docs changes? Thanks. |
This PR add support for MariaDB. Binary protocol is the same as MySQL, so there is no changes in the backend logic. Default client for MySQL and MariaDB from now on will be
mariadb
ormysql
if the first one is not available in the system.I also added tests for all CLI tools run by
tsh db connect
.closes #8904