3 messages in com.mysql.lists.bugsRe: MySQL/PostgreSQL discrepancy| From | Sent On | Attachments |
|---|---|---|
| Thimble Smith | 02 Nov 2000 13:00 | |
| Benjamin Pflugmann | 03 Nov 2000 14:24 | |
| Michael Widenius | 04 Nov 2000 08:58 |
| Subject: | Re: MySQL/PostgreSQL discrepancy![]() |
|---|---|
| From: | Thimble Smith (ti...@mysql.com) |
| Date: | 11/02/2000 01:00:19 PM |
| List: | com.mysql.lists.bugs |
On Wed, Nov 01, 2000 at 12:51:42PM +0900, Ken Smith wrote:
I sent the following message to the PostgreSQL mailing list and got three responses. Each one points to the same point in the standard which contradicts behavior I have seen when using MySQL. Please let me know if you disagree with their assertions. I am not subscribed to this list so please cc my personal email address in your correspondence.
Yes, it looks like MySQL does the wrong thing here. It's a bug that we'll need to fix. I expect it won't be fixed in 3.23, but I could be wrong.
Thanks for pointing it out!
Tim
---The original email BEGIN---
THE TEST Run 'psql', then enter the following except for the select statement output.
---BEGIN--- create table test (name char, a int, b int); insert into test values ('x', 1, 2); select * from test; update test set a=3,b=a where name='x'; insert into test values ('y', 1, 2); update test set b=a,a=3 where name='y'; select * from test; name | a | b ------+---+--- x | 3 | 1 y | 3 | 1 drop table test; ---END---
I am used to MySQL so I expected the following from the select statement. name | a | b ------+---+--- x | 3 | 3 y | 3 | 1
Which behavior is the correct?
---The original email END---
---The responses BEGIN--- I believe ours...
From update positioned:
"The <value expression>s are effecitvely evaluated before updating the object row. If a <value expression> contains a reference to a column of T, then the reference is to the value of that column in the object row before any value of the object row is updated."
From update searched:
"The <value expressions> are effectively evaluated for each row of T before updating any row of T."
-- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Tim Smith <ti...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Development Team /_/ /_/\_, /___/\___\_\___/ Boone, NC USA <___/ www.mysql.com




