How do I stop LOAD DATA INFILE from reading the EOF into my table and reading garbage records beyond the EOF

In a MYSQL windows environment, LOAD DATA INFILE reads the EOF ('\Z') and the garbage records beyond the EOF into my table,  I can get rid of the EOF by using this command.  "Delete from table where field1 = '\z';"   I would like MYSQL to not read the EOF and the trailing garbage records... I can do this by preprocessing in 'C' but I would like MYSQL to do it.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
MySQL does not recognize Ctl-Z as EOF.  You will have to do that before you load the file.  From this page
The ASCII 26 character can be encoded as “\Z” to enable you to work around the problem that ASCII 26 stands for END-OF-FILE on Windows. ASCII 26 within a file causes problems if you try to use mysql db_name < file_name.
Note that MySQL was not originally written for Windows but for Unix/Linux which does not use Ctl-Z as an EOF character.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.