mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 01:50:25 +08:00
设置 max_prepared_stmt_count 失败时提示更详细
This commit is contained in:
@@ -293,7 +293,10 @@ func (this *APINode) setupDB() error {
|
|||||||
if valueInt < 65535 {
|
if valueInt < 65535 {
|
||||||
_, err := db.Exec("SET GLOBAL max_prepared_stmt_count=65535")
|
_, err := db.Exec("SET GLOBAL max_prepared_stmt_count=65535")
|
||||||
if err != nil {
|
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.`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user