| Bug #37953 | LOAD_FILE doesn't free Item_load_file::tmp_value after execution | ||
|---|---|---|---|
| Submitted: | 7 Jul 2008 22:40 | Modified: | 25 Jul 2008 18:27 |
| Reporter: | Sveta Smirnova | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0, 5.1, 6.0 bzr | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[7 Jul 2008 22:41]
Sveta Smirnova
Workaround: use prepared statements and upload file in small chuncks.
[11 Jul 2008 14:50]
Konstantin Osipov
Sveta, I think your root cause analysis is incorrect. However, as long as the symptoms are repeatable, the complain may be valid.
[11 Jul 2008 19:14]
Konstantin Osipov
This is a duplicate of 38002. Is fixed by the same patch.

Description: When inserting large blob using LOAD_FILE function memory for it is allocated, but does not freed until either table is truncated or server is restarted. How to repeat: set global max_allowed_packet =1024*1024*1024; quit CREATE TABLE `t1` ( `f1` char(36) default NULL, `f2` longblob ) ENGINE=MyISAM DEFAULT CHARSET=utf8; insert into t1 values(uuid(), load_file('/path/to/large/file')); Examine memory usage. Suggested fix: Free RAM after LOAD_FILE.