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

FULLTEXT search does not honor case sensitive _bin collations

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.25, 10.4.14, 10.5.5, 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
    • 10.5
    • None

    Description

      This issue seems to exist in all versions of MariaDB and all Versions of MySQL.

      Run the following SQL script:

      drop database if exists `MatchQueryTest`;
      create database `MatchQueryTest`;
      use `MatchQueryTest`;
       
      CREATE TABLE `Herb` (
          `Id` int NOT NULL AUTO_INCREMENT,
          `Name` varchar(255) character set latin1 collate latin1_bin NULL,
          CONSTRAINT `PK_Herb` PRIMARY KEY (`Id`)
      );
       
      INSERT INTO `Herb` (`Id`, `Name`)
      VALUES (1, 'First Herb Name 1');
       
      CREATE FULLTEXT INDEX `IX_Herb_Name` ON `Herb` (`Name`);
       
      SELECT COUNT(*)
      FROM `Herb` AS `h`
      WHERE MATCH (`h`.`Name`) AGAINST ('First*' IN BOOLEAN MODE);
      

      I expect the last SELECT COUNT(*) query to return 1, but instead it returns 0.

      The query works, when the collation is changed from latin1_bin to latin1_general_cs. However, since there are no utf8mb4_general_cs (or utf8_general_cs) or similar collations, this will definitely not work with the UTF-8 character set, which is the defacto standard nowadays.

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              lauxjpn Lau
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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