I am about to write a CREATE FUNCTION with MySQL and I am wondering, if CREATE TEMPORARY TABLE counts toward flag MODIFIES SQL DATA.
Function does not modify any permanent table, just temporary table, which it creates for optimization purpose.
Should I use flag MODIFIES SQL DATA or only READS SQL DATA?
What is a really benefit to use MODIFIES SQL DATA or READS SQL DATA flag anyway?
As of now (MySQL 5.5) these characteristics serve only as an in-code documentation.
From http://dev.mysql.com/doc/refman/5.5/en/create-procedure.html
This is in contrast with
(NON)DETERMINISTICclause, which serves as a hint to optimizer whether the results of function can be cached.