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

CHECK Constraints not working for UPDATE

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Do
    • 1.1.0
    • Icebox
    • MariaDB Server
    • None
    • CentOS 6.4

    Description

      CHECK constrains on a ColumnStore table works for INSERTs, but not for UPDATEs. UPDATEs that violates CHECK constraints are executed anyway.

      DROP TABLE IF EXISTS columnstore1;
      CREATE TABLE columnstore1(c1 INTEGER NOT NULL, CHECK(c1 > 10)) Engine=ColumnStore;
      INSERT INTO columnstore1 VALUES(10);
      INSERT INTO columnstore1 VALUES(11);
      UPDATE columnstore1 SET c1 = 10;
      SELECT c1 FROM columnstore1;
      

      In the above example, the first INSERT fails, the second succeeds and the update is also successful, meaning that we end up with invalid data in the table.

      Attachments

        Issue Links

          Activity

            People

              toddstoffel Todd Stoffel (Inactive)
              karlsson Anders Karlsson
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.