Happy Christmas

2009-12-25 Thread peter scott

Hope you are all having a Happy Christmas.

Regards

Peter

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: UPDATE and simultaneous SELECT ... similar to RETURNING?

2009-12-25 Thread Baron Schwartz
Dante,

On Tue, Dec 22, 2009 at 3:53 PM, Dante Lorenso da...@lorenso.com wrote:
 All,

 There was a feature of another DB that I have grown extremely accustomed to
 and would like to find the equivalent in MySQL:

 UPDATE mytable SET
  mycolumn = mycolumn + 1
 WHERE mykey = 'dante'
 RETURNING mycolumn;

I know what you're talking about.  It doesn't exist in MySQL and I
would not expect it to be added soon.  (Probably not ever, but that's
just a guess.)

- Baron

-- 
Baron Schwartz
Percona Inc: Services and Support for MySQL
http://www.percona.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: mysql load balancing

2009-12-25 Thread Baron Schwartz
Miguel,

On Sun, Dec 20, 2009 at 6:21 PM, Miguel Angel Nieto
cor...@miguelangelnieto.net wrote:
 Hi,

 I am searching fot a Mysql Load Balacing tool. I read about mysql
 proxy, sqlrelay, haproxy...

Load balancing, or high availability?

I do not think there is anything good and simple AND generic out of
the box.  As previous posters have noted, you generally have to build
something on top of other tools.

- Baron

-- 
Baron Schwartz
Percona Inc: Services and Support for MySQL
http://www.percona.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Happy Christmas

2009-12-25 Thread Martin Gainty

Guten Tag/Bonjour/Hello Pete

Haben Sie ein gutes Weihnachten/Ayez bon Noël/Have a  good Christmas

Staaten von Amerika/Etats Unis/United States of America
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 From: pbsb...@googlemail.com
 To: mysql@lists.mysql.com
 Subject: Happy Christmas
 Date: Fri, 25 Dec 2009 10:33:35 +
 
 Hope you are all having a Happy Christmas.
 
 Regards
 
 Peter
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=mgai...@hotmail.com
 
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/

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 will do something and set 
 noticed to 1.
 
 What the problem I meet is, when process two read ip from the table, and 
 before it update the noticed to 1 (it has to do something with the ip, and 
 this will take few seconds), process one also updated the table with new ip 
 and noticed=0. Under this case, process two has gotten the outdated IPs (not 
 the new ones updated by process one), since it will set noticed=1 finally so 
 it doesn't have a chance to find it's using old IPs.
 
 So how to resolve this problem?
 Thanks for my newbie questions.
 Merry Holidays!
 
 Eva.

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='done'


Regards,
-- 
Don Readdon_r...@att.net
 It's always darkest before the dawn. So if you are going to
 steal the neighbor's newspaper, that's the time to do it.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: mysql load balancing

2009-12-25 Thread Miguel Angel Nieto
 Load balancing, or high availability?

 I do not think there is anything good and simple AND generic out of
 the box.  As previous posters have noted, you generally have to build
 something on top of other tools.

Hi,

I have the HA solved with MMM. Now, I want load balacing, sending read
queries to slaves and write queries to masters. I read about mysql
proxy, sqlrelay...  but I didn't know the difference betwen them, and
the possible problems of each tool (latency for example). If anyone,
like Pascal, have experience with those kind of tools, please, share
them :P


-- 
Lo que haría sería hacerme pasar por sordomudo y así no tendría que
hablar. Si querían decirme algo, tendrían que escribirlo en un
papelito y enseñármelo. Al final se hartarían y ya no tendría que
hablar el resto de mi vida.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



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='done'



Thanks Don.
That means, when process one want to update ip but it see 
noticed=scan, it will block until the status become done, is it?


Eva

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: mysql load balancing

2009-12-25 Thread Neil Aggarwal
Baron:

 Load balancing, or high availability?
 I do not think there is anything good and simple

We use MySQL master-master replication to keep
geographically separated databases in sync.  
It works very well.

We built a management layer on top of it to allow
the endpoints (Web servers) to talk to either database
in case one fails.  That is not necessary but it adds
a extra layer of proctection.

Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your MySQL database on a CentOS virtual server for $25/mo
Unmetered bandwidth = no overage charges, 7 day free trial


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



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='scan'
  ...
  and finally it should UPDATE domain=whatever, ... noticed='done'
 
 
 Thanks Don.
 That means, when process one want to update ip but it see 
 noticed=scan, it will block until the status become done, is it?
 
 Eva

Depends on how closely coupled the two processes are.
a. proc #1 can only insert new ip's (INSERT IGNORE)
b. proc #1 could ignore/refuse to update any ip not 'new'
c. proc #1 could leave the noticed field alone.
d. proc #1 could set noticed to 'new' (and let proc #2 scan it again)

Which alternative works best for your application?

Regards,
-- 
Don Readdon_r...@att.net
 It's always darkest before the dawn. So if you are going to
 steal the neighbor's newspaper, that's the time to do it.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org