Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-479

insert omitting not null autoincrement column results in warning

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 1.0.6, 1.2.1, 1.2.3
    • Icebox
    • MDB Plugin
    • None

    Description

      If you have defined an autoincrement column and that column also has a not null constraint then a warning is issued if you omit the autoincr column in the insert statement:

      MariaDB [test]> create table t1(i int not null, c char(3)) engine=columnstore comment 'autoincrement=i';
      Query OK, 0 rows affected (0.57 sec)
       
      MariaDB [test]> insert into t1 (c) values ('ABC');
      Query OK, 1 row affected, 1 warning (0.33 sec)
       
      MariaDB [test]> show warnings;
      +---------+------+----------------------------------------+
      | Level   | Code | Message                                |
      +---------+------+----------------------------------------+
      | Warning | 1364 | Field 'i' doesn't have a default value |
      +---------+------+----------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> insert into t1 (i,c) values (0, 'ABC');
      Query OK, 1 row affected (0.27 sec)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dthompson David Thompson (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 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.