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

Inavlid polish collation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.27-galera
    • N/A
    • Character Sets
    • None
    • openSUSE 42.2 (x86_64)

    Description

      Sample table:

      CREATE TABLE `product` (
      	`id` INT(11) NOT NULL AUTO_INCREMENT,
      	`productName` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_polish_ci',
      	PRIMARY KEY (`id`)
      )
      COLLATE='utf8_polish_ci'
      ENGINE=InnoDB
       
      INSERT INTO `product` (`id`, `productName`) VALUES (1, 'maka');
      INSERT INTO `product` (`id`, `productName`) VALUES (2, 'mąka');
      INSERT INTO `product` (`id`, `productName`) VALUES (3, 'Mąka');
      INSERT INTO `product` (`id`, `productName`) VALUES (4, 'lodz');
      INSERT INTO `product` (`id`, `productName`) VALUES (5, 'łódź');
      INSERT INTO `product` (`id`, `productName`) VALUES (6, 'Łódź');
      

      Now I don't understand why query:

      SELECT * FROM `product` WHERE productName collate utf8_polish_ci LIKE '%maka%';
      

      returns only 1 row. Forcing utf8_unicode_ci shows 3 results, but for:

      SELECT * FROM `product` WHERE productName collate utf8_unicode_ci LIKE '%lodz%';
      

      there is again 1 result. Ł and ł letters are not mapped to l. This should work according to http://unicode.org/repos/cldr/tags/latest/common/collation/pl.xml

      Attachments

        Activity

          People

            bar Alexander Barkov
            viking Marek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.