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

Missing update when updating a CONNECT table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.4
    • Fix Version/s: 10.0.4
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            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);

            Show
            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

              • Assignee:
                Unassigned
                Reporter:
                bertrandop Olivier Bertrand
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours
                  5h