On 12 Jul 2008, at 07:15, Brian Aker wrote:

Hi!

On Jul 12, 2008, at 3:03 AM, Antony T Curtis wrote:

Remove support for 64 bit unsigned type... It would remove a bunch of special-case handling.. If you want to support 64bit unsigned, consider adding in support for 128bit signed type (HUGEINT?).

128bit number could just be a UUID. This came up as a topic last night at a party I was at. There has been some talk about restructuring the class a bit, and I believe when I get around to that, I will go on and add this type. I also want to benchmark our UUID() generator vs the one shipped with Linux/OSX. From what I am hearing it is much slower then the daemon based one that comes on the system.

UUID generation must be made good. It would be very useful for people in multi-master situation where they can have a column declared as:

        my_id   HUGEINT NOT NULL PRIMARY KEY AUTO_UUID,

Where AUTO_UUID is an alternative to AUTO_INCREMENT and the UUID would be returned in LAST_INDEX_ID() as expected. Then no need to worry about sharding the primary key: It should be very unlikely for pk collision.


By making the largest integer type signed, you can then handle all unsigned types smaller than it by simple masking and then you also don't need to carry around an extra signed/unsigned flag for special case processing like we must for unsigned bigints in mysqld today.


Yep, we are of similar minds on this. To me SIGNED/UNSIGNED is really just a constraint anyways.

It would get rid of the val_int/val_uint mess and special case casting etc that mysql has right now.

I also believe that there are many applications where a 128bit integer type would be useful but afaik few mainstream dbms support it natively.

Regards,
Antony

_______________________________________________
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