Skip to content

Commit

Permalink
fix MaxSqlResultSize default value (#158)
Browse files Browse the repository at this point in the history
Co-authored-by: maidoudou <[email protected]>
  • Loading branch information
chicliz and maidoudou authored Apr 25, 2021
1 parent 651421c commit 3673706
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace的配置格式为json,包含分表、非分表、实例等配置信
| default_slice | string | show语句默认的执行分片 |
| open_general_log | bool | 是否开启审计日志, [如何开启](https://github.com/XiaoMi/Gaea/issues/109)| |
| max_sql_execute_time | int | 应用端查询最大执行时间, 超时后会被自动kill, 为0默认不开启此功能 |
| max_sql_result_size | int | gaea从后端mysql接收结果集的最大值, 限制单分片查询行数, 默认值10000, 为0不开启|
| max_sql_result_size | int | gaea从后端mysql接收结果集的最大值, 限制单分片查询行数, 默认值10000, -1表示不开启|

### slice配置

Expand Down
2 changes: 1 addition & 1 deletion proxy/server/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func NewNamespace(namespaceConfig *models.Namespace) (*Namespace, error) {
}

// init session slow sql max result size
if namespaceConfig.MaxSqlResultSize <= 0 {
if namespaceConfig.MaxSqlResultSize <= 0 && namespaceConfig.MaxSqlResultSize != -1 {
namespace.maxSqlResultSize = defaultMaxSqlResultSize
} else {
namespace.maxSqlResultSize = namespaceConfig.MaxSqlResultSize
Expand Down

0 comments on commit 3673706

Please sign in to comment.