[MDEV-6557] INFORMATION_SCHEMA.COLLATION_PROPERTIES Created: 2014-08-11  Updated: 2021-05-11

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Alexander Barkov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-6274 Collation usage statistics Closed

 Description   

We'll introduce a new table INFORMATION_SCHENA.COLLATION_PROPERTIES with
the following structure:

CREATE TABLE INFORMATION_SCHEMA.COLLATION_PROPERTIES
{
  ID INT NOT NULL,
  TAILORING TEXT CHARACTER SET utf8,
  USE_COUNT BIGINT NOT NULL
};

Column description

  • The column TAILORING will return collation definition rules for UCA based
    collations (as defined in strings/ctype-uca.c or in Index.xml) and NULL for non-UCA collations. For example:

    MariaDB [test]> SELECT TAILORING FROM INFORMATION_SCHEMA.COLLATIONS WHERE ID=202;
    +-----------------------------------------------------+
    | TAILORING                                           |
    +-----------------------------------------------------+
    | & C < \u010D <<< \u010C ... & Z < \u017E <<< \u017D |
    +-----------------------------------------------------+

  • The column USE_COUNT will contain collation usage statistics,
    similar to what was previously added into INFORMATION_SCHEMA.PLUGINS
    under terms of MDEV-6274. Unlike I_S.PLUGINS (which exists only if the
    feedback plugins is loaded into the server), the new table
    INFORMATION_SCHEMA.COLLATION_PROPERTIES will always
    exist, thus the column USE_COUNT will give an alternative always available
    access to the collation usage statistics.
  • In the future there will be more fields for other properties,
    like case sensitivity, accent sensitivity, Kana sensitivity,
    Unicode version, number of levels for comparison and sort, etc.

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