Skip to content

Commit 25c3d42

Browse files
authored
Merge pull request rails#46058 from p8/fix-ssl-mode-option-for-mysql
Use `sslmode` option instead of `ssl_mode` for MySQL command connections
2 parents 1d65ca1 + c328ac5 commit 25c3d42

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

activerecord/lib/active_record/tasks/mysql_database_tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def prepare_command_options
9595
sslcapath: "--ssl-capath",
9696
sslcipher: "--ssl-cipher",
9797
sslkey: "--ssl-key",
98-
sslmode: "--ssl-mode"
98+
ssl_mode: "--ssl-mode"
9999
}.filter_map { |opt, arg| "#{arg}=#{configuration_hash[opt]}" if configuration_hash[opt] }
100100

101101
args

railties/lib/rails/commands/dbconsole/dbconsole_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def start
3131
sslcapath: "--ssl-capath",
3232
sslcipher: "--ssl-cipher",
3333
sslkey: "--ssl-key",
34-
sslmode: "--ssl-mode"
34+
ssl_mode: "--ssl-mode"
3535
}.filter_map { |opt, arg| "#{arg}=#{config[opt]}" if config[opt] }
3636

3737
if config[:password] && @options[:include_password]

railties/test/commands/dbconsole_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_mysql_full
127127
sslcapath: "/path/to/cacerts",
128128
sslcipher: "DHE-RSA-AES256-SHA",
129129
sslkey: "/path/to/client-key.pem",
130-
sslmode: "VERIFY_IDENTITY"
130+
ssl_mode: "VERIFY_IDENTITY"
131131
)
132132
assert_not aborted
133133
assert_equal [

0 commit comments

Comments
 (0)