[tarantool-patches] Re: [PATCH 2/3] Add surrogate ID for BINARY collation

Konstantin Osipov kostja at tarantool.org
Thu Nov 1 18:39:15 MSK 2018


* n.pettik <korablev at tarantool.org> [18/11/01 16:11]:
> >> I guess, because
> >> 
> >> 1) It is not real collation and is not presented in
> >> _collation. So for a user it would be strange to see
> >> a gap between 2 and 4 in _collation, which can not be
> >> set.
> > 
> > Let's insert it there.
> 
> So, you insist on id == 3, right? Again, if user process select
> rom _collation space, one won’t see entry with id == 3.
> On the other hand, if user attempts at inserting id == 3,
> one will get an error.

No, I don't insist yet. Why not insert a special row in there?

> >> is consistent to has its ID near COLL_NONE, in a "special
> >> range" of collation identifiers.
> > 
> > Uhm, AFAIU we have two binary collations. One is "collation is not
> > set" and another is "collation binary". Which one did you mean
> > now?
> 
> FIrst one is not collation at all. It is rather “absence” of any collation.
> The second one is sort of “surrogate” and in terms of functionality
> means the same. However, its id will be stored in space format in
> order to indicate that BINARY collation should be forced during
> comparisons.

I think we could use internal ids to reference both cases. For
these both ids we could have surrogate rows in _coll system space,
they won't harm. This will make things easier in the future. 

This is going to be the same mess as with NO ACTION and DEFAULT,
which are mostly the same, but not quite, so we'd better prepare.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov




More information about the Tarantool-patches mailing list