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

FOREIGN KEY…SET NULL corrupts an index on a virtual column

    XMLWordPrintable

Details

    Description

      MySQL 5.7.36 includes a bug fix with a test case:
      Bug #33053297 VIRTUAL INDEX CORRUPTED DURING CASCADE UPDATE ON CHILD TABLE
      The test case resembles MDEV-24041. A quick attempt to apply the patch (with some rewriting in row_ins_foreign_fill_virtual()) did not affect the outcome. There is a result difference:

      @@ -918,7 +918,6 @@
       1	NULL	2020-10-22 13:32:41	2020- 
       SELECT `date_sent` FROM `email_stats` WHERE `generated_sent_email` = '2020-';
       date_sent
      -2020-10-22 13:32:41
       DROP TABLE `email_stats`;
       DROP TABLE `emails`;
       # test-case 4
      @@ -956,7 +955,6 @@
       1	NULL	2020-10-22 13:32:41	2020- 
       SELECT `date_sent` FROM `email_stats` WHERE `generated_sent_email` = '2020-';
       date_sent
      -2020-10-22 13:32:41
       DROP TABLE `email_stats`;
       DROP TABLE `emails`;
       # End of 10.2 tests
      

      Curiously, if I add CHECK TABLE to the test, it will not report any corruption.

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.