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

View in view protocol uses incorrect character set with util connection

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Won't Fix
    • 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
    • 10.6.16
    • Tests

    Description

      Start from 10.6 in view protocol it is used incorrect character set with util connection.

      Test:

      CREATE TABLE BUG_12595(a varchar(100));
      INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");
      SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '';
      drop table BUG_12595;
      

      Expected result:

      a
      

      Actual result:

      a
      hakan%
      

      mysqltest_tmp_v.frm before 10.6 (and with --disable_service_connection)

      TYPE=VIEW
      query=select `test`.`BUG_12595`.`a` AS `a` from `test`.`BUG_12595` where `test`.`BUG_12595`.`a` like \'hakan\\\\%\' escape \'\'
      md5=795ea511c105046a1e37b98c01816f16
      updatable=1
      algorithm=0
      definer_user=root
      definer_host=localhost
      suid=2
      with_check_option=0
      timestamp=2022-09-22 05:22:03
      create-version=2
      source=SELECT * FROM BUG_12595 WHERE a LIKE \'hakan\\%\' ESCAPE \'\'
      client_cs_name=latin1
      connection_cl_name=latin1_swedish_ci
      view_body_utf8=select `test`.`BUG_12595`.`a` AS `a` from `test`.`BUG_12595` where `test`.`BUG_12595`.`a` like \'hakan\\\\%\' escape \'\'
      mariadb-version=100427
      

      mysqltest_tmp_v.frm start form 10.6:

      TYPE=VIEW
      query=select `test`.`BUG_12595`.`a` AS `a` from `test`.`BUG_12595` where `test`.`BUG_12595`.`a` like \'hakan\\\\%\' escape \'\'
      md5=795ea511c105046a1e37b98c01816f16
      updatable=1
      algorithm=0
      definer_user=root
      definer_host=localhost
      suid=2
      with_check_option=0
      timestamp=2022-11-30 05:35:19
      create-version=2
      source=SELECT * FROM BUG_12595 WHERE a LIKE \'hakan\\%\' ESCAPE \'\'
      client_cs_name=utf8mb4
      connection_cl_name=utf8mb4_general_ci
      view_body_utf8=select `test`.`BUG_12595`.`a` AS `a` from `test`.`BUG_12595` where `test`.`BUG_12595`.`a` like \'hakan\\\\%\' escape \'\'
      mariadb-version=100611
      

      Attachments

        Issue Links

          Activity

            People

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