Skip to content

Commit 14e51c1

Browse files
committed
use default mysql values
1 parent 788d756 commit 14e51c1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

server/server.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,15 @@ func updateSystemVariables(cfg mysql.ListenerConfig) error {
151151

152152
func newServerFromHandler(cfg Config, e *sqle.Engine, sm *SessionManager, handler mysql.Handler, sel ServerEventListener) (*Server, error) {
153153
oneSecond := time.Duration(1) * time.Second
154+
// TODO read default values from systemVars
154155
if cfg.ConnReadTimeout < oneSecond {
155-
// TODO set to MySQL default value
156-
cfg.ConnReadTimeout = oneSecond
156+
cfg.ConnReadTimeout = oneSecond * 30
157157
}
158158
if cfg.ConnWriteTimeout < oneSecond {
159-
// TODO set to MySQL default value
160-
cfg.ConnWriteTimeout = oneSecond
159+
cfg.ConnWriteTimeout = oneSecond * 60
161160
}
162161
if cfg.MaxConnections < 1 {
163-
// TODO set to MySQL default value
164-
cfg.MaxConnections = 1
162+
cfg.MaxConnections = 151
165163
}
166164

167165
for _, opt := range cfg.Options {

0 commit comments

Comments
 (0)