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

Unable to run LOAD DATA INFILE where cpimport succeeds

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • None
    • Icebox
    • MDB Plugin
    • None

    Description

      I'm trying to load a csv into a 10.1.21-MariaDB Columnstore through LOAD DATA INFILE. The reason I use that instead of cpimport is because it allows me to run the command from a remote client, while cpimport is an executable located only in the server.

      Here are the results I get when trying to load a single row with double-quoted tab-delimited fields. I have attached the csv file

      With cpimport:

      sudo /usr/local/mariadb/columnstore/bin/cpimport <db> <table> <csv file> -s '\t' -E '"' -C '\\' -S
      

      Successful result:

      [vagrant@columnstore vagrant]$ sudo /usr/local/mariadb/columnstore/bin/cpimport <db> <table> <csv file> -s '\t' -E '"' -C '\\' -S
      Locale is : C
      Column delimiter : \t
      Enclosed by Character : "
      Escape Character  : \
       
      Using table OID 4253 as the default JOB ID
      Input file(s) will be read from : /vagrant
      Job description file : /usr/local/mariadb/columnstore/data/bulk/tmpjob/4253_D20170323_T160949_S888528_Job_4253.xml
      Log file for this job: /usr/local/mariadb/columnstore/data/bulk/log/Job_4253.log
      2017-03-23 16:09:49 (30539) INFO : successfully loaded job file /usr/local/mariadb/columnstore/data/bulk/tmpjob/4253_D20170323_T160949_S888528_Job_4253.xml
      2017-03-23 16:09:49 (30539) INFO : Job file loaded, run time for this step : 0.0393081 seconds
      2017-03-23 16:09:49 (30539) INFO : PreProcessing check starts
      2017-03-23 16:09:49 (30539) INFO : input data file <csv file>
      2017-03-23 16:09:50 (30539) INFO : PreProcessing check completed
      2017-03-23 16:09:50 (30539) INFO : preProcess completed, run time for this step : 0.242127 seconds
      2017-03-23 16:09:50 (30539) INFO : No of Read Threads Spawned = 1
      2017-03-23 16:09:50 (30539) INFO : No of Parse Threads Spawned = 3
      2017-03-23 16:09:50 (30539) INFO : For table goingup.game_answer_facts: 1 rows processed and 1 rows inserted.
      2017-03-23 16:09:51 (30539) INFO : Bulk load completed, total run time : 1.29235 seconds
      

      With LOAD DATA INFILE (run with mcsmysql --local-infile):

      LOAD DATA LOCAL INFILE '<csv file>'
      INTO TABLE <table>
      FIELDS TERMINATED BY '\t' ENCLOSED BY '"' ESCAPED BY '\\'
      LINES TERMINATED BY '\n';
      

      Unsuccessful result:

      MariaDB [db]>
      LOAD DATA LOCAL INFILE '<csv file>' INTO TABLE <table> FIELDS TERMINATED BY '\t' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n';
      ERROR 1815 (HY000): Internal error: PM1 : Bulkload Read (thread 0) Failed for Table goingup.game_answer_facts.  Terminating this job.
      

      2 files related to the error are ouput at the /usr/local/mariadb/columnstore/mysql/db/ directory, I have attached those as well. The err file says "Line number 1; Error: Data violates NOT NULL constraint with no default; field 2" which doesn't make sense. The bad file looks like it contains bad data, like some data truncation is taking place but I can't say exactly what's happening since it looks like it contains some binary data.

      I tried the exact same LOAD DATA INFILE statement to an identical table on InnoDB, and it is successful with 0 warnings. Curiously, I tried INSERT ... SELECT to insert data from InnoDB to Columnstore and it fails with exactly the same error.

      Attachments

        1. 1row.csv
          0.5 kB
        2. create_table.sql
          2 kB
        3. game_answer_facts.tbl.Job_4253_30358.bad_1
          0.3 kB
        4. game_answer_facts.tbl.Job_4253_30358.err_1
          0.1 kB
        5. insert_select_debug.log
          61 kB
        6. ldi_debug.log
          61 kB

        Activity

          People

            LinuxJedi Andrew Hutchings (Inactive)
            dtheodor Dimitris Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.