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

LOAD DATA INFILE with geometry data fails

Details

    Description

      "LOAD DATA INFILE" fails, for binary (or, geometry) data , for the file created with SELECT * INTO OUTFILE

      I'm attaching example data where it can be demonstrated.

      To reproduce, extract the dump file and load it

      mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
      mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
      mariadb -uroot test -e "TRUNCATE airport_geo;  LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
      

      The last command fails with

      --------------
      LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
      --------------
       
      ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
      

      this is the DDL for the create table, column "geolocation" is a POINT

      CREATE TABLE `airport_geo` (
        `airport_id` smallint(6) NOT NULL,
        `name` varchar(50) NOT NULL,
        `city` varchar(50) DEFAULT NULL,
        `country` varchar(50) DEFAULT NULL,
        `latitude` decimal(11,8) NOT NULL,
        `longitude` decimal(11,8) NOT NULL,
        `geolocation` point NOT NULL,
        KEY `flughafen_idx` (`airport_id`),
        SPATIAL KEY `geolokation_spt` (`geolocation`)
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
      

      "git bisect" points to MDEV-19123 as first bad commit

      36eba98817339f53cc57f1d4884ace3efb38db8d is the first bad commit
      commit 36eba98817339f53cc57f1d4884ace3efb38db8d
      Date:   Tue May 28 09:08:51 2024 +0400
       
          MDEV-19123 Change default charset from latin1 to utf8mb4
       
          Changing the default server character set from latin1 to utf8mb4.
      

      Attachments

        Issue Links

          Activity

            wlad Vladislav Vaintroub created issue -
            wlad Vladislav Vaintroub made changes -
            Field Original Value New Value
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo_blob.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/path/to/airport_geo.tsv'
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/path/to/airport_geo.tsv' INTO TABLE airport_geo"
            {code}


            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo_blob.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}


            wlad Vladislav Vaintroub made changes -
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo_blob.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}


            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo_blob.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}


            wlad Vladislav Vaintroub made changes -
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo_blob.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}


            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            wlad Vladislav Vaintroub made changes -
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}

            Now, the reason why it fails seems to be
            wlad Vladislav Vaintroub made changes -
            Attachment airport_geo.zip [ 74012 ]
            wlad Vladislav Vaintroub made changes -
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}

            Now, the reason why it fails seems to be
            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}

            Column "geolocation" is defined as
            wlad Vladislav Vaintroub made changes -
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}

            Column "geolocation" is defined as
            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
            wlad Vladislav Vaintroub made changes -
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table, column "geolocation" is a POINT
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
            wlad Vladislav Vaintroub made changes -
            Priority Major [ 3 ] Blocker [ 1 ]
            wlad Vladislav Vaintroub made changes -
            Labels regression
            wlad Vladislav Vaintroub made changes -
            Fix Version/s 10.6 [ 24028 ]
            wlad Vladislav Vaintroub made changes -
            Description I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table, column "geolocation" is a POINT
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
            This appears to be introduced in 10.6

            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table, column "geolocation" is a POINT
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
            wlad Vladislav Vaintroub made changes -
            Fix Version/s 11.6 [ 29515 ]
            Fix Version/s 10.6 [ 24028 ]
            wlad Vladislav Vaintroub made changes -
            Description This appears to be introduced in 10.6

            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table, column "geolocation" is a POINT
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
            This appears to be introduced in 10.6, a recent regression


            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table, column "geolocation" is a POINT
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
            wlad Vladislav Vaintroub made changes -
            Affects Version/s 11.6.1 [ 29847 ]
            wlad Vladislav Vaintroub made changes -
            Description This appears to be introduced in 10.6, a recent regression


            I'm attaching example data, that can't be restored with LOAD DATA INFILE, from a file created with SELECT * INTO OUTFILE.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table, column "geolocation" is a POINT
            {code:sql}
            /*!40101 SET @saved_cs_client = @@character_set_client */;
            /*!40101 SET character_set_client = utf8 */;
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}
             "LOAD DATA INFILE" fails, for binary (or, geometry) data , for the file created with SELECT * INTO OUTFILE

            I'm attaching example data where it can be demonstrated.

            To reproduce, extract the dump file and load it

            {code:bash}
            mariadb -uroot test < /mnt/e/airport_geo.mysqldump.sql
            mariadb -uroot test -e "SELECT * FROM airport_geo INTO OUTFILE '/mnt/e/airport_geo.tsv'"
            mariadb -uroot test -e "TRUNCATE airport_geo; LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo"
            {code}

            The last command fails with
            {noformat}
            --------------
            LOAD DATA INFILE '/mnt/e/airport_geo.tsv' INTO TABLE airport_geo
            --------------

            ERROR 1263 (22004) at line 1: Column set to default value; NULL supplied to NOT NULL column 'geolocation' at row 42
            {noformat}
            this is the DDL for the create table, column "geolocation" is a POINT
            {code:sql}
            CREATE TABLE `airport_geo` (
              `airport_id` smallint(6) NOT NULL,
              `name` varchar(50) NOT NULL,
              `city` varchar(50) DEFAULT NULL,
              `country` varchar(50) DEFAULT NULL,
              `latitude` decimal(11,8) NOT NULL,
              `longitude` decimal(11,8) NOT NULL,
              `geolocation` point NOT NULL,
              KEY `flughafen_idx` (`airport_id`),
              SPATIAL KEY `geolokation_spt` (`geolocation`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}

            "git bisect" points to MDEV-19123 as first bad commit
            {noformat}
            36eba98817339f53cc57f1d4884ace3efb38db8d is the first bad commit
            commit 36eba98817339f53cc57f1d4884ace3efb38db8d
            Date: Tue May 28 09:08:51 2024 +0400

                MDEV-19123 Change default charset from latin1 to utf8mb4

                Changing the default server character set from latin1 to utf8mb4.
            {noformat}
            wlad Vladislav Vaintroub made changes -
            wlad Vladislav Vaintroub made changes -
            Assignee Alexander Barkov [ bar ]
            wlad Vladislav Vaintroub made changes -
            Summary DRAFT: SELECT into outfile for with Geometry, can't be restored with LOAD DATA INFILE SELECT into outfile for with Geometry data, can't be restored with LOAD DATA INFILE
            wlad Vladislav Vaintroub made changes -
            Summary SELECT into outfile for with Geometry data, can't be restored with LOAD DATA INFILE SELECT INTO OUTFILE for with geometry data, can't be restored with LOAD DATA INFILE
            wlad Vladislav Vaintroub made changes -
            Summary SELECT INTO OUTFILE for with geometry data, can't be restored with LOAD DATA INFILE SELECT INTO OUTFILE with geometry data, can't be restored with LOAD DATA INFILE
            wlad Vladislav Vaintroub made changes -
            Summary SELECT INTO OUTFILE with geometry data, can't be restored with LOAD DATA INFILE SELECT INTO OUTFILE with geometry data, fails on LOAD DATA INFILE
            wlad Vladislav Vaintroub made changes -
            Summary SELECT INTO OUTFILE with geometry data, fails on LOAD DATA INFILE LOAD DATA INFILE with geometry data fails
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Alexey Botchkov [ holyfoot ]
            bar Alexander Barkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Alexander Barkov [ bar ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.7 [ 29815 ]
            bar Alexander Barkov made changes -
            sanja Oleksandr Byelkin made changes -
            Assignee Alexander Barkov [ bar ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Vladislav Vaintroub [ wlad ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Vladislav Vaintroub [ wlad ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Fix Version/s 10.5.27 [ 29902 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.6 [ 29515 ]
            Fix Version/s 11.7 [ 29815 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.6.20 [ 29903 ]
            Fix Version/s 10.11.10 [ 29904 ]
            Fix Version/s 11.2.6 [ 29906 ]
            Fix Version/s 11.4.4 [ 29907 ]
            sanja Oleksandr Byelkin made changes -
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Alexander Barkov [ bar ]
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2024-10-21 12:24:09.0 2024-10-21 12:24:08.73
            bar Alexander Barkov made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]

            People

              bar Alexander Barkov
              wlad Vladislav Vaintroub
              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.