[MDEV-21504] Collation: Create shared library for engines to use Created: 2020-01-16  Updated: 2020-04-21  Resolved: 2020-04-21

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Fix Version/s: N/A

Type: Task Priority: Critical
Reporter: David Hall (Inactive) Assignee: Vladislav Vaintroub
Resolution: Won't Do Votes: 1
Labels: None

Issue Links:
Blocks
blocks MCOL-337 support full spec for character set c... Closed
blocks MCOL-495 Make string comparison not case sensi... Closed
blocks MCOL-1374 Support utf8mb4 Closed
blocks MCOL-1941 Add support for ALTER TABLE ... CONVE... Closed
blocks MCOL-2000 varchar specified sizing is not in ch... Closed
blocks MCOL-3323 Pentaho plugin strange behavior when ... Closed
blocks MCOL-3536 Order by with UTF Closed
blocks MCOL-3879 ExeMgr crash on select - SELECT TABLE... Closed
is blocked by MDEV-21581 Helper functions and methods for CHAR... Closed

 Description   

In order for handler engines, e.g. columnstore, to collate correctly and identically to innodb, we need access to the same collation code as the server. currently this code is included in server as object files, making it difficult for other projects to include it. This JIRA is a request to include the code in a shared library accessible by both the server and engines.

Note that having it as service is not enough, because some engines (e.g. columnstore) has separately running binaries that needs to collate strings too.



 Comments   
Comment by David Hall (Inactive) [ 2020-02-06 ]

Added the proper link to show what is blocked.

Comment by Sergei Golubchik [ 2020-03-25 ]

I think we can start with a static library, if that turns out to be simpler

Comment by Vladislav Vaintroub [ 2020-04-03 ]

David.Hall, the collation code is in "strings" library, which depends on , or rather like interdepends on mysys and dbug.
In CMake, you'd need to
TARGET_LINK_LIBRARIES(your_binary strings)

I would not do that in storage engine code, since it can use symbols from the server. But in an executable it should work.
Any reason you can't use static library?

Comment by Sergei Golubchik [ 2020-04-03 ]

Part of the code is in mysys, so one might need TARGET_LINK_LIBRARIES(your_binary mysys) too.

Comment by David Hall (Inactive) [ 2020-04-03 ]

There's no reason we can't use a static lib. If it makes it easier for you, lets do it that way.
We can link whatever libs we need, so long as I can find them at link time. I don't think code bloat will be an issue here.

Comment by Vladislav Vaintroub [ 2020-04-08 ]

Code bloat is not an issue, those libraries are rather tiny. David.Hall, should be keep the issue open, or can we close this, if static linking works for you?

Comment by David Hall (Inactive) [ 2020-04-09 ]

If the libs are ready, this can be closed. I may need to bother you if I have problems getting things to link. Probably won't have a problem, but you never know.

Comment by Vladislav Vaintroub [ 2020-04-09 ]

The libs are "strings", they are there, and always been, during the server build. The interdependency between strings and mysys is mentioned by serg, so one might need to link with mysys as well, and also with dbug.

Comment by Sergei Golubchik [ 2020-04-10 ]

Supporting collation/charset code is in mysys — loading, comparing, compiling, etc. Actual collations/charsets are in string.

Comment by Vladislav Vaintroub [ 2020-04-21 ]

I'm closing it for now. Hopefully there is no problems with proposed solution (static libs)

Generated at Thu Feb 08 09:07:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.