-
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
Fix test failures on MariaDB #1193
Conversation
Fix the test failures in statement_spec.rb on MariaDB 10.5. On MariaDB >= 10.0, the peformance schema is disabled. https://jira.mariadb.org/browse/MDEV-6726 And on MariaDB 10.5, the followwing code used in the test doesn't raise `Mysql2:Error`, just returning 0, even when if the performance_schema is disabled. ``` @client.query("SELECT COUNT(1) AS count FROM performance_schema.prepared_statements_instances") ```
Fix the test failures in client_spec.rb on MariaDB. On MariaDB >= 10.0, the setting of the peformance schema is disabled by defult. https://jira.mariadb.org/browse/MDEV-6726 You can comfirm the status by the SQL `SHOW VARIABLES LIKE 'performance_schema`.
MariaDB 10.5 returns a little different error message unlike MySQL and other old MariaDBs. https://jira.mariadb.org/browse/MDEV-25400 .
Install rubygem-json RPM package in Fedora container as it is used in rake. ``` LoadError: cannot load such file -- json /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop/formatter/json_formatter.rb:3:in `require' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop/formatter/json_formatter.rb:3:in `<top (required)>' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop.rb:524:in `require' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop.rb:524:in `<top (required)>' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop/rake_task.rb:44:in `require' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop/rake_task.rb:44:in `run_cli' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop/rake_task.rb:36:in `run_main_task' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop/rake_task.rb:28:in `block (2 levels) in initialize' /build/vendor/bundle/ruby/3.0.0/gems/rubocop-0.50.0/lib/rubocop/rake_task.rb:26:in `block in initialize' /build/vendor/bundle/ruby/3.0.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>' ```
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.
Looks excellent, thank you for running this down!
There are still some test failures after removing the last allow-fail, though? |
Yes. For CI cases I removed the allow-fail, there is no test failures any more. But there are still roughly 2 kind of test failures in other CI cases.
After the PR #1183 will be merged, there is only the issue: #1165 issue
We might be able to fix this case with the same way on the PR #1183. I assume MySQL's library might be used on the MariaDB 10.0 case.
|
Travis mysql55 started error since yesterday due to a package repository not found.
|
I see that macOS MariaDB case So, I can add the allow_failure to the macOS MariaDB case again if you like. |
The tests pass now. Still keep allow-failure on macOS MariaDB case due to test failures that rarely happens.
d180396
to
33713f9
Compare
…y not found. https://travis-ci.org/github/brianmario/mysql2/jobs/767276558#L1255 ``` E: Failed to fetch https://downloads.apache.org/cassandra/debian/dists/39x/main/binary-amd64/Packages 404 Not Found E: Failed to fetch https://downloads.apache.org/cassandra/debian/dists/39x/main/binary-i386/Packages 404 Not Found ```
I rebased the last allow-fail's commit keeping allow_failure to the macOS MariaDB case. |
I think an possible alternative of mysql55 could be mysql56 on xenial or trusty if the mysql55's repo issue will be not fixed. http://repo.mysql.com/apt/ubuntu/dists/xenial/ |
@sodabrew ping. |
Finally travis-ci.org shut down will occur on May 31, 2021. You can see #1149 (comment) for detail. |
Thanks for finding my typos and the merging! |
This PR fixes #965 and fixes #1152 test failures related to MariaDB.
Please check each commit's comment.
Thanks.