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

Unique blobs allow duplicate values upon concurrent INSERT

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.4.21, 10.5.12
    • None
    • Server
    • None

    Description

      table

      CREATE DATABASE test;
       
      CREATE TABLE t1 (
      f text DEFAULT NULL,
      UNIQUE KEY `f` (`f`) USING HASH
      ) ENGINE=InnoDB;
      

      Run jmeter script UniqueHashTest.jmx

      1. adjust database configuration variables (see image).
      2. script creates a numeric counter, on each iteration launch 10 threads, that attempt to make the same insert concurrently with the counter value. Scrip finish after 200 seconds. Execute like:
        jmeter -n -t UniqueHashTest.jmx -l UniqueHashTest.out

      check inserted records.java

      SELECT count(1) recordCount, count(distinct f) uniqueCount, count(1)- count(distinct f) duplicatedCount
      FROM t1;
      

      Should present something like that:

      recordCount uniqueCount duplicatedCount
      1622 1377 245

      Reproducible on 10.4, 10.5.

      Attachments

        Issue Links

          Activity

            People

              lstartseva Lena Startseva
              dmonteverde Daniel Monteverde
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.