er, finished that last sentence this time....

On 8/1/08, Sheeri K. Cabral <[EMAIL PROTECTED]> wrote:
>
> On 8/1/08, Brian Aker <[EMAIL PROTECTED]> wrote:
>>
>>
>> On Aug 1, 2008, at 3:46 PM, Josh Berkus wrote:
>>
>>  How would you handle a large set of flags then?  BOOL columns?
>>>
>>
>>
>> We have a BIT type, but it really is an 1 byte int in the memory format
>> (aka what we pass around).
>>
>> It is up to an engine to decide how it wants to store it. Right now in
>> Drizzle no engine does this (and MyISAM in theory could but it will take
>> some rework).
>>
>> So right now BIT is just an ALIAS really to saying TINYINT.
>>
>> The operators though operate on any type.
>
>
> I've done pretty interesting things with bitstrings due to MySQL's not
> handling many flags very well, but that's a huge hack and involves
> hard-coding what each position in the bitstring means.
>
> I think for handling, using ENUM/SET is appropriate (though it may also be
> easy enough to alias BIT to be an ENUM if you really want).
>
> As for operators, I'm guessing you mean the ~, !, |, &, <<, >>, and
> groupwise BIT_AND() and BIT_OR() and BIT_XOR().  Given the complete
> brokenness in the way the BIT_AND() function handles NULL (
> http://bugs.mysql.com/bug.php?id=37754), I doubt very many people use it.
> And given my experience, very very very few people use bits unless they're
> flagging something....
>
> ...and even then about 6 months later they realize that they need more than
> 2 values.
>
> I don't believe anyone in Drizzle's target audience is doing bitwise math
> in the database, including left and right shifts, and especially not the
> groupwise functions.  I can see it coming in handy with
>

IP addresses, but given there will be a custom field type of IP addresses, I
don't think there's much of an issue there.

-Sheeri
>
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to