Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4496

INSERT..SELECT does not work for utf8 VARCHAR

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.1.1
    • 6.1.1
    • PrimProc
    • None
    • 2021-1, 2021-2

    Description

      This problem is repeatable in develop (and does not seem to repeat in develop-5).

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (c1 VARCHAR(32) CHARACTER SET utf8) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES ('a'),('b');
      SELECT * FROM t1;
      

      +------+
      | c1   |
      +------+
      | a    |
      | b    |
      +------+
      

      Looks fine so far.

      DROP TABLE IF EXISTS t2;
      CREATE TABLE t2 LIKE t1;
      INSERT INTO t2 SELECT c1 FROM t1;
      SELECT * FROM t2;
      

      +------+
      | c1   |
      +------+
      | NULL |
      | NULL |
      +------+
      

      Looks wrong. This query is expected to return the same result set with the previous query.

      Note, if I change the data type from VARCHAR(32) CHARACTER SET utf8 to

      • CHAR(32) CHARACTER SET utf8, or
      • VARCHAR(32) CHARACTER SET latin1

      it starts to return correct results.

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              bar Alexander Barkov
              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.