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

Spider table with charset utf32/utf16/ucs2 tries to set client charset to unsupported value

Details

    Description

      --source plugin/spider/spider/include/init_spider.inc
       
      SET spider_same_server_link= on;
      eval create server s foreign data wrapper mysql options (host "127.0.0.1", database "test", user "root", port $MASTER_MYPORT);
       
      CREATE TABLE t (a INT);
      CREATE TABLE t_spider (a INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 's', table 't'" CHARSET utf32;
      SELECT * FROM t_spider;
       
      # Cleanup
       
      DROP TABLE t_spider, t;
      DROP SERVER s;
       
      --source plugin/spider/spider/include/deinit_spider.inc
      

      10.4 3e3cfa89

      mysqltest: At line 8: query 'SELECT * FROM t_spider' failed: 1231: Variable 'character_set_client' can't be set to the value of 'utf32'
      

      At this point Spider tries to run SET NAMES utf32 (hopelessly of course).

      Note that the test case sets an explicit character set for the Spider table for simplicity; in reality, it would rather be either a database charset, or a system-wide character-set-server. The result is the same anyway.

      Attachments

        Activity

          I agree with the patch with some comments.

          nayuta-yanagisawa Nayuta Yanagisawa (Inactive) added a comment - I agree with the patch with some comments.
          ycp Yuchen Pei added a comment - - edited

          nayuta-yanagisawa Thanks for the comments. I have addressed them and updated my commit at https://github.com/MariaDB/server/commit/ccb738d868b https://github.com/MariaDB/server/commit/3f63aa18a7f, PTAL thanks.

          ycp Yuchen Pei added a comment - - edited nayuta-yanagisawa Thanks for the comments. I have addressed them and updated my commit at htt ps://github.com/MariaDB/server/commit/ccb738d868b https://github.com/MariaDB/server/commit/3f63aa18a7f , PTAL thanks.

          The last patch is OK to push.

          nayuta-yanagisawa Nayuta Yanagisawa (Inactive) added a comment - The last patch is OK to push.
          ycp Yuchen Pei added a comment -

          Looks like a bit more work is needed so that the commit builds for 10.6+.

          ycp Yuchen Pei added a comment - Looks like a bit more work is needed so that the commit builds for 10.6+.
          ycp Yuchen Pei added a comment -

          Pushed a commit[1] for 10.3-5 and a commit[2] for 10.6+ due to [3].

          [1] 3f63aa18a7f81540049c8414308c6c04fdc4a5ad
          [2] 5eb545e5c22318c79991473bb95f334eda6010ca
          [3] a206658b985fe5e18fb5692fdb3698dad5aca70a

          ycp Yuchen Pei added a comment - Pushed a commit [1] for 10.3-5 and a commit [2] for 10.6+ due to [3] . [1] 3f63aa18a7f81540049c8414308c6c04fdc4a5ad [2] 5eb545e5c22318c79991473bb95f334eda6010ca [3] a206658b985fe5e18fb5692fdb3698dad5aca70a

          People

            ycp Yuchen Pei
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.