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

ADD COLUMN NOT NULL is expecting the new column has to have a default value.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Icebox
    • None
    • None
    • Server version: 10.5.6
      MCS version: 1.5.4-1

    Description

      ADD COLUMN NOT NULL is expecting the new column has to have a default value.

      MariaDB [mcs87_db]> CREATE TABLE t1 (c1 INT, c2 CHAR(1)) ENGINE=Columnstore;
      Query OK, 0 rows affected (0.142 sec)

      MariaDB [mcs87_db]> INSERT INTO t1 VALUES (1, 'a');
      Query OK, 1 row affected (0.221 sec)

      MariaDB [mcs87_db]> ALTER TABLE t1 ADD COLUMN c11 INT NOT NULL;
      ERROR 1815 (HY000): Internal error: Table is not empty. New column has to have a default value if NOT NULL required.
      MariaDB [mcs87_db]> ALTER TABLE t1 ADD COLUMN c22 CHAR NOT NULL;
      ERROR 1815 (HY000): Internal error: Table is not empty. New column has to have a default value if NOT NULL required.
      MariaDB [mcs87_db]>

      InnoDB accepts by adding 0 or empty string into the new column added.

      Attachments

        Activity

          People

            Unassigned Unassigned
            susil.behera Susil Behera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.