Bug #50759 Load data infile support to limit the amount of data to be read into table
Submitted: 30 Jan 2010 19:08 Modified: 23 Feb 2010 11:14
Reporter: admin www.mercuriusgids.nl Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:5.x OS:Any
Assigned to: CPU Architecture:Any
Tags: end offset, infile, limit read, LOAD DATA INFILE, maximum records to read, start offset

[30 Jan 2010 19:08] admin www.mercuriusgids.nl
Description:
It would be a very nice feature if LOAD DATA INFILE could be limited of how much data to read aka how many records. Now it only supports the number of records to skip from beginning of file. 

To make it very powerfull:

STARTOFFSET: set filepointer at STARTOFFSET before the read of data starts

ENDOFFSET: when read is at or over position ENDOFFSET, equal to EOF

NUMRECORDS: maximum number of records to read.

It will be quite simple to implement this and we are going to implement this in MySQL 5.1. Let me know if you think this is an interesting feature and i will submit the patch when it is done. 

An extended LOAD DATA INFILE, as proposed, can be extremely powerfull in certain applications which process huge datafiles.

How to repeat:
LOAD DATA INFILE currently supports no such thing. It's a feature request.

Suggested fix:
Extend LOAD DATA INFILE command
[23 Feb 2010 11:14] Susanne Ebrecht
Many thanks for writing a reasonable feature request.