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/10/12 07:40:57 UTC
[GitHub] [incubator-shardingsphere] xiyelife opened a new issue #3234: When
insert by mybatis, the parameters were still found to be out of ordered.
xiyelife opened a new issue #3234: When insert by mybatis, the parameters were still found to be out of ordered.
URL: https://github.com/apache/incubator-shardingsphere/issues/3234
### Which version of ShardingSphere did you use?
4.0.0-RC3-SNAPSHOT
### Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
### Expected behavior
insert correct
### Actual behavior
When insert by mybatis, the parameters were still found to be out of ordered.
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
==> Preparing: insert into cust_contact_sharding (id,cust_id, unique_id, contact_name, contact_relation, contact_mobile, contact_address, time_inst, time_upd) values (?,?, ?, ?, ?, ?, ?, now() , ?)
==> Parameters: 117001(Long), 4(Long), 84719733d69047eba078e914c49488c7(String), 歉(String), TEST(String), 15907200513(String), 测试地址(String), null
sharding value 84719733d69047eba078e914c49488c7,value after sharding cust_contact_6
Rule Type: sharding
Logic SQL: insert into cust_contact_sharding (id,cust_id, unique_id, contact_name,
contact_relation, contact_mobile, contact_address,
time_inst, time_upd)
values (?,?, ?, ?,
?, ?, ?,
now() , ?)
ShardingSphere-SQL: SQLStatement: InsertSQLStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.core.parse.sql.statement.dml.InsertStatement@1723c231, tablesContext=TablesContext(tables=[Table(name=cust_contact_sharding, alias=Optional.absent())], schema=Optional.absent())), columnNames=[id, cust_id, unique_id, contact_name, contact_relation, contact_mobile, contact_address, time_inst, time_upd], insertValueContexts=[InsertValueContext(parametersCount=8, valueExpressions=[ParameterMarkerExpressionSegment(startIndex=170, stopIndex=170, parameterMarkerIndex=0), ParameterMarkerExpressionSegment(startIndex=172, stopIndex=172, parameterMarkerIndex=1), ParameterMarkerExpressionSegment(startIndex=175, stopIndex=175, parameterMarkerIndex=2), ParameterMarkerExpressionSegment(startIndex=178, stopIndex=178, parameterMarkerIndex=3), ParameterMarkerExpressionSegment(startIndex=188, stopIndex=188, parameterMarkerIndex=4), ParameterMarkerExpressionSegment(startIndex=191, stopIndex=191, parameterMarkerIndex=5), ParameterMarkerExpressionSegment(startIndex=194, stopIndex=194, parameterMarkerIndex=6), CommonExpressionSegment(startIndex=205, stopIndex=209, text=now()), ParameterMarkerExpressionSegment(startIndex=213, stopIndex=213, parameterMarkerIndex=7), DerivedParameterMarkerExpressionSegment(super=ParameterMarkerExpressionSegment(startIndex=0, stopIndex=0, parameterMarkerIndex=8)), DerivedParameterMarkerExpressionSegment(super=ParameterMarkerExpressionSegment(startIndex=0, stopIndex=0, parameterMarkerIndex=9)), DerivedParameterMarkerExpressionSegment(super=ParameterMarkerExpressionSegment(startIndex=0, stopIndex=0, parameterMarkerIndex=10))], parameters=[117001, 4, 84719733d69047eba078e914c49488c7, 歉, TEST, 15907200513, 测试地址, null])])
Actual SQL: ds0
::: insert into cust_contact_6 (id,cust_id, unique_id, contact_name_enc,
contact_relation, contact_mobile_enc, contact_address_enc,
time_inst, time_upd, contact_name, **contact_mobile, contact_address**)
values (?, ?, ?, ?, ?, ?, ?, now(), ?, ?, ?, ?)
::: [117001, 4, 84719733d69047eba078e914c49488c7, *n08ZSeAE+q5GlnThhlUqhAg==,
TEST, *mJeSoexiPoMJYtc6tM8/Ggw==, *aBNIM+OZDMbR9FRHMUYeej7zfTz0WMhaq0pJfT0voBt2wpN0malEcyYDjuA18AO84GkUjtoaMHXEdfyLQZ5fo/g==,
null, 歉, **测试地址, 15907200513**]
_the follow parameter has been inverse:_
**contact_mobile, contact_address
测试地址, 15907200513**
### Example codes for reproduce this issue (such as a github link).
----------------------------------------------------------------
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