I just want to see the original insert statement which failed, so that I can
do a search on it.
Is there any option for seeing the insert statement that gets executed and
the error line next to next.?
On 10/5/07, Baron Schwartz <baron@stripped> wrote:
> Arun wrote:
> > I have a large batch of insert sql statements, of which some of them are
> > failing. I want to know which one is failing exactly.
> > Is there anyway I can debug it and which statement went wrong. I have
> > 4 or 5 out of 200 statements that are failing.
> It depends on how you're running the batch, and you didn't give us any
> information about that. Are you doing something like this?
> mysql < batch.sql
> If so, try
> mysql --line-numbers < batch.sql
> This option may be enabled already. Try running mysql --help | grep
> 'line-numbers' to see. It's enabled by default on my machine:
> baron@kanga:~$ mysql --help | grep 'line-numbers'
> --line-numbers Write line numbers for errors.
> -L, --skip-line-numbers
> line-numbers TRUE