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

Select from view with multi-byte charsets gives incorrect result

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
    • 10.11
    • None

    Description

      Test:

      create table t1 (c varchar(30) character set utf8, t text character set utf8, unique (c(2)), unique (t(3))) engine=myisam;
      insert t1 values ('cccc', 'tttt'),
        (0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1),
        (0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1);
       
        select c from t1 where c=0xD0B1212223D0B1D0B1D0B1D0B1D0B1;
       
      create or replace view v1 as select c from t1 where c=0xD0B1212223D0B1D0B1D0B1D0B1D0B1;
      select * from v1;
       
      drop view v1;
      drop table t1;
      

      Expected result:
      Result of

       select c from t1 where c=0xD0B1212223D0B1D0B1D0B1D0B1D0B1; 

      and

       select * from v1; 

      must be the same, but

       select * from v1;

      gives an empty result

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.