Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Profiler With Stored Function

forums forums SQLyog SQLyog: Bugs / Feature Requests Profiler With Stored Function

  • This topic is empty.
Viewing 5 reply threads
  • Author
    Posts
    • #12176
      mjdb
      Member

      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

    • #31616
      peterlaursen
      Participant

      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.).

    • #31617
      mjdb
      Member

      not a bug sorry. mysql does not profile queries with stored functions

    • #31618
      peterlaursen
      Participant

      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!

    • #31619
      mjdb
      Member
      '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

    • #31620
      peterlaursen
      Participant

      added here: http://code.google.com/p/sqlyog/issues/detail?id=1569

      We will discuss the best implementation for such cases.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.