-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I'm pretty sure you're generating this query from some script/program. So, why don't you generate the random number in it?? That way, you shouldn't have any problems with replication. Just my $0.02. Bye! On 26 Oct 2002 18:54:20 -0000, Jason Smith wrote: >Peter, > >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 >pw_name='your_name_here' > >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: >> >> >> ENCRYPT("<PASSWORD>",CONCAT("$1$",SUBSTRING(MD5("<PASSWORD>"), \ >> >> 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 >> >> >> >> >> > Federico Voges Socio gerente Intrasoft Malabia 2137 14 A (1425) Buenos Aires Argentina Te/Fax: 54-11-4833-5182 e-mail: [EMAIL PROTECTED] Web: http://www.intrasoft.com.ar PGP Public Key Fingerprint: A536 4595 EB6F D197 FBC1 5C3A 145C 2516 -----BEGIN PGP SIGNATURE----- Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its affiliated companies. iQA/AwUBPbryPRRcJRaVKt4XEQL95wCeJEykyCssIQAeKUKBPQdQx7itTP8AniCU 5UpMO4hDcYFfT4Y+JA8Ih+Hw =Jbii -----END PGP SIGNATURE-----