[MDEV-2776] LP:702563 - Wrong result for UPDATE statement in update.test for MWL#89 Created: 2011-01-13  Updated: 2023-08-31  Resolved: 2012-10-04

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

Type: Bug Priority: Major
Reporter: Timour Katchaounov (Inactive) Assignee: Timour Katchaounov (Inactive)
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug702563.xml    
Issue Links:
Duplicate

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



 Comments   
Comment by Timour Katchaounov (Inactive) [ 2011-01-14 ]

Re: Wrong result for UPDATE statement in update.test for MWL#89
The bug is fixed after Monty's patch for 5.3-mwl89:

revno: 2877
committer: Michael Widenius <monty@askmonty.org>
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

Comment by Rasmus Johansson (Inactive) [ 2011-01-14 ]

Launchpad bug id: 702563

Generated at Thu Feb 08 06:44:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.