Bug #9186 Ready for Commands prompt inside comment blocks
Submitted: 15 Mar 2005 7:23 Modified: 12 May 2005 21:04
Reporter: Emanuele Dolis Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.9 OS:
Assigned to: Jim Winstead CPU Architecture:Any

[15 Mar 2005 7:23] Emanuele Dolis
The reason why I'm classifying this thing as S3 is that the manual reads that "the mysql> prompt indicates that MySQL is ready for a new command".
When you issue a comment in the command line client starting with the /* statement, every following line starts with the mysql> prompt, which is incorrect.
MySQL in not ready for commands, at least as much as it isn't when you're typing a string or naming a field (which corrrectly causes '> and `> prompt to appear)..

This is a bit confusing if you copy a long script and paste in the client to test it.... 

How to repeat:
open a command line client and paste the following commands:

mysql> /*
mysql> select current_user();
mysql> */
mysql> select current_user();
| current_user() |
| root@%         |
1 row in set (0.00 sec)


Suggested fix:
Create a new prompt to take in account that a comment block closure is pending.
[16 Mar 2005 1:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[7 May 2005 15:13] Jim Winstead
Fixed in 4.1.12 and 5.0.6.
[12 May 2005 21:04] Paul Dubois
Noted in 4.1.12, 5.0.6 changelogs, and in the
"Entering Queries" section.