Bug #1365 | inet_aton not working in update query | ||
---|---|---|---|
Submitted: | 21 Sep 2003 13:55 | Modified: | 23 Sep 2003 4:32 |
Reporter: | Ron Offerman | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.0.15a | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[21 Sep 2003 13:55]
Ron Offerman
[22 Sep 2003 2:11]
Peter Brodersen
This is not a bug. In your example nodeATON is a signed int, only leaving 31 bits for the positive value. Change it to an unsigned int: ALTER TABLE `nodesATON` CHANGE `nodeATON` `nodeATON` int unsigned; UPDATE `nodesATON` SET `nodeATON` = inet_aton(`nodeINET`); SELECT * FROM `nodesATON`; +----+-------------+------------+ | id | nodeINET | nodeATON | +----+-------------+------------+ | 1 | 192.168.1.1 | 3232235777 | | 2 | 192.168.1.2 | 3232235778 | | 3 | 192.168.1.3 | 3232235779 | +----+-------------+------------+ 3 rows in set (0.01 sec)
[23 Sep 2003 4:32]
Alexander Keremidarski
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Thanks to Peter Brodersen who first answered.