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 04:04:15 UTC

[GitHub] [incubator-shardingsphere] xiyelife edited a comment on issue #3207: the plain column and cipher column are out of order when update

xiyelife edited a comment on issue #3207: the plain column and cipher column are out of order when update
URL: https://github.com/apache/incubator-shardingsphere/issues/3207#issuecomment-541281984
 
 
   @terrymanu  use the latest version , when insert by mybatis, the parameters were still found to be out of ordered.   I think it's the cause of the parameter "time_inst: now()". here is scenario:
   
   
   
   <insert id="insert" parameterType="com.msxf.eyas.model.cust.CustContact">
       insert into cust_contact_sharding (id,cust_id, unique_id, contact_name, 
         contact_relation, contact_mobile, contact_address, 
         time_inst, time_upd)
       values (#{id},#{custId,jdbcType=BIGINT}, #{uniqueId,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, 
         #{contactRelation,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{contactAddress,jdbcType=VARCHAR}, 
          now() , #{timeUpd,jdbcType=TIMESTAMP})
     </insert>
    
    ==>  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 value84719733d69047eba078e914c49488c7,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() , ?)
   2019-10-12 11:52:16.987  INFO 27936 --- [ndDbcryptoTest0] 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**
   
   

----------------------------------------------------------------
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