Weird problem here running 3.23.55-Max. I'm (still) trying to get my IP address DB working, but have run into a problem.
When I use the inet_aton function during an insert, I get a very different value than if I use the function by itself on the CLI. Please see below. The IP address I am trying to use is 172.20.20.2. When I run select inet_aton("172.20.20.2") on the CLI, I get 2886996994, which is the correct value; when I run the same function during an insert, I get 2147483647, which is not correct. Any thoughts on this one? I'm stumped. mysql> describe host; +--------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+-------------+------+-----+---------+-------+ | name | varchar(20) | | PRI | | | | ip | int(4) | | | 0 | | | admin | varchar(30) | | | | | | subnet | varchar(20) | | | | | +--------+-------------+------+-----+---------+-------+ 4 rows in set (0.01 sec) mysql> insert into host values ( -> "Test1", -> inet_aton("172.20.20.2"), -> "Pixies", -> "Elive" -> ); Query OK, 1 row affected (0.00 sec) mysql> select * from host; +--------+------------+--------+----------+ | name | ip | admin | subnet | +--------+------------+--------+----------+ | Test1 | 2147483647 | admin1 | sub1 | +--------+------------+--------+----------+ 1 row in set (0.01 sec) mysql> select inet_ntoa(2147483647); +-----------------------+ | inet_ntoa(2147483647) | +-----------------------+ | 127.255.255.255 | +-----------------------+ 1 row in set (0.00 sec) mysql> select inet_aton("172.20.20.2"); +--------------------------+ | inet_aton("172.20.20.2") | +--------------------------+ | 2886996994 | +--------------------------+ 1 row in set (0.00 sec) ---------- Aaron Conaway Network Engineer III Verisign, Inc. -- Telecom Services Division http://www.verisign.com Office: 912.527.4343 Fax: 912.527.4014 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php