It is a doubt.What do the "deterninistic" option do?
You ever gave me the follow example:
---------------------------------------------
create procedure unsafe_sp()
begin
if @@server_id=2 then
drop databaseaccounting;
enf if;
end
---------------------------------------------
This is a non-deterninistic procedure.
In your word,The procedure can work in master and slave without any warning
.But the procedure should produce different results on master and slave if
master has server_id=1 and slave has server_id=2.
If i add "deterninistic" option in the procedure.As follow:
---------------------------------------------
create procedure unsafe_sp()
DETERMINISTIC
begin
if @@server_id=2 then
drop databaseaccounting;
enf if;
end
---------------------------------------------
In your word,syntax check doesn't find the error and the procedure be executed
without warning,too.And the different result also produce in the master and
slave.
What ever "DETERMINISTIC" option do?
----- Original Message -----
From: "Gleb Paharenko" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, December 16, 2005 5:38 PM
Subject: (瑞星提示-此邮件可能是垃圾邮件)Re: use deterministic within procedure
> Hello.
>
> >In the example,routine_body is non-deterministic.But the function
> >defined "DETERNINISTIC".Do mysql throw a exception in creating >process?
>
>
> In my opinion, it shouldn't, but you can check this by yourself.
>
>
>
>
>
> >I want to say,if i my funciton is a non-deterministic function.But i
> >define then function with "deterministic" option.
>
> >for example:
>
> >---------------------------------------------------------
> >create function test()
> > return int
> > DETERNINISTIC
>
> > routine_body
> >----------------------------------------------------------
> >
> >In the example,routine_body is non-deterministic.But the function
> >defined "DETERNINISTIC".Do mysql throw a exception in creating >process?
>
>
>
>
>
>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.NET http://www.ensita.net/
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Gleb Paharenko
> / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
> /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
> <___/ www.mysql.com
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
>
>