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/08/25 02:23:38 UTC
[GitHub] [shardingsphere] xize0 commented on issue #11989: If the sharding-proxy is accessed through JDBC statements in the project, is it possible to set the table name case insensitive? If the table name in the proxy is 'userinfo' and my JDBC statement is 'userInfo', an error will be reported
xize0 commented on issue #11989:
URL: https://github.com/apache/shardingsphere/issues/11989#issuecomment-905120275
Run official image with Docker
`schemaName: sharding
dataSources:
ds:
url: jdbc:mysql://192.168.1.106:3306/sharding?allowMultiQueries=true&useUnicode&characterEncoding=UTF-8&autoReconnect=true&useSSL=true&verifyServerCertificate=false&requireSSL=true&zeroDateTimeBehavior=convertToNull
username: test
password: tgb123_321
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !SHARDING
tables:
topics:
actualDataNodes: ds.topics_${0..9}
tableStrategy:
standard:
shardingColumn: userID
shardingAlgorithmName: topics_inline
topics_info:
actualDataNodes: ds.topics_info_${0..9}
tableStrategy:
standard:
shardingColumn: userID
shardingAlgorithmName: topics_info_inline
replies:
actualDataNodes: ds.replies_${0..9}
tableStrategy:
standard:
shardingColumn: topicID
shardingAlgorithmName: replies_inline
replies_info:
actualDataNodes: ds.replies_info_${0..9}
tableStrategy: #分表规则
standard:
shardingColumn: topicID
shardingAlgorithmName: replies_info_inline
replies_user:
actualDataNodes: ds.replies_user_${0..9}
tableStrategy:
standard:
shardingColumn: userID
shardingAlgorithmName: replies_user_inline
tops:
actualDataNodes: ds.tops_${0..9}
tableStrategy:
standard:
shardingColumn: userID
shardingAlgorithmName: tops_inline
cardRecord:
actualDataNodes: ds.cardRecord_${0..9}
tableStrategy:
standard:
shardingColumn: userID
shardingAlgorithmName: cardRecord_inline
bindingTables:
- topics,topics_info,replies,replies_info,replies_user,tops,cardRecord
defaultDatabaseStrategy:
defaultTableStrategy:
none:
shardingAlgorithms:
topics_inline:
type: INLINE
props:
algorithm-expression: topics_${userID % 10}
topics_info_inline:
type: INLINE
props:
algorithm-expression: topics_info_${userID % 10}
replies_inline:
type: INLINE
props:
algorithm-expression: replies_${topicID % 10}
replies_info_inline:
type: INLINE
props:
algorithm-expression: replies_info_${topicID % 10}
replies_user_inline:
type: INLINE
props:
algorithm-expression: replies_user_${userID % 10}
tops_inline:
type: INLINE
props:
algorithm-expression: tops_${userID % 10}
cardRecord_inline:
type: INLINE
props:
algorithm-expression: cardRecord_${userID % 10}
`
`SQL:select userName,userID,USERACTIVITYDT,Active,checkflag from userInfo where userID = ?`
The userinfo table is not a sharding rule table. The name of the original database table is userinfo. The agent link causes an error, and the table cannot be queried
--
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