Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL-rewrite-test phone number createInputParameter error #31001

Open
zzyReal666 opened this issue Apr 24, 2024 · 0 comments
Open

SQL-rewrite-test phone number createInputParameter error #31001

zzyReal666 opened this issue Apr 24, 2024 · 0 comments

Comments

@zzyReal666
Copy link
Contributor

zzyReal666 commented Apr 24, 2024

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

master

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ALL

Expected behavior

SQL rewrite test ,insert phone number shoud regarded as a String;

Actual behavior

SQL rewrite test ,insert phone number now regarded as a number;

Reason analyze (If you can)

I am working for issue 30227 insert SQL.

  • I want to insert data, a virtual phone number '15755557777';

  • This data is encrypted by likeAlgorithm to '04844448888';

  • When insert use mode 'with_columns_for_parameters',data '04844448888' is passed as an argument to method SQLRewriteEngineTestParametersBuilder.createInputParameter.

  • In modthod,'04844448888' is treated as a number.
    image

  • Because it is too long and begin with '0','04844448888'is regarded as a base-8 number.

  • But it incloud number 8,exception throw from this: java.lang.NumberFormatException: For input string: "4844448888" under radix 8

image

  • I change this data to '13211112222',encrypt to '04100001111'
    image
image

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Example codes for reproduce this issue (such as a github link).

-https://github.com/zzyReal666/shardingsphere.git
-branch : issue-30227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant