forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Profiler With Stored Function
- This topic is empty.
-
AuthorPosts
-
-
November 30, 2010 at 7:38 pm #12176mjdbMember
When using the profiler on a query that has a user stored function, the profiler tab runs this
SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 0 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
after removing the function
SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 9921 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
for some reason having the stored function in there causes the profiler to use query_id 0
oh and im using 8.71
-
November 30, 2010 at 7:44 pm #31616peterlaursenParticipant
What is the problem? I am not able to understand!
Please provide a a complete test case (the stored function, the query you use, tables if they are required to reproduce this etc.).
-
November 30, 2010 at 8:06 pm #31617mjdbMember
not a bug sorry. mysql does not profile queries with stored functions
-
November 30, 2010 at 8:19 pm #31618peterlaursenParticipant
Thanks for the info!
But I think we should handle this better in SQLyog if query_id for a query returns = '0'. We will check what we can do!
-
November 30, 2010 at 8:23 pm #31619mjdbMember'peterlaursen' wrote:
Thanks for the info!
But I think we should handle this better in SQLyog if query_id for a query returns = '0'. We will check what we can do!
DELIMITER $$
USE `mysql`$$
CREATE DEFINER=`root`@`localhost` FUNCTION `test`() RETURNS CHAR(10) CHARSET latin1
NOT DETERMINISTIC NO SQL
BEGIN
RETURN CURDATE();
END$$
DELIMITER ;
select mysql.test()
click on profiler tab
then click on the history tab
-
November 30, 2010 at 9:26 pm #31620peterlaursenParticipant
added here: http://code.google.com/p/sqlyog/issues/detail?id=1569
We will discuss the best implementation for such cases.
-
-
AuthorPosts
- You must be logged in to reply to this topic.