Skip to content

Commit a8ac412

Browse files
committed
fix(mysql): Replace the deprecated system variable tx_isolation in MySQL 8.0
1 parent a76ce32 commit a8ac412

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mysql/mysql.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ func schedExists(tx *sql.Tx, date time.Time) (result bool, err error) {
242242
// See: https://github.com/go-sql-driver/mysql#dsn-data-source-name
243243
func dsn(host string, port int, user string, password string, dbname string) string {
244244
params := map[string]string{
245-
"tx_isolation": "SERIALIZABLE", // we need serializable transactions for atomic test & set behavior
246-
"parseTime": "true", // enable us to use sql.Rows.Scan to read time.Time objects from queries
247-
"loc": "UTC", // Scan'd time.Times should be treated as being in UTC time zone
248-
"time_zone": "UTC", // MySQL should interpret DATETIME values as being in UTC
245+
"transaction_isolation": "SERIALIZABLE", // we need serializable transactions for atomic test & set behavior
246+
"parseTime": "true", // enable us to use sql.Rows.Scan to read time.Time objects from queries
247+
"loc": "UTC", // Scan'd time.Times should be treated as being in UTC time zone
248+
"time_zone": "UTC", // MySQL should interpret DATETIME values as being in UTC
249249
}
250250

251251
var ss []string

0 commit comments

Comments
 (0)