shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

MySQL sharding encrypt test

Open codefairy08 opened this issue 7 years ago • 0 comments

This issue is for sharding encrypt parsing test. when using encryption for sharding, it needs SQL parser doing something for encryption, SQL parser need genereate EncryptColumnToken and encrypt Conditions. the test just check both of them which are expected. The following is the specific design:

  • [x] add encrypt rule for test, take column 'status' of table 't_order' as encrypt column
  • [x] parse DML statement fill EncryptColumnToken and encrypt Conditions into DMLStatement
  • [x] add ExpectedEncryptColumnToken hold expect value in files ex: delete.xml,update.xml, EncryptColumnToken startIndex and stopIndex are different between placeholder and literal, so there are two couple fields one for placeholder, the other for placeholder
  • [x] add EncryptColumnTokenAssert check EncryptColumnToken in DMLStatement
  • [x] add check for encrypt Conditions

codefairy08 avatar Mar 29 '19 08:03 codefairy08