At 10:40 AM -0800 01-14-2000, Robert White wrote:
>I'm using MySQL 3.23 and am generating thousands of warnings when I "load
>infile" data into a table. I want to identify which records and which
>of their field entries are provoking these warnings. I've reviewed the
>MySQL documentation and lists of past email inquiries concerning this
>problem. I am well aware of what causes warnings. However, the manual
>dodges any explanation of how to identify warnings other than doing a
>simple comparison of an output file with the original data source.
>Responses to similar inquiries in the past were equally unhelpful. Any
>ideas how to identify which records and which of their fields provoke
>Alternatively, how would I compare output files with original data sources
>for differences? Monty replies "run diff"? What?
I guess you won't like this response, but you've already identified how
to locate errors: load the file, write it back out, and compare the two.
1) Run LOAD DATA
2) Run SELECT INTO ... OUTFILE, using the same line and field delimiters
that were used to load the data
3) diff the original input file with the file generated in step 2.
Unfortunately, you cannot perform step 2 unless you have the FILE privilege
on the server. An alternative is to run a simple SELECT to generate a
tab-delimited output file by invoking mysql --batch. This may work if
your input file is tab-delimited.
Paul DuBois, paul@stripped