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(
161
161
)
162
162
```
163
163
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
- ```
175
164
176
165
### SSL options
177
166
@@ -264,6 +253,15 @@ the `:default_file` and `:default_group` paramters. For example:
264
253
Mysql2::Client.new(:default_file => '/user/.my.cnf', :default_group => 'client')
265
254
` ` `
266
255
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
+ ` ` `
267
265
268
266
# # Cascading config
269
267
You can’t perform that action at this time.
0 commit comments