---
title: "MYSQL INET_ATON. Did I find a bug or is this known?"  
description: "MYSQL INET_ATON. Did I find a bug or is this known?"  
author: "Lady Bird Johnson"  
published: 2013-07-09  
updated: 2013-07-09  
canonical: https://www.mindstick.com/forum/1271/mysql-inet_aton-did-i-find-a-bug-or-is-this-known  
category: "mysql"  
tags: ["mysql"]  
reading_time: 1 minute  

---

# MYSQL INET_ATON. Did I find a bug or is this known?

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs),\
Is this a known [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic)?\
[select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) * from '[tablename](https://www.mindstick.com/forum/34722/how-to-get-label-text-from-table-reference-on-database-based-on-tablename-and-fieldname)' where INET_ATON('any valid ip');[Shows](https://yourviews.mindstick.com/view/81380/new-york-violent-shooting-shows-people-are-not-safe-in-night-life) the entire db. I accidentally forget to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) ipaddress = INET_ATON('ip'); and cganged the entire db.\
Thanks in advance.

## Replies

### Reply by AVADHESH PATEL

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.


---

Original Source: https://www.mindstick.com/forum/1271/mysql-inet_aton-did-i-find-a-bug-or-is-this-known

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
