Of course with binary you waste at least one extra byte since it needs to pack the size too, so doing signed int and managing the last bit would be most efficient.
-Eric On Thu, Mar 25, 2010 at 02:12:40PM -0700, Clint Byrum wrote: > You could just keep using a signed int for the IP... its still just bits > after all. > > But really.. a BINARY column makes more sense anyway, since you always have 4 > bytes of binary data in ipv4, and you don't really need to do any math on it. > > On Mar 25, 2010, at 1:19 PM, Tim Soderstrom wrote: > > > I think this came up a while ago, but the lack of unsigned integers has > > been bugging me. I know there is or will be a way to do pluggable types in > > Drizzle but until then, for applications that rely on using unsigned INT > > for IPs, the only work-around I can think of is to use a BIGINT. Which is > > too big for an IPv4 but not big enough for IPv6. AAAH! :) > > > > Thoughts on some ways around that? I fear people will do the naughty and > > start storing IPs as varchars which is quite slow by comparison. > > > > Tim S. > > _______________________________________________ > > Mailing list: https://launchpad.net/~drizzle-discuss > > Post to : [email protected] > > Unsubscribe : https://launchpad.net/~drizzle-discuss > > More help : https://help.launchpad.net/ListHelp > > > _______________________________________________ > Mailing list: https://launchpad.net/~drizzle-discuss > Post to : [email protected] > Unsubscribe : https://launchpad.net/~drizzle-discuss > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

