Memory leak when selecting from information_schema.tables in stored procedure (1 reply)

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.
Submitted by programmer on Thu, 08/14/2008 - 22:26.

When running the following stored procedure mutliple times, I see memory growth on the mysqld daemon:

DELIMITER //

DROP PROCEDURE IF EXISTS test_information_schema_select;

CREATE PROCEDURE test_information_schema_select

()

BEGIN

SELECT * from information_schema.tables;

END//

DELIMITER ;

I do not see any memory growth by simpy running the query "SELECT * from information_schema.tables;" by itself. Also, I don't see any memory growth when performing SELECT statements in other stored procedures. Basically, any access of test_information_schema.tables within a stored procedure exercises the problem.

When the procedure is dropped and recreated, mysqld seems to free this memory. Also, the memory is freed if I exit from the mysql client.

I don't see any bug reports associated with this.

I've noticed the problem on 5.0.45 (Community) and 5.0.64 (Enterprise).

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.