Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Arun (arun.george.1981gmail.com)
Date: Fri Oct 05 2007 - 11:36:59 CDT
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 <baronxaprb.com> 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:
> baronkanga:~$ mysql --help | grep 'line-numbers'
> --line-numbers Write line numbers for errors.
> -L, --skip-line-numbers
> line-numbers TRUE