Bug #4973 Memory is not released when HEAP table is dropped
Submitted: 10 Aug 2004 14:12 Modified: 12 Aug 2004 20:31
Reporter: SINISA MILIVOJEVIC Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0 and above OS:Windows (Windows)
Assigned to: Bugs System CPU Architecture:Any

[10 Aug 2004 14:12] SINISA MILIVOJEVIC
Description:
If symlinks are used on Windows, and if double quotes are used in those symlinks , then any HEAP table created in that database will not release memory when dropped.

This is due to the bug that is created when table name is made. 

.frm file is deleted, but as that name can not be found among HEAP share list, then memory is not released.

This is a VERY serious bug.

It was discovered by adding a diagnostic patch to sql_test.cc

How to repeat:

 Setup a .sym file with a path similar to "c:\mydir\mysubdir\\db."  It
 doesn't really matter where the double slashes are.

 USE DB ;
 CREATE TABLE TMP1 (TESTCOL INT) TYPE=HEAP;
 INSERT .......... many rows ........
 SELECT * FROM TMP1;
 DROP TABLE TMP1;

Watch unreleased memory with SQLCOM_DEBUG or mysqladmin debug.
[10 Aug 2004 15:37] MySQL Verification Team
symlink should be put into datadir.

Text in the .sym file must be without quotes.

A name of the file (before .sym) thus becomes new database name. That name should be put in the USE statement.
[11 Aug 2004 13:16] Victor Vagin
bk commit - 4.0 tree (vva:1.1893) BUG#4973

ChangeSet
  1.1893 04/08/11 18:55:12 vva@eagle.mysql.r18.ru +1 -0
  fixed Bug #4973 Memory is not released when HEAP table is dropped
[12 Aug 2004 20:31] Victor Vagin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The fix will be in 4.0.21