Wrong result for UPDATE statement in update.test for MWL#89

Bug #702563 reported by Timour Katchaounov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Timour Katchaounov

Bug Description

The following test case from update.test updates fewer rows than it should:

create table t1 (f1 int);
create table t2 (f2 int);
insert into t1 values(1),(2);
insert into t2 values(1),(1);
update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1;
select * from t2;
drop table t1,t2;

Testing the result of the update via

  select * from t2;

returns:
| 3 |
| 1 |

while the correct state after update is:
| 3 |
| 3 |

In addition the number of updated rows is reported as 2 instead of
the correct number 3 (the sum of updated rows for both tables).

Related branches

Changed in maria:
milestone: none → 5.3
assignee: nobody → Timour Katchaounov (timour)
importance: Undecided → High
status: New → Confirmed
Changed in maria:
status: Confirmed → In Progress
Revision history for this message
Timour Katchaounov (timour) wrote :

The bug is fixed after Monty's patch for 5.3-mwl89:

revno: 2877
committer: Michael Widenius <email address hidden>
branch nick: maria-5.3-mwl89
timestamp: Fri 2011-01-14 01:26:20 +0200
message:
  Don't recalculate conditions that have already been checked.
  This fixes the wrong result in tests like compress, join, join_cache, greedy_optimizer and select_pkeycache

Changed in maria:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.