Unverified Commit ad805b31 authored by chenqy's avatar chenqy Committed by GitHub
Browse files

Merge pull request #15 from sharding-sphere/dev

update from origin
parents f8fa7e9e aed3bda6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,4 +12,4 @@ Please answer these questions before submitting your issue. Thanks!

### Steps to reproduce the behavior

### Please provide the reproduce example codes (such as a github link).
### For bug report, please *MUST* provide the reproduce example codes (such as a github link).
+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) Support sharding and autoincrement primary key of INSERT statements without column names
1. [ISSUE #916](https://github.com/sharding-sphere/sharding-sphere/issues/916) Support authorization for Sharding Proxy
1. [ISSUE #935](https://github.com/sharding-sphere/sharding-sphere/issues/935) Support to store configuration by using Yaml instead of JSON in registry center.
1. [ISSUE #1004](https://github.com/sharding-sphere/sharding-sphere/issues/1004) Support props configuration for MasterSlave rule.

### Bug Fixes

@@ -36,6 +37,8 @@
1. [ISSUE #806](https://github.com/sharding-sphere/sharding-sphere/issues/806) SQL parse error with `NOT IN`
1. [ISSUE #827](https://github.com/sharding-sphere/sharding-sphere/issues/827) Fix endless loop for bad SQL like `SELECT * FROM table WHERE id IN ()`
1. [ISSUE #919](https://github.com/sharding-sphere/sharding-sphere/issues/919) Use groovy to parse inline expression may cause memory leak
1. [ISSUE #1011](https://github.com/sharding-sphere/sharding-sphere/issues/1011) Can't resolve placeholder in spring boot configuration yaml
1. [ISSUE #1015](https://github.com/sharding-sphere/sharding-sphere/issues/1015) Support the statement of `SELECT id, COUNT(*) FROM table GROUP BY 1,2`

## 2.0.3

+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) 支持不包含列名的INSERT语句的分片与自增主键
1. [ISSUE #916](https://github.com/sharding-sphere/sharding-sphere/issues/916) 支持Sharding Proxy的登录权限认证
1. [ISSUE #935](https://github.com/sharding-sphere/sharding-sphere/issues/935) 取代JSON格式,而将Yaml格式的配置文件存储在注册中心
1. [ISSUE #1004](https://github.com/sharding-sphere/sharding-sphere/issues/1004) 支持在使用读写分离规则时,配置props属性

### 缺陷修正

@@ -36,6 +37,8 @@
1. [ISSUE #806](https://github.com/sharding-sphere/sharding-sphere/issues/806) `NOT IN`解析异常
1. [ISSUE #827](https://github.com/sharding-sphere/sharding-sphere/issues/827)`SELECT * FROM table WHERE id IN ()`这种SQL跳出死循环
1. [ISSUE #919](https://github.com/sharding-sphere/sharding-sphere/issues/919) 使用Groovy解析行表达式可能导致内存泄漏
1. [ISSUE #1011](https://github.com/sharding-sphere/sharding-sphere/issues/1011) 无法在Spring Boot的yaml中处理占位符
1. [ISSUE #1015](https://github.com/sharding-sphere/sharding-sphere/issues/1015) 支持使用`SELECT id, COUNT(*) FROM table GROUP BY 1,2`

## 2.0.3

+8 −2
Original line number Diff line number Diff line
@@ -74,7 +74,13 @@ public enum ShardingPropertiesConstant {
     *
     * <p>Cannot change dynamically, change this value should restart proxy.</p>
     */
    PROXY_MAX_WORKING_THREADS("proxy.max.working.threads", Runtime.getRuntime().availableProcessors() * 2 + "", int.class);
    PROXY_MAX_WORKING_THREADS("proxy.max.working.threads", Runtime.getRuntime().availableProcessors() * 2 + "", int.class),
    
    PROXY_BACKEND_USE_NIO("proxy.backend.use.nio", Boolean.FALSE.toString(), boolean.class),
    
    PROXY_BACKEND_SIMPLE_DB_CONNECTIONS("proxy.backend.simple.db.connections", 8 + "", int.class),
    
    PROXY_BACKEND_CONNECTION_TIMEOUT("proxy.backend.connection.timeout", 60 + "", int.class);
    
    private final String key;
    
+9 −6
Original line number Diff line number Diff line
@@ -72,11 +72,7 @@ public final class ShowTablesMergedResult extends MemoryMergedResult {
                String actualTableName = memoryResultSetRow.getCell(1).toString();
                Optional<TableRule> tableRule = shardingRule.tryFindTableRuleByActualTable(actualTableName);
                if (!tableRule.isPresent()) {
                    if (shardingMetaData.getTableMetaDataMap().keySet().contains(actualTableName) && tableNames.add(actualTableName)) {
                        result.add(memoryResultSetRow);
                    } else if (!shardingMetaData.isSupportedDatabaseType() && tableNames.add(actualTableName)) {
                        result.add(memoryResultSetRow);
                    }
                    addMemoryQueryResultRows(result, memoryResultSetRow, actualTableName);
                } else if (tableNames.add(tableRule.get().getLogicTable())) {
                    memoryResultSetRow.setCell(1, tableRule.get().getLogicTable());
                    result.add(memoryResultSetRow);
@@ -89,6 +85,13 @@ public final class ShowTablesMergedResult extends MemoryMergedResult {
        return result.iterator();
    }
    
    private void addMemoryQueryResultRows(final List<MemoryQueryResultRow> result, final MemoryQueryResultRow memoryResultSetRow, final String actualTableName) {
        if ((shardingMetaData.getTableMetaDataMap().isEmpty() || shardingMetaData.getTableMetaDataMap().keySet().contains(actualTableName)
                || !shardingMetaData.isSupportedDatabaseType()) && tableNames.add(actualTableName)) {
            result.add(memoryResultSetRow);
        }
    }
    
    @Override
    public boolean next() {
        if (memoryResultSetRows.hasNext()) {
Loading