Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-7311

Mention supported Collation for RocksDB in documentation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
    • Needs Doc:
      Yes

      Description

      As mentioned in the comment of bug PS-4795, the supported collation list should be mentioned in the documentation - https://www.percona.com/doc/percona-server/LATEST/myrocks/limitations.html. 

       

      Right now the documentation doesn't mention the list of the (binary) collations supported but mentioning that RocksDB supports the binary collation. But collation utf8mb4_bin is not supported.  

       

      From a test with 8.0.20-11:

      mysql> show create table ml_explorer_workflows_rocksdb\G
      *************************** 1. row ***************************
             Table: ml_explorer_workflows_rocksdb
      Create Table: CREATE TABLE `ml_explorer_workflows_rocksdb` (
        `add_id` bigint unsigned NOT NULL AUTO_INCREMENT,
        `row_key` binary(16) NOT NULL,
        `column_key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
        `ref_key` bigint NOT NULL,
        PRIMARY KEY (`add_id`),
        UNIQUE KEY `uc_key` (`row_key`,`column_key`,`ref_key`),
      ) ENGINE=ROCKSDB AUTO_INCREMENT=197383376306181 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
      1 row in set (0.00 sec)
      
      mysql> select count(*) from ml_explorer_workflows_rocksdb;
      +----------+
      | count(*) |
      +----------+
      |        5 |
      +----------+
      1 row in set (0.00 sec)
      
      mysql> SELECT row_key, column_key, max(ref_key) FROM ml_explorer_workflows_rocksdb t WHERE t.row_key IN (x'2af067a52XXXXXXX834') AND t.column_key IN ('META','SCHEDULER','DP_META','BASE') GROUP BY t.row_key, t.column_key;  -- (masking the data with XXX)
      +------------------------------------+------------+------------------+
      | row_key                            | column_key | max(ref_key)     |
      +------------------------------------+------------+------------------+
      | 0x2AF067A52XXXXXX5FC834 | BASE       | 159745XXXXXX000 |
      +------------------------------------+------------+------------------+
      

      With changes binary collation:

      mysql> ALTER TABLe ml_explorer_workflows_rocksdb DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
      Query OK, 5 rows affected (0.02 sec)
      Records: 5  Duplicates: 0  Warnings: 0
      
      mysql> ALTER TABLe ml_explorer_workflows_rocksdb change column column_key column_key varchar(191) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL;
      Query OK, 5 rows affected (0.02 sec)
      Records: 5  Duplicates: 0  Warnings: 0
      
      mysql> show create table ml_explorer_workflows_rocksdb\G
      *************************** 1. row ***************************
             Table: ml_explorer_workflows_rocksdb
      Create Table: CREATE TABLE `ml_explorer_workflows_rocksdb` (
        `add_id` bigint unsigned NOT NULL AUTO_INCREMENT,
        `row_key` binary(16) NOT NULL,
        `column_key` varchar(191) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
        `ref_key` bigint NOT NULL,
        PRIMARY KEY (`add_id`),
        UNIQUE KEY `uc_key` (`row_key`,`column_key`,`ref_key`),
      ) ENGINE=ROCKSDB AUTO_INCREMENT=197383376306181 DEFAULT CHARSET=latin1 COLLATE=latin1_bin
      1 row in set (0.00 sec)
      
      mysql> SELECT row_key, column_key, max(ref_key) FROM ml_explorer_workflows_rocksdb t WHERE t.row_key IN (x'2af067a52XXXXXX5fc834') AND t.column_key IN ('META','SCHEDULER','DP_META','BASE') GROUP BY t.row_key, t.column_key; -- masking the data with XXXX
      +------------------------------------+------------+------------------+
      | row_key                            | column_key | max(ref_key)     |
      +------------------------------------+------------+------------------+
      | 0x2AF06XXXXXXx5FC834 | BASE       | 159745XXXXXX000 |
      | 0x2AF067XXXXXXXX5FC834 | DP_META    | 159745XXXXXX000 |
      | 0x2AFXXXXXXXXXXC834 | META       | 159745XXXXXX000 |
      | 0x2AFXXXXXXXXX05FC834 | SCHEDULER  | 159745XXXXXX000 |
      +------------------------------------+------------+------------------+
      4 rows in set (0.00 sec)
      

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              patrick.birch Patrick Birch
              Reporter:
              vinodh.krishnaswamy Vinodh Krishnaswamy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 45 minutes
                  45m