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

Inserting empty value omit default value

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 10.2.12
    • Fix Version/s: N/A
    • Labels:
      None
    • Environment:
      Linux 4.4.0-112-generic Ubuntu 16.04.3 x86_64

      Description

      When trying to make an insert query with empty value into an integer field that have a default value, the server returns an error. This was not impacting MariaDB 10.1. On the previous version, the default value worked.

      Example :

      INSERT INTO `events` SET `message`='Test', `userid`=2, `runbyid`=1, `subuser`='', `time`='1517003754';
      

      Response :

      #1366 - Incorrect integer value: '' for column 'subuser' at row 1

      Structure :

      Column=subuser Type=tinyint(1) CanBeNull=No DefaultValue=0

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cliXtar Mathieu Reho
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: