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

Backslash in text column breaks INSERT INTO Columnstore SELECT * FROM InnoDB

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 1.2.5
    • Icebox
    • DMLProc
    • None
    • mariadb-community-columnstore-docker

    Description

      To reproduce:

       
      $ docker pull mariadb/columnstore
      $ docker run -d -p 3306:3306 --name mcs_container mariadb/columnstore
      $ docker exec -it mcs_container bash
       
      . /etc/profile.d/columnstoreAlias.sh
      mcsmysql
       
      CREATE DATABASE test;
      USE test;
       
      CREATE TABLE `backslash_innodb` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `uint1` int(10) unsigned NOT NULL,
        `uint2` int(10) unsigned NOT NULL,
        `text_with_backslash` text NOT NULL,
        `created` timestamp NOT NULL DEFAULT current_timestamp(),
        `updated` timestamp NULL DEFAULT NULL,
        `text2` text DEFAULT NULL,
        `vchar` varchar(255) NOT NULL DEFAULT 'default',
        PRIMARY KEY (`id`)
      );
       
      CREATE TABLE `backslash_columnstore` (
        `id` int(10) unsigned NOT NULL,
        `uint1` int(10) unsigned NOT NULL,
        `uint2` int(10) unsigned NOT NULL,
        `text_with_backslash` text NOT NULL,
        `created` datetime NOT NULL,
        `updated` datetime NULL DEFAULT NULL,
        `text2` text DEFAULT NULL,
        `vchar` varchar(255) NOT NULL DEFAULT 'default'
      ) ENGINE=Columnstore;
       
      insert into backslash_innodb (uint1,uint2,text_with_backslash) values (2,3,"
      \\");
       
      insert into backslash_columnstore select * from  backslash_innodb;
       
      ERROR 1815 (HY000): Internal error: PM1 : Bulkload Read (thread 0) Failed for Table test.backslash_columnstore.  Terminating this job.
      
      

      This creates two files in /usr/local/mariadb/columnstore/mysql/db

      -rw-rw---- 1 mysql mysql       82 Apr  9 00:27 backslash_columnstore.tbl.Job_3070_15234.err_1
      -rw-rw---- 1 mysql mysql       46 Apr  9 00:27 backslash_columnstore.tbl.Job_3070_15234.bad_1
       
      cat backslash_columnstore.tbl.Job_3070_15234.err_1
      Line number 1;  Error: Data violates NOT NULL constraint with no default; field 5
       
      cat backslash_columnstore.tbl.Job_3070_15234.bad_1
      123
      \2020-04-09 00:27:36default
      
      

      It appears that the field count is broken by the backslash character.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sasha Sasha V
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.