Home > DeveloperSection > Forums > MYSQL INET_ATON. Did I find a bug or is this known?
Lady Bird Johnson
Lady Bird Johnson

Total Post:20

Posted on    July-09-2013 3:06 AM


 1 Reply(s)
 1578  View(s)
Rate this:
Hi Developers,

Is this a known problem?

select * from 'tablename' where INET_ATON('any valid ip');
Shows the entire db. I accidentally forget to add ipaddress = INET_ATON('ip'); and cganged the entire db.

Thanks in advance. 


Total Post:604

Posted on    July-09-2013 4:37 AM

Hi Lady!

I don't see anything wrong with all rows returned. INET_ATON will return number > 0 if IP is valid OR NULL if IP is invalid. Which means, it's like issuing query

SELECT * FROM `tablename` WHERE 1
(or any other positive number) which will return all rows.

Thanks in advance.

Don't want to miss updates? Please click the below button!

Follow MindStick