You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac
15
15
*[Address](#address)
16
16
*[Parameters](#parameters)
17
17
*[Examples](#examples)
18
+
*[Connection pool and timeouts](#connection-pool-and-timeouts)
18
19
*[LOAD DATA LOCAL INFILE support](#load-data-local-infile-support)
19
20
*[time.Time support](#timetime-support)
20
21
*[Unicode support](#unicode-support)
@@ -264,7 +265,7 @@ Type: duration
264
265
Default: 0
265
266
```
266
267
267
-
I/O read timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
268
+
I/O read timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
268
269
269
270
##### `strict`
270
271
@@ -287,7 +288,7 @@ Type: duration
287
288
Default: OS default
288
289
```
289
290
290
-
Timeout for establishing connections, aka dial timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*. To configure the duration after which connections are removed from the connection pool, use [*sql.DB.SetConnMaxLifetime](https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime).
291
+
Timeout for establishing connections, aka dial timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
291
292
292
293
##### `tls`
293
294
@@ -306,7 +307,7 @@ Type: duration
306
307
Default: 0
307
308
```
308
309
309
-
I/O write timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
310
+
I/O write timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
310
311
311
312
312
313
##### System Variables
@@ -380,6 +381,11 @@ No Database preselected:
380
381
user:password@/
381
382
```
382
383
384
+
385
+
### Connection pool and timeouts
386
+
The connection pool is managed by Go's database/sql package. For details on how to configure the size of the pool and how long connections stay in the pool see `*DB.SetMaxOpenConns`, `*DB.SetMaxIdleConns`, and `*DB.SetConnMaxLifetime` in the [database/sql documentation](https://golang.org/pkg/database/sql/). The read, write, and dial timeouts for each individual connection are configured with the DSN parameters [`readTimeout`](#readtimeout), [`writeTimeout`](#writetimeout), and [`timeout`](#timeout), respectively.
387
+
388
+
383
389
### `LOAD DATA LOCAL INFILE` support
384
390
For this feature you need direct access to the package. Therefore you must change the import path (no `_`):
0 commit comments