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

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

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

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            Attachment foreign_key.patch [ 59882 ]
            nikitamalyavin Nikita Malyavin made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            nikitamalyavin Nikita Malyavin made changes -
            Assignee Nikita Malyavin [ nikitamalyavin ] Marko Mäkelä [ marko ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Nikita Malyavin [ nikitamalyavin ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            nikitamalyavin Nikita Malyavin made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            nikitamalyavin Nikita Malyavin made changes -
            Assignee Nikita Malyavin [ nikitamalyavin ] Marko Mäkelä [ marko ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Nikita Malyavin [ nikitamalyavin ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2021-10-28 05:10:46.0 2021-10-28 05:10:46.774
            marko Marko Mäkelä made changes -
            Fix Version/s 10.2.41 [ 26032 ]
            Fix Version/s 10.3.32 [ 26029 ]
            Fix Version/s 10.4.22 [ 26031 ]
            Fix Version/s 10.5.13 [ 26026 ]
            Fix Version/s 10.6.5 [ 26034 ]
            Fix Version/s 10.7.1 [ 26120 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 126438 ] MariaDB v4 [ 159792 ]

            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.