You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/17 01:43:30 UTC
[GitHub] [shardingsphere] valleyG commented on issue #12501: NullPointerException ,when use broadcast_table ,execute sql contain "count()".
valleyG commented on issue #12501:
URL: https://github.com/apache/shardingsphere/issues/12501#issuecomment-921383273
@strongduanmu
thanks!
```yaml
spring:
shardingsphere:
datasource:
names: ds1,ds2
common:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 32
minimum-idle: 10
ds1:
jdbc-url: jdbc:mysql://192.168.73.106:3306/test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&&allowMultiQueries=true&socketTimeout=60000&connectTimeout=30000
username: root
password: 123456
ds2:
jdbc-url: jdbc:mysql://192.168.73.106:3306/test_1?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&&allowMultiQueries=true&socketTimeout=60000&connectTimeout=30000
username: root
password: 123456
rules:
sharding:
broadcastTables:
broadcast_table
tables:
#逻辑表名
user_info:
#实际数据节点
actual-data-nodes: ds$->{1..2}.user_info
#分库策略
database-strategy:
standard:
sharding-column: name
sharding-algorithm-name: name-hash-mod
#分片策略配置
sharding-algorithms:
name-hash-mod:
type: HASH_MOD
props:
modAcc: 2
initUtil: true
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
props:
sql-show: true
sql-simple: false
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org