Skip to content
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

Print system info before testing #1

Open
junaruga opened this issue Apr 17, 2021 · 0 comments
Open

Print system info before testing #1

junaruga opened this issue Apr 17, 2021 · 0 comments

Comments

@junaruga
Copy link
Owner

Print a system info to make debugging easy before testing if RUBY_MYSQL2_DEBUG == true.

What I want.

Client info

+      puts "Client info: #{Mysql2::Client.info}"
+      puts "Client encoding: #{client.encoding}"
Client info: {:id=>100505, :version=>"10.5.5", :header_version=>"10.5.5"}
Client encoding: UTF-8

Client msyql2.so library's dependency paths.

Find a Ruby bindings gem of ldd to implement it to just use it to print the info in the process of the rake spec.
It's not a good time to add a new feature to mysql2, as we want to focus fixing the test failures on CI an drelesae next maintenance version.

Server info

+      puts "Server info: #{client.server_info}
Server info: {:id=>100509, :version=>"10.5.9-MariaDB-1:10.5.9+maria~focal"}

Used variables in the spec files.

mysql -u "mockbuild" -S test_db/mysql.sock -e "SHOW VARIABLES WHERE Variable_name IN ('have_ssl', 'local_infile', 'performance_schema');"
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| have_ssl           | YES   |
| local_infile       | ON    |
| performance_schema | OFF   |
+--------------------+-------+
{"Variable_name"=>"have_ssl", "Value"=>"YES"}
{"Variable_name"=>"local_infile", "Value"=>"ON"}
{"Variable_name"=>"performance_schema", "Value"=>"ON"}
@junaruga junaruga changed the title Add system info before testing Print system info before testing Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant