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

Spurious "Field doesn't have a default value" warning

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.2
    • 10.2.3
    • Server
    • None

    Description

      CREATE TABLE `facebook_friendship` (
       `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
       `facebook_user_id_from` char(36) NOT NULL,
       `user_id_from` char(36) NOT NULL,
       `facebook_user_id_to` char(36) NOT NULL,
       `user_id_to` char(36) NOT NULL,
       `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
       PRIMARY KEY (`id`),
       UNIQUE KEY `user_id_uq` (`facebook_user_id_from`,`facebook_user_id_to`)
      );
      

      MariaDB [test]> insert into `facebook_friendship` (`facebook_user_id_from`,`user_id_from`,`facebook_user_id_to`,`user_id_to`)  values ('walter', 'walter2', 'walter3', 'walte4r');
      Query OK, 1 row affected, 1 warning (0.01 sec)
       
      MariaDB [test]> show warnings;
      +---------+------+-------------------------------------------------+
      | Level   | Code | Message                                         |
      +---------+------+-------------------------------------------------+
      | Warning | 1364 | Field 'created_at' doesn't have a default value |
      +---------+------+-------------------------------------------------+
      

      Default value is still inserted correctly, I guess that's a parser issue.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            tanj Guillaume Lefranc
            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.