List:General Discussion« Previous MessageNext Message »
From:jason.axley Date:May 19 1999 8:45pm
Subject:'\r <database>' mysql syntax is broken
View as plain text  
>Description:
Trying to connect to a different database with '\r <database>' from the mysql
command-line tool is broken (and has been for a couple mysql releases).

Example:
mysql> \r mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Connection id:    108
Current database: mysql

    ->
^^^^^^^
You'll notice that the mysql program has not gone to the mysql> prompt but
is waiting for further input from the user.  This does _not_ happen if you
use 'connect <database>'.  You can get back to the prompt by entering a
semicolon (;) and hitting enter (you'll get an error:

    -> ;
ERROR 1064: You have an error in your SQL syntax near 'mysql
;' at line 1

but at least you'll get to a prompt).  This also happens on the linux version.

>How-To-Repeat:
	Try to use \r to connect to a specific database by name and it will
	work every time.
>Fix:
	Don't use the '\r <database>' syntax--instead, use 'connect <database>'
	as a work-around.

>Submitter-Id:	<submitter ID>
>Originator:	Jason Axley
>Organization:
>
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:	'\r <database>' mysql syntax is broken
>Severity:	non-critical
>Priority:	low
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-3.22.22 (TCX binary)

>Environment:
	
System: SunOS nofud 5.6 Generic_105181-13 sun4u sparc SUNW,Ultra-1
Architecture: sun4

Some paths:  /usr/bin/perl /usr/local/bin/make /usr/local/bin/gcc
GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.3/specs
gcc version 2.7.2.3
Compilation info: CC='gcc'  CFLAGS='-O3 -fomit-frame-pointer'  CXX='gcc'  CXXFLAGS='-O3
-fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''
Configure command: ./configure  --prefix=/usr/local/mysql '--with-comment=TCX binary'
--with-low-memory --disable-shared
Perl: This is perl, version 5.004_04 built for sun4-solaris

-Jason
Thread
'\r <database>' mysql syntax is brokenjason.axley20 May