Bug #14504 semicolons in the end of statements like "use" will not be ignored
Submitted: 31 Oct 2005 9:21 Modified: 31 Oct 2005 10:04
Reporter: Thomas Hartwig Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.15, 5.0.16-BK OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[31 Oct 2005 9:21] Thomas Hartwig
Description:
In contrast to the manual and prior versions of mysql semicolons in the end of statements like "use" are not be ignored. 

create database ds;
use ds - works
use ds; - works not

use mysql - works
use mysql; - works (this is remarkable)

See the manual: http://dev.mysql.com/doc/refman/5.0/en/database-use.html

"Note that USE, like QUIT, does not require a semicolon. (You can terminate such statements with a semicolon if you like; it does no harm.) The USE statement is special in another way, too: it must be given on a single line."

How to repeat:
create database ds;
use ds - works
use ds; - works not
[31 Oct 2005 9:55] Valeriy Kravchuk
Thank you for a bug report. Verified on 5.0.16-BK (ChangeSet@1.1957, 2005-10-29 13:11:34+04:00, konstantin@mysql.com):

[openxs@Fedora 5.0]$ bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database ds;
Query OK, 1 row affected (0,04 sec)

mysql> use ds;
ERROR 1049 (42000): Unknown database 'ds;'
mysql> create database d2;
Query OK, 1 row affected (0,00 sec)

mysql> use d2
Database changed

It may be a duplicate of http://bugs.mysql.com/bug.php?id=14371, though. Or it may be fixed by the same changes.
[31 Oct 2005 10:04] Georg Richter
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

Duplicate of #14371, #14416
[31 Oct 2005 10:20] Thomas Hartwig
> Even if you feel that your issue is somewhat different, the resolution is likely to be the same.

Hi Georg, I did a search on "semicolon" before, but did not find the duplicates. However as a end user I can not abstract from a solution back to the problem, that is beyond my horizon.
But will try to widen my search in future ;-)

Thanks anyway