File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -161,17 +161,6 @@ Mysql2::Client.new(
161161 )
162162```
163163
164- ### init_command
165-
166- If you specify the init_command option, the SQL string you provide will be executed after the connection is established.
167-
168- If ` :reconnect ` is set to ` true ` , init_command will also be executed after a successful reconnect.
169-
170- It is useful if you want to provide session options which survive reconnection.
171-
172- ``` ruby
173- Mysql2 ::Client .new (:init_command => " SET @@SESSION.sql_mode = 'STRICT_ALL_TABLES'" )
174- ```
175164
176165### SSL options
177166
@@ -264,6 +253,15 @@ the `:default_file` and `:default_group` paramters. For example:
264253Mysql2::Client.new(:default_file => '/user/.my.cnf', :default_group => 'client')
265254` ` `
266255
256+ # ## init_command
257+
258+ If you specify the init_command option, the SQL string you provide will be executed after the connection is established.
259+ If `:reconnect` is set to `true`, init_command will also be executed after a successful reconnect.
260+ It is useful if you want to provide session options which survive reconnection.
261+
262+ ` ` ` ruby
263+ Mysql2::Client.new(:init_command => "SET @@SESSION.sql_mode = 'STRICT_ALL_TABLES'")
264+ ` ` `
267265
268266# # Cascading config
269267
You can’t perform that action at this time.
0 commit comments