Ciao,
I wanted to add some info in the CREATE PROCEDURE page in the KB, but I think that some info about CREATE PROCEDURE clauses miss both in the kb and in the MySQL manual.
* [NOT] DETERMINISTIC. From MySQL docs: "A routine is considered “deterministic” if it always produces the same result for the same input
Hi Roberto I'll try to be more clear, please read carefully before answering I know what a deterministic expression is - but what kinds of output must be deterministic for a procedure to be defined as DETERMINISTIC? There are many types of output for a proc: * OUT params * SELECTs * writes on tables * SET @var For a deterministic proc, do all of these need to be deterministic? I guess the answer isn't easy. -- For "NO SQL" a complete list of SQL statements would be needed. If we use this as a reference: http://dev.mysql.com/doc/refman/5.6/en/sql-syntax.html , even RETURN seems to be a SQL statement, but of course it can't be true, because it's impossible to write a func without RETURN. Greetings Federico -------------------------------------------- Lun 2/9/13, Roberto Spadim <roberto@spadim.com.br> ha scritto: Oggetto: Re: [Maria-discuss] CREATE PROCEDURE clauses A: "Federico Razzoli" <federico_raz@yahoo.it> Cc: "Mailing-List mariadb" <maria-discuss@lists.launchpad.net> Data: Lunedì 2 settembre 2013, 15:23 Hi Federico! 2013/9/2 Federico Razzoli <federico_raz@yahoo.it>: parameters, and “not deterministic” otherwise."
What does this exactly mean for procedures? OUT and INOUT parameters? Resultsets returned by the procedure? Both?
* NO SQL: As far as I understand, even SET is a SQL statement. I guess that a "no sql" function is something
i think it's something like: RANDON() = not deterministic, ROUND(1.5) = deterministic maybe it's important for replication (must be done via binary, instead SQL), and it's important for query cache (not deterministic can't be cached) like
CREATE FUNCTION x(n INT) RETURNS INT BEGIN RETURN n*2; END;
But what is a "no sql" procedure (if such a procedure even exists)?
i don't know, but reading mysql protocol, there's some functions for show fields, process info, process kill, http://dev.mysql.com/doc/internals/en/text-protocol.html
I'm sorry if this info is already written somewhere, but I really wasn't able to find it - and I feel that the KB should specify things like these.
Greetings Federico
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- Roberto Spadim SPAEmpresarial