-
Notifications
You must be signed in to change notification settings - Fork 2.5k
bignum didn't take care in where statment #783
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
Comments
yes, for bignum "123" and "123f" are same numbers (I guess you are using https://www.npmjs.org/package/bignum ) > a = bignum("123")
<BigNum 123>
> b = bignum("123f")
<BigNum 123>
> a == b
false
> a.eq(b)
true why don't you just compare original strings for equality? |
@linbo we don't convert to You'll notice that if you go to a MySQL console and run SELECT id from table_name where uid='123f'; MySQL itself will select where
|
If you need to, you'll need to manually do a |
@dougwilson thanks. uid is passed by HTTP GET request params. Looks I need check GET request params by myself before query MySQL. |
Fixes mysqljs#741 Signed-off-by: INADA Naoki <[email protected]>
Here in my table, defined uid column type is bigint
I query table filter by uid
But if I pass wrong uid, it also works.
Is it because bignum didn't do restrict conversion?
The text was updated successfully, but these errors were encountered: