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:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1.31-1ubuntu2 OS:Any
Assigned to: CPU Architecture:Any

[18 Aug 2009 20:16] Chris Hennick
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:

drop database;

Suggested fix:
[18 Aug 2009 20:26] MySQL Verification Team
Thank you for the bug report.