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

Get unexpected "1300 (HY000): Invalid utf8mb4 character string: 'FF'" when using c1 LIKE X'FF"

    XMLWordPrintable

Details

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

    Description

      Output:

      mysql> create table t1(c1 char(20));
      update t1 set c1 = 'b' where c1 like X'FF'Query OK, 0 rows affected (0.00 sec)
       
      mysql> insert into t1 values('a');
      Query OK, 1 row affected (0.00 sec)
       
      mysql> update t1 set c1 = 'b' where c1 like X'FF';
      {color:#f6c342}
      ERROR 1300 (HY000): Invalid utf8mb4 character string: 'FF'
      {color}
      
      

      Recreate:

       
      set names 'utf8mb4';
      drop table if exists t1;
      create table t1(c1 char(20));
      insert into t1 values('a');
      update t1 set c1 = 'b' where c1 like X'FF';
      
      

      Problem:
      Success is expected without error.

      Attachments

        Activity

          People

            bar Alexander Barkov
            dylan Dylan Su
            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.