Re: two processes update the same column in short time

2009-12-25 Thread Don Read
On Sat, 26 Dec 2009 10:43:55 +0800 Eva said: > 2009-12-26 2:36, Don Read : > > > > > Change noticed to enum('new', 'scan', 'done') not null default 'new'; > > > > When proc two runs, it should > > "UPDATE noticed='scan' WHERE noticed='new'" > > Then repeat the scan with "SELECT ... WHERE noticed=

Re: two processes update the same column in short time

2009-12-25 Thread Eva
2009-12-26 2:36, Don Read : Change noticed to enum('new', 'scan', 'done') not null default 'new'; When proc two runs, it should "UPDATE noticed='scan' WHERE noticed='new'" Then repeat the scan with "SELECT ... WHERE noticed='scan'" ... and finally it should "UPDATE domain=whatever, ... noticed

Re: two processes update the same column in short time

2009-12-25 Thread Don Read
On Fri, 25 Dec 2009 15:41:40 +0800 Eva said: > Hello, > > I have a table, say its stru is like: > > domain ip noticed > > The column "noticed" is an enum value (eigher 0 or 1). > When process one update "ip", it will set "noticed" to 0. > Then process two know the status changed, it

two processes update the same column in short time

2009-12-24 Thread Eva
Hello, I have a table, say its stru is like: domain ip noticed The column "noticed" is an enum value (eigher 0 or 1). When process one update "ip", it will set "noticed" to 0. Then process two know the status changed, it will do something and set "noticed" to 1. What the problem I me