File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ type Config struct {
46
46
ClientFoundRows bool // Return number of matching rows instead of rows changed
47
47
ColumnsWithAlias bool // Prepend table alias to column names
48
48
InterpolateParams bool // Interpolate placeholders into query string
49
+ MultiStatements bool // Allow multiple statements in one query
49
50
ParseTime bool // Parse time values to time.Time
50
51
Strict bool // Return warnings as errors
51
52
}
@@ -235,6 +236,14 @@ func parseDSNParams(cfg *Config, params string) (err error) {
235
236
return
236
237
}
237
238
239
+ // multiple statements in one query
240
+ case "multiStatements" :
241
+ var isBool bool
242
+ cfg .MultiStatements , isBool = readBool (value )
243
+ if ! isBool {
244
+ return errors .New ("invalid bool value: " + value )
245
+ }
246
+
238
247
// time.Time parsing
239
248
case "parseTime" :
240
249
var isBool bool
Original file line number Diff line number Diff line change @@ -236,6 +236,10 @@ func (mc *mysqlConn) writeAuthPacket(cipher []byte) error {
236
236
clientFlags |= clientSSL
237
237
}
238
238
239
+ if mc .cfg .MultiStatements {
240
+ clientFlags |= clientMultiStatements
241
+ }
242
+
239
243
// User Password
240
244
scrambleBuff := scramblePassword (cipher , []byte (mc .cfg .Passwd ))
241
245
You can’t perform that action at this time.
0 commit comments