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

cannot convert backslash to swe7

    XMLWordPrintable

Details

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

    Description

      Noticed from testing of MDEV-34911 by lstartseva

      If we do (https://jira.mariadb.org/browse/MDEV-34911?focusedCommentId=295449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-295449)

      explain format=json select * from t where c like 'b\\%_c%'
      

      we get

      query 'explain format=json select * from t where  c like 'b\\%_c%'' failed: ER_CANT_AGGREGATE_2COLLATIONS (1267): Illegal mix of collations (swe7_swedish_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like'
      

      This is caused by a conversion failure caused by a call to my_wc_mb_8bit with a backslash character, see the MDEV-34911 comment linked above, and comments surrounding that comment.

      As observed by psergei:

      MariaDB [test]> set names latin1;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> select convert('\\' using swe7);
      +--------------------------+
      | convert('\\' using swe7) |
      +--------------------------+
      | ?                        |
      +--------------------------+
      1 row in set, 1 warning (0.001 sec)
       
      MariaDB [test]> show warnings;
      +---------+------+--------------------------------------------------+
      | Level   | Code | Message                                          |
      +---------+------+--------------------------------------------------+
      | Warning | 1977 | Cannot convert 'latin1' character 0x5C to 'swe7' |
      +---------+------+--------------------------------------------------+
      1 row in set (0.000 sec)
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              ycp Yuchen Pei
              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.