[MDEV-5269] Missing update when updating a CONNECT table Created: 2013-11-09  Updated: 2013-11-09  Resolved: 2013-11-09

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.4
Fix Version/s: 10.0.4

Type: Bug Priority: Major
Reporter: Olivier Bertrand Assignee: Unassigned
Resolution: Fixed Votes: 0
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.



 Comments   
Comment by Olivier Bertrand [ 2013-11-09 ]

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

Generated at Thu Feb 08 07:02:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.