Bug #46795 Stop loading commands if error occurs
Submitted: 18 Aug 2009 20:16 Modified: 18 Aug 2009 20:26
Reporter: Chris Hennick Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1.31-1ubuntu2 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[18 Aug 2009 20:16] Chris Hennick
Description:
When multiple lines have been copied-and-pasted into the MySQL client from another application and an error occurs on a line that isn't the last, continuing to execute the other lines may have unexpected results. I'd suggest, therefore, that the client clear its buffer of input when it receives an error message. Likewise, when using the \. command to load from a file, I'd suggest that it stop loading when it receives an error message.

How to repeat:
Copy and paste the following into the mysql client:

foo;
drop database;
bar;

Suggested fix:
[18 Aug 2009 20:26] Miguel Solorzano
Thank you for the bug report.