设置 max_prepared_stmt_count 失败时提示更详细

This commit is contained in:
刘祥超
2021-07-21 09:01:37 +08:00
parent 514d968b20
commit fe4eb3928e

View File

@@ -293,7 +293,10 @@ func (this *APINode) setupDB() error {
if valueInt < 65535 {
_, err := db.Exec("SET GLOBAL max_prepared_stmt_count=65535")
if err != nil {
return err
return errors.New("run 'SET GLOBAL max_prepared_stmt_count' on database failed: " + err.Error() + ", \nyou can change the variable in 'my.cnf': \n~~~\n" + `[mysqld]
max_prepared_stmt_count=65535
~~~
then restart mysqld.`)
}
}
}