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 2019/08/14 09:59:24 UTC
[GitHub] [incubator-shardingsphere] yangjwInRiver removed a comment on issue
#2819: How to turn off keyGenerator feature in 4.0.0-RC1 version
yangjwInRiver removed a comment on issue #2819: How to turn off keyGenerator feature in 4.0.0-RC1 version
URL: https://github.com/apache/incubator-shardingsphere/issues/2819#issuecomment-521183159
`spring:
main:
allow-bean-definition-overriding: true
shardingsphere:
datasource:
names: master,slave
master:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: ${spring.datasource.master.driver-class-name}
url: ${mysql.master.url}/faceaccount?useUnicode=true&characterEncoding=utf8&useSSL=false
username: ${spring.datasource.master.username}
password: ${spring.datasource.master.password}
slave:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: ${spring.datasource.slave.driver-class-name}
url: ${mysql.slave.url}/faceaccount?useUnicode=true&characterEncoding=utf8&useSSL=false
username: ${spring.datasource.slave.username}
password: ${spring.datasource.slave.password}
sharding:
tables:
t_account_record:
actual-data-nodes: ds0.t_account_record_20190${1..9},ds0.t_account_record_2019${10..12}
table-strategy:
complex:
sharding-columns: record_no,gmt8_create,account_no
algorithm-class-name: com.yitu.ispd.faceaccount.core.strategy.dbsharding.FuComplexShardingAlgorithm
# standard:
# sharding-column: gmt8_create
# precise-algorithm-class-name: com.yitu.ispd.faceaccount.core.strategy.dbsharding.FuPreciseShardingAlgorithm
# range-algorithm-class-name: com.yitu.ispd.faceaccount.core.strategy.dbsharding.FuRangeShardingAlgorithm
master-slave-rules:
ds0:
master-data-source-name: master
slave-data-source-names: slave
props:
sql:
show: true`
`Logic SQL: INSERT INTO t_account_record ( id,
record_no,
order_no,
account_no,
trade_type,
amount,
fee_rate,
trade_time,
complete_time,
channel_type,
channel_no,
fund_direction,
status,
owner_type,
track,
gmt8_create ) VALUES ( ?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
? )
2019-08-14 17:52:45.242 INFO 10800 --- [nio-9036-exec-1] ShardingSphere-SQL : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_account_record, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=record_no, tableName=t_account_record), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=1}), Condition(column=Column(name=account_no, tableName=t_account_record), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=3}), Condition(column=Column(name=gmt8_create, tableName=t_account_record), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=15})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_account_record, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=30)], parametersIndex=16, logicSQL=INSERT INTO t_account_record ( id,
record_no,
order_no,
account_no,
trade_type,
amount,
fee_rate,
trade_time,
complete_time,
channel_type,
channel_no,
fund_direction,
status,
owner_type,
track,
gmt8_create ) VALUES ( ?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
? )), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[id, record_no, order_no, account_no, trade_type, amount, fee_rate, trade_time, complete_time, channel_type, channel_no, fund_direction, status, owner_type, track, gmt8_create], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@c11dc0e, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@bfdb2da, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@23494c60, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@24ed7bbd, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@261e2282, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@40932ff9, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@295051c7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@662ff7c3, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@31f2c3b6, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@6847de96, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@43327430, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5aba027a, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@7d7295e8, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@2b1747be, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@7b543518, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@717741da])])
2019-08-14 17:52:45.242 INFO 10800 --- [nio-9036-exec-1] ShardingSphere-SQL : Actual SQL: master ::: INSERT INTO t_account_record_201908 (id, record_no, order_no, account_no, trade_type, amount, fee_rate, trade_time, complete_time, channel_type, channel_no, fund_direction, status, owner_type, track, gmt8_create) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ::: [1161576361672871937, RD1161576357721800769201908, PR76650-1618005454-2093736587, AT1161537493854584848, 2, 6.00, 0, 2019-08-14 17:52:34.0, 2019-08-14 17:52:39.389, 4, AT22, 1, 1, 3, TK1161576357679857730, 2019-08-14 17:52:39.391]
2019-08-14 17:52:45.249 INFO 10800 --- [nio-9036-exec-1] ShardingSphere-SQL : Rule Type: sharding
2019-08-14 17:52:45.249 INFO 10800 --- [nio-9036-exec-1] ShardingSphere-SQL : Logic SQL: INSERT INTO t_account_record ( id,
record_no,
order_no,
account_no,
trade_type,
amount,
fee_rate,
trade_time,
complete_time,
channel_type,
channel_no,
fund_direction,
status,
owner_type,
track,
gmt8_create ) VALUES ( ?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
? )
2019-08-14 17:52:45.249 INFO 10800 --- [nio-9036-exec-1] ShardingSphere-SQL : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_account_record, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=record_no, tableName=t_account_record), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=1}), Condition(column=Column(name=account_no, tableName=t_account_record), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=3}), Condition(column=Column(name=gmt8_create, tableName=t_account_record), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=15})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_account_record, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=30)], parametersIndex=16, logicSQL=INSERT INTO t_account_record ( id,
record_no,
order_no,
account_no,
trade_type,
amount,
fee_rate,
trade_time,
complete_time,
channel_type,
channel_no,
fund_direction,
status,
owner_type,
track,
gmt8_create ) VALUES ( ?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
? )), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[id, record_no, order_no, account_no, trade_type, amount, fee_rate, trade_time, complete_time, channel_type, channel_no, fund_direction, status, owner_type, track, gmt8_create], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@c11dc0e, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@bfdb2da, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@23494c60, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@24ed7bbd, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@261e2282, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@40932ff9, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@295051c7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@662ff7c3, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@31f2c3b6, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@6847de96, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@43327430, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5aba027a, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@7d7295e8, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@2b1747be, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@7b543518, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@717741da])])
2019-08-14 17:52:45.249 INFO 10800 --- [nio-9036-exec-1] ShardingSphere-SQL : Actual SQL: master ::: INSERT INTO t_account_record_201908 (id, record_no, order_no, account_no, trade_type, amount, fee_rate, trade_time, complete_time, channel_type, channel_no, fund_direction, status, owner_type, track, gmt8_create) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ::: [1161576382317236225, RD1161576357721800769201908, PR76650-1618005454-2093736587, AT22, 4, 6.00, 0, 2019-08-14 17:52:34.0, 2019-08-14 17:52:39.389, 4, AT1161537493854584848, 3, 1, 2, TK1161576357679857730, 2019-08-14 17:52:39.392]`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services