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

LOAD DATA INFILE doesn't read NULL values accurately

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.9.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
    • N/A
    • Documentation
    • None

    Description

      Steps to reproduce.

      SET SESSION sql_mode = "NO_BACKSLASH_ESCAPES";
      SELECT NULL, 0, '' INTO OUTFILE 'data-server.csv';
      CREATE
      OR REPLACE TABLE loading (col1 VARCHAR(255) NULL, col2 INT, col3 VARCHAR(255));
       
      LOAD DATA LOCAL INFILE 'data-server.csv' INTO TABLE loading;
       
      SELECT
         *
      FROM
         loading
      WHERE
         col1 IS NULL;
      

      It reads NULL as a string.

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            thien.ly Duong Thien Ly
            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.