Bug #13943 update tbl set fld1=fld2, fld2=fld1 fails to switch values

Submitted: 12 Oct 2005 1:26 Modified: 29 Nov 2007 14:00
Reporter: Joe Murray Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:4.1 OS:Windows (Windows xp)
Assigned to: CPU Architecture:Any
Tags: bfsm_2007_12_06

[12 Oct 2005 1:26] Joe Murray
Description:
ran:
update tbl set fld1=fld2, fld2=fld1
expected to get data in fld1 and fld2 to switch places, instead had one fld overwrite all values in second fld. Aren't calculations of all values supposed to occur before any fields are updated according to SQL standards?

How to repeat:
run the query suggested

Suggested fix:
calculate all values for an update before changing any fields in a record, or at least hold off updating any field until all calculations using it have been completed

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.