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

SQL Error (1364): Field 'DB_ROW_HASH_1' doesn't have a default value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Confirmed (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.4.12, 10.4.13, 10.4, 10.5
    • Fix Version/s: 10.4, 10.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 10 64-bit

      Description

      For the following table:

      CREATE TABLE `demo_upsert` (
          `ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
          `Url` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
          `LastListID` BIGINT(20) NULL DEFAULT NULL,
          `Statistics` BIGINT(20) NOT NULL DEFAULT '0',
          PRIMARY KEY (`ID`) USING BTREE,
          UNIQUE INDEX `Url` (`Url`) USING HASH
      )
      COLLATE='utf8mb4_unicode_ci'
      ENGINE=InnoDB
      ;
      

      When I run the following query:

      INSERT INTO demo_upsert (Url, LastListID) SELECT Url, 10 FROM demo_upsert ON DUPLICATE KEY UPDATE LastListID=10
      

      I get the following error:
      SQL Error (1364): Field 'DB_ROW_HASH_1' doesn't have a default value

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sachin.setiya.007 Sachin Setiya (Inactive)
              Reporter:
              rserge Serge Rogatch
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration