-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
mydumper incompatibility with [email protected] #199539
Comments
Seems odd as MariaDB-Connector-C should be aligned with latest MariaDB. For example, MariaDB 11.7.1 runs the same version of MariaDB-Connector-C 3.4.3 as seen by the submodule in https://github.com/MariaDB/server/tree/mariadb-11.7.1 MariaDB 10.11.10 uses an older version - https://github.com/mariadb-corporation/mariadb-connector-c/releases/tag/v3.3.12 Not sure if related, but MariaDB did rework the TLS/SSL handling in 3.4.1 (mariadb-corporation/mariadb-connector-c@1287c901), which has been used since MariaDB 11.4.2. Based on commit message, it looks like MYSQL_OPT_SSL_VERIFY_SERVER_CERT is enabled by default Perhaps https://github.com/mydumper/mydumper/blob/v0.16.11-1/src/connection.c#L179-L180 needs to handle disablement: else if (g_ascii_strncasecmp(ssl_mode, "VERIFY_IDENTITY", 16) == 0) {
mysql_options(conn, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &enable); |
To check if it is due to latter, you can try building diff --git a/Formula/m/mariadb-connector-c.rb b/Formula/m/mariadb-connector-c.rb
index 874b813f3fd..b2288b108a3 100644
--- a/Formula/m/mariadb-connector-c.rb
b/Formula/m/mariadb-connector-c.rb
@@ -52,6 52,7 @@ class MariadbConnectorC < Formula
-DWITH_EXTERNAL_ZLIB=ON
-DWITH_MYSQLCOMPAT=ON
-DWITH_UNIT_TESTS=OFF
-DDEFAULT_SSL_VERIFY_SERVER_CERT=OFF
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args If this works, MyDumper needs a fix to work with default behavior of recent MariaDB. Will help outside Homebrew too as MariaDB library is the default used by most distros/repositories (e.g. Arch Linux, Debian, and Fedora) |
@cho-m Thanks for your help! I have tried to build the unmodified mariadb-connector-c formula. But I could not build. I did not understand the error message. https://gist.github.com/webflo/a250754226730080c383f72baee00f00 |
Not too sure on error. I locally built on a similar setup (ARM macOS, Sequoia) and don't see error on assembly code. Could try patching diff --git a/src/connection.c b/src/connection.c
index 4ddcf0d..efc9978 100644
--- a/src/connection.c
b/src/connection.c
@@ -187,6 187,10 @@ void configure_connection(MYSQL *conn) {
m_critical("Unsupported ssl-mode specified: %s\n", ssl_mode);
}
}
else {
enable= 0;
mysql_options(conn, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &enable);
}
#else
unsigned int i;
if (ssl) { Can try in the formula like: diff --git a/Formula/m/mydumper.rb b/Formula/m/mydumper.rb
index 8540d52b3ec..ab1aeaa2cbd 100644
--- a/Formula/m/mydumper.rb
b/Formula/m/mydumper.rb
@@ -27,6 27,8 @@ class Mydumper < Formula
depends_on "mariadb-connector-c"
depends_on "pcre"
patch :DATA
def install
# Avoid installing config into /etc
inreplace "CMakeLists.txt", "/etc", etc
@@ -43,3 45,20 @@ class Mydumper < Formula
system bin/"mydumper", "--help"
end
end
__END__
diff --git a/src/connection.c b/src/connection.c
index 4ddcf0d..efc9978 100644
--- a/src/connection.c
b/src/connection.c
@@ -187,6 187,10 @@ void configure_connection(MYSQL *conn) {
m_critical("Unsupported ssl-mode specified: %s\n", ssl_mode);
}
}
else {
enable= 0;
mysql_options(conn, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &enable);
}
#else
unsigned int i;
if (ssl) { |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
I have tried to use mydumper with [email protected].
What happened (include all command output)?
What did you expect to happen?
Dump db.
Step-by-step reproduction instructions (by running
brew
commands)mydumper can't connect to mariadb. TLS/SSL is disabled by default in [email protected] (afaik). The bug could have something to do with the change in ba70bb4.
// cc @cho-m
Related issue: mydumper/mydumper#1674
I tried to build a version of mydumper with
[email protected]
or[email protected]
but it did not build successful.The text was updated successfully, but these errors were encountered: