a query such as the one below:

update your_domain_com set pw_passwd = ENCRYPT("anyvaluehere",CONCAT("$1
$",SUBSTRING(MD5("anyvaluehere"),ROUND(RAND()*10),5),"0")) where 

This does produce an encrypted entry that can be authenticated against, but 
when replicating this table, mysql replication errors occur and replication 
dies. Simply by removing the usage of RAND(), replication is not affected.

On Sat, 26 Oct 2002 10:45:32 +0200, Peter Palmreuther <[EMAIL PROTECTED]> 
wrote :

> Hello Jason,
> On Friday, October 25, 2002 at 10:02:53 PM Jason wrote:
> > On Friday, October 11, 2002 at 10:38:04 AM Peter wrote:
> >>       ROUND(RAND()*10),5),"0"))
> > It appears that passing RAND() with no arguments to the pw_passwd field
> > breaks mysql replication.
> 1.) Anybody who can verify this? I don't run vpopmail on MySQL for
>     myself, so I can'T tell anything about this replication stuff.
> 2.) Jason: are you sure you used and understood the SQL command
>     correctly? You should _NOT_ pass the value of RAND(), nor the
>     value of RAND()*10 to "pw_passwd" field.
>     The RAND() function is _ONLY_ used to pick a (more or less) random
>     substring (for creating the salt).
>     Therefor RAND() must be called w/o arguments, else it will produce
>     the same value over and over again. (BTW: I've never seen the sense
>     in a rand() function that produces the same value again and again,
>     anybody who can explain the deeper thought behind this idea?)
> -- 
> Best regards
> Peter Palmreuther

Reply via email to