Re: IP regex
"Vladimir V. Kolpakov" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Oct 31, 2004 at 11:31:33PM -0500, Jamie McCarthy wrote: > [email protected] (Vladimir V. Kolpakov) writes: > > On Sun, Oct 31, 2004 at 02:02:26PM -0500, Michael Stassen wrote: > > > Then you store an IP using INET_ATON(IP) and retrieve it with > > > INET_NTOA(ip_column). That takes 4 bytes instead of 8 to 16 > > > > It's very common mistake, -- to think integer occupies in > > databases 4 bytes. Please look DESC on your table, and you can > > find it takes 11 bytes, because is stored in character form. > > You misunderstand the output of DESCRIBE. INT is stored in 4 bytes. > The "(11)" is the display width, which doesn't really affect anything > done through the perl interface. It's true,... but only for field data either, -- unless index is not created. --w -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]