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

Unique blobs allow duplicate values upon UPDATE

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (f TEXT UNIQUE);
      INSERT INTO t1 VALUES (NULL),(NULL);
      UPDATE t1 SET f = '';
      SELECT * FROM t1;
      DROP TABLE t1;
      

      10.4 de20872331

      MariaDB [test]> UPDATE t1 SET f = '';
      Query OK, 2 rows affected (0.116 sec)
      Rows matched: 2  Changed: 2  Warnings: 0
       
      MariaDB [test]> SELECT * FROM t1;
      +------+
      | f    |
      +------+
      |      |
      |      |
      +------+
      2 rows in set (0.000 sec)
      

      Reproducible on 10.4, 10.5.

      INSERT of empty values returns ER_DUP_ENTRY as expected.
      UPDATE from non-NULL values and UPDATE to non-empty values also returns ER_DUP_ENTRY.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.