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

Missing update when updating a CONNECT table

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.4
    • 10.0.4
    • None
    • None

    Description

      After doing:

      create table debit (ete int, hiver int, saison char(12)) engine=connect;
      insert into debit(ete,hiver) values(33,44);
      insert into debit values(11,23,'ete'),(17,24,'hiver'),(14,18,'printemps');
      update `débit` set hiver=68 where ete in (11,17);

      The update replies "affected rows 1" and indeed the row for ete = 17 is not updated.

      Attachments

        Activity

          Was because CONNECT was only reading the columns of the table->read_set columns
          When comparing the record changes of the second update, the 'hiver' value was still
          equal to 68 and MariaDB did not update thinking there was no data change.
          Fixed in: ha_connect::rnd_init by adding

          // When updating, to avoid skipped update, force the table
          // handler to retrieve write-only fields to be able to compare
          // records and detect data change.
          if (xmod == MODE_UPDATE)
          bitmap_union(table->read_set, table->write_set);

          bertrandop Olivier Bertrand added a comment - Was because CONNECT was only reading the columns of the table->read_set columns When comparing the record changes of the second update, the 'hiver' value was still equal to 68 and MariaDB did not update thinking there was no data change. Fixed in: ha_connect::rnd_init by adding // When updating, to avoid skipped update, force the table // handler to retrieve write-only fields to be able to compare // records and detect data change. if (xmod == MODE_UPDATE) bitmap_union(table->read_set, table->write_set);

          People

            Unassigned Unassigned
            bertrandop Olivier Bertrand
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.