Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21449

Wrong collation for new table when all defaults set.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Confirmed (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: N/A
    • Component/s: Documentation
    • Labels:
    • Environment:
      Linux and Windows

      Description

      If the database collation is 'utf8mb4_unicode_520_ci', I expect new tables with character set utf8mb4 will have that same collation. However, the new table created has collation 'utf8mb4_general_ci';

       
      SET collation_connection = 'utf8mb4_unicode_520_ci';
      SET NAMES 'utf8mb4' COLLATE 'utf8mb4_unicode_520_ci';
      SET CHARACTER SET 'utf8mb4';
      CREATE DATABASE test CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_520_ci';
       
      CREATE TABLE `test`.`tester` (
        `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
        `name` varchar(191) NOT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
       
      select TABLE_COLLATION from tables where TABLE_SCHEMA = 'test' AND TABLE_NAME = 'tester';
       
      +--------------------+
      | TABLE_COLLATION    |
      +--------------------+
      | utf8mb4_general_ci |
      +--------------------+
      
      

      why?

        Attachments

          Activity

            People

            Assignee:
            KennethDyer Kenneth Dyer
            Reporter:
            fforte Frank Forte
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: