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

INSERT IGNORE inserts a row with a virtual column with invalid expression

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11
    • 10.11
    • Virtual Columns
    • None
    • Can result in unexpected behaviour

    Description

      10.11.19-dbg>CREATE TABLE t (pk INT PRIMARY KEY, a VARBINARY(10) NOT NULL DEFAULT '', v TINYINT AS (a & 65536) VIRTUAL, KEY(v)) ENGINE=InnoDB;
      Query OK, 0 rows affected (0.009 sec)
       
      10.11.19-dbg>  INSERT IGNORE INTO t (pk) VALUES (1);
      Query OK, 1 row affected, 1 warning (0.001 sec)
       
      10.11.19-dbg>  CHECK TABLE t EXTENDED;
      +--------+-------+----------+---------------------------------------+
      | Table  | Op    | Msg_type | Msg_text                              |
      +--------+-------+----------+---------------------------------------+
      | test.t | check | Warning  | Truncated incorrect DECIMAL value: '' |
      | test.t | check | status   | OK                                    |
      +--------+-------+----------+---------------------------------------+
      2 rows in set (0.000 sec)
      

      Plain check table t; is clean but with extended we see a warning

      10.11.19-dbg>  CHECK TABLE t ;
      +--------+-------+----------+----------+
      | Table  | Op    | Msg_type | Msg_text |
      +--------+-------+----------+----------+
      | test.t | check | status   | OK       |
      +--------+-------+----------+----------+
      1 row in set (0.000 sec)
      

      Attachments

        Activity

          People

            nikitamalyavin Nikita Malyavin
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Time Spent - 1.75h Remaining Estimate - 7.75h
                7.75h
                Logged:
                Time Spent - 1.75h Remaining Estimate - 7.75h
                1.75h

                Git Integration

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