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

Wrong sort order when Collation = latin1_swedish_ci

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.20
    • N/A
    • Character Sets
    • None

    Description

      DROP TABLE IF EXISTS `table1`;
      CREATE TABLE IF NOT EXISTS `table1` (
        `Tekst` varchar(255) CHARACTER SET latin1 NOT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
      INSERT INTO `table1` (`Tekst`) VALUES
      ('A'),
      ('a'),
      ('b'),
      ('c'),
      ('d'),
      ('E'),
      ('e'),
      ('O'),
      ('o'),
      ('Æ'),
      ('Ø'),
      ('Å'),
      ('æ'),
      ('ø'),
      ('å'),
      ('x'),
      ('y'),
      ('z');
       
      SHOW FULL COLUMNS FROM table1;	=> Collation = latin1_swedish_ci
       
      USE test;
      show variables like 'character%';	
       
      => 
      Variable_name				Value
      -----------------------------------
      character_set_client		utf8mb4
      character_set_connection	utf8mb4
      character_set_database		latin1
      character_set_filesystem		binary
      character_set_results		utf8mb4
      character_set_server		utf8
      character_set_system		utf8
       
      SELECT * FROM table1 ORDER BY Tekst ASC
       
      Tekst
      A
      a
      b
      c
      d
      e
      E
      O
      o
      x
      y
      z
      Å
      å
      æ
      Æ
      ø
      Ø
       
      Problem: 
      1 - Å and å before æ (should be last)
      2 - æ before Æ (flipped)
      3 - ø before Ø (flipped)
      4 - e before E (flipped)
       
      ENGINE=InnoDB DEFAULT CHARSET=latin1; <= Gives same result

      Is this is a bug or is it my setup that causes problems?

      Attachments

        Activity

          People

            bar Alexander Barkov
            terje Terje Rosenlund
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.