Hi!

On Sep 11, 2008, at 12:32 PM, Jim Starkey wrote:

Not really. I've never quite understood how collations are supposed to work in MySQL. Is a collation of a property of a session? Of a statement? Of data? And what does the number 127 have to do with the zillion or so collations defined in the world?

I traded a couple of excellent piece of email with Richard Hipp on this that confirmed my opinion about what should be done.

*) Make everything UTF-8. This means your JDBC driver will need to convert from UTF-16 to UTF-8, but that is pretty simple.

If you make everything UTF-8 there are no session variables, no client communications... nothing. Just straight UTF-8.

For collation you want to do at least per schema. Everything else is gravy (Drizzle can do per table/column). The column level is probably too much, but we get it for free.

Implement the general UTF-8 collation first. It solves most problems well. After that pick off the collations as need be.

What is the interaction between and index's collation and the session? Can range retrievals use an index if the session collation does match the index collation?

This is why I would not bother with a session collation. If you have a session collation you are either building a temp index or you are scanning. There is an argument for case sensitive/insensitive but I think there are better application solutions (aka if someone has relied on some case ability... they should have either upped/lowered everything).

The question behind the question is how should Nimbus handle collations. I've got a cleaner piece of paper than you do. Have any advice?


Keep it simple and keep it all one thing. The multiple character set support is a nightmare (think modes... only worse).

Cheers,
        -Brian

BTW don't even think of implementing any sort of hacked up 2/3 byte UTF-8. We can laugh over a beer on this one.

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
_______________________________________________________
You can't grep a dead tree.




_______________________________________________
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