-
Notifications
You must be signed in to change notification settings - Fork 550
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
tests failing with mariadb10.5: Mysql2::Statement #1152
Comments
This error started on Fedora at the timing [1] of that the following dependency packages to build rubygem-mysql2 were changed. I assume it might be the gcc 11 specific issue. gcc 10.2.1 => 11.0.0 |
As a updated info, we found this issue comes from MariaDB 10.4.17 => 10.5.8 in Fedora. It's not from upgrading gcc. |
These two:
might be related to https://mariadb.com/docs/features/whats-new/whats-new-in-enterprise-server-105/#performance-schema |
And similar in nature to #965 |
I can confirm that with MariaDB 10.4, the test suite passes, because it triggers the mysql2/spec/mysql2/statement_spec.rb Lines 8 to 14 in ad94a79
while for the MariaDB 10.5.8, the query succeeds, but returns unexpected result. I am not sure if the difference to MySql is intentional or if that is bug on MariaDB side. |
ad 2) It's true that ad 1)
IMO (guessing) it checks whether the error messages use encoding by running some wrong SQL statement and looking for the "??}\u001F" in output, while it gets '??}\001F' (double slash). Can you try to patch the expected output to expect the double-slash thing? |
Looking at the:
It seems that on the MariaDB client library border, the input is correct:
While the result is different MariaDB 10.4:
MariaDB 10.5:
|
Of course we can do that, but
Unfortunately, I'm not that familiar with MariaDB internals to identify the core reason for changed behavior. Looking at recent changes, there are a few places involving |
You can see the reproducer on the following CI cases in GitHub Actions now.
|
For someone who is familiar with Debian based Linux, this issue might be reproduced with the mariadb-server 10.5 on the Ubuntu hirsute or Debian latest version. |
@pvalena Do you mind to change this issue ticket's title to more specific one showing the reality we see here? We see the issue is not Fedora specific. The new title can be such as "mariadb10.5: Mysql2::Statement tests failing". I think the new title makes other people facing the issue find the issue ticket easier. |
I think this ticket's 3 failures might be separated info 2 kind of issues. 1. Error messages including a UTF-8 charactor.
ReproducerHere is a reproducer, a little simplifying from the original unit test.
DebugAdd the following debug flags for gdb debug. ext/mysql2/extconf.rb
In Fedora,
The input to the MariaDB is Line 523 in 346b4a4
The output from the MariaDB is Lines 546 to 548 in 346b4a4
The used MariaDB client library is 2. Mysql2::Statement
I assume that perhaps this issue might happen on the environment where
Then I see the something about the performance schema is changed on MariaDB 10.5 seeing the following document. https://mariadb.com/kb/en/performance-schema-overview/#activating-the-performance-schema
|
For the 1. error message issue, I opened the issue ticket on MariaDB project. |
@sodabrew Fantastic news! For 2. Mysql2::Statement, I confirmed the test failures do not happen when enabling performance schema ( |
For the 1. error message issue, I updated the MariaDB ticket "MDEV-25400" with client and server's character sets info. A pattern of the results show the issue is MariaDB 10.5 specific. It might not related to a characterset on a database server or client. I also share a updated minimal reproducer again. Here is the code.
Here is result by
I checked the case by |
For 2 Mysql2:Statement issue, I found the reason Here is a minimal reproducer.
While the On MariaDB <= 10.4,
But the following existing logic still returns
I will send the PR. |
As those tests are old and simple I do not have a clue what is causing this.
Exactly same code builds / passes tests in our Fedora Stable (mariadb: 10.4.17).
The change may have been caused by update to openssl version: 1.1.1i
(According to one of our tools, which might be wrong.)
Ruby version: both 2.7 and 3.0 are failing
mariadb-server version: 10.5.8
gem version: 0.5.3
The text was updated successfully, but these errors were encountered: