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

fix mysqlslap --ssl-mode=disable not working issue #577

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

slowtech
Copy link

Description:
Specifying --ssl-mode=disable in mysqlslap has no effect, SSL is still used.

How to repeat:

  1. first create a test database and account.
create database mysqlslap;
create user 'root'@'127.0.0.1' identified by '123456';
grant all on *.* to 'root'@'127.0.0.1';
set global general_log=on;
  1. then execute the mysqlslap
    ./mysqlslap --host=127.0.0.1 --port=3316 --user=root --password="123456" --concurrency=1 --iterations=1 --query="select 1" --ssl-mode=disable

  2. check the output of general log.

2024-11-17T19:17:15.942857+08:00           14 Connect   [email protected] on  using TCP/IP
2024-11-17T19:17:15.958012+08:00           15 Connect   [email protected] on mysqlslap using SSL/TLS
2024-11-17T19:17:15.958916+08:00           15 Query     select 1
2024-11-17T19:17:15.959572+08:00           15 Quit
2024-11-17T19:17:15.960218+08:00           14 Quit

Why it happens:
In the run_task function, after initializing MYSQL, MYSQL is not set according to the options in the mysqlslap command. This step is only done in the main function.

How to fix:
Put the MYSQL setting operation separately in the set_mysql_options function. After initializing MYSQL, call set_mysql_options to set MYSQL.

@mysql-oca-bot
Copy link

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at https://oca.opensource.oracle.com/
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

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

Successfully merging this pull request may close these issues.

2 participants