Commit bb22fa35 authored by terrymanu's avatar terrymanu
Browse files

fixed at 2.0.0.m1

parent b4dd3298
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
## 2.0.0.M1

### 缺陷修正

1. [ISSUE #387](https://github.com/shardingjdbc/sharding-jdbc/issues/387) 当函数+列名中存在'`'防止关键字时处理出错

## 1.5.4.1

### 缺陷修正
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
package io.shardingjdbc.core.merger.common;

import io.shardingjdbc.core.merger.ResultSetMerger;
import io.shardingjdbc.core.util.SQLUtil;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

@@ -61,7 +62,7 @@ public abstract class AbstractMemoryResultSetMerger implements ResultSetMerger {
        if (Blob.class == type || Clob.class == type || Reader.class == type || InputStream.class == type || SQLXML.class == type) {
            throw new SQLFeatureNotSupportedException();
        }
        Object result =  currentResultSetRow.getCell(labelAndIndexMap.get(columnLabel));
        Object result =  currentResultSetRow.getCell(labelAndIndexMap.containsKey(columnLabel) ? labelAndIndexMap.get(columnLabel) : labelAndIndexMap.get(SQLUtil.getExactlyValue(columnLabel)));
        wasNull = null == result;
        return result;
    }
+5 −0
Original line number Diff line number Diff line
@@ -25,4 +25,9 @@
            <data expected="select_aggregate/SelectAvg.xml" />
        </sharding-rule>
    </sql>
    <sql id="assertSelectCountForSpecialSymbol">
        <sharding-rule>
            <data expected="select_aggregate/SelectCount.xml" />
        </sharding-rule>
    </sql>
</sqls>
+1 −0
Original line number Diff line number Diff line
@@ -5,4 +5,5 @@
    <sql id="assertSelectMax" value="SELECT MAX(user_id) AS max_user_id FROM t_order" />
    <sql id="assertSelectMin" value="SELECT MIN(user_id) AS min_user_id FROM t_order" />
    <sql id="assertSelectAvg" value="SELECT AVG(user_id) AS user_id_avg FROM t_order" />
    <sql id="assertSelectCountForSpecialSymbol" value="SELECT COUNT(`user_id`) AS orders_count FROM t_order" type="MySQL" />
</sqls>