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

Inserting empty value omit default value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.2.12
    • N/A
    • None
    • 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

            Unassigned Unassigned
            cliXtar Mathieu REHO
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.