Bug #40374 LOAD DATA with CONVERT_TZ causes memory leak
Submitted: 28 Oct 2008 17:32 Modified: 29 Nov 2008 15:56
Reporter: Joachim Zobel Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.0.51a OS:Linux (Debian Lenny amd64)
Assigned to: CPU Architecture:Any

[28 Oct 2008 17:32] Joachim Zobel
Description:

The statement

LOAD DATA INFILE '<filename>' 
      INTO TABLE bug
      (@TEST)
      SET test = CONVERT_TZ( '2007-11-11 11:11',
                             'SYSTEM',
                             @TEST
                            );

leaks memory if it encounters invalid timezone values.

How to repeat:

Create the table 

CREATE TABLE bug (
  test  DATETIME
);

and load the data created with 

#!/usr/bin/perl

use strict;

my $i;
my $maxi = 10000000;

for ($i = 0; $i < $maxi ; $i++) {
	print "$i,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n";
}

by piping STDOUT to <filename>.
[28 Oct 2008 18:55] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.0.67, and inform about the results.
[29 Nov 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[29 Nov 2008 15:56] Joachim Zobel
This is actually fixed in 5.0.67-1 (from debian sid).
[21 Jul 2010 5:22] Shane Bester
related: bug #42502